From dbf6d34a705b599084adc85329465304f620d043 Mon Sep 17 00:00:00 2001 From: robertatakenaka Date: Tue, 18 Sep 2018 10:08:37 -0300 Subject: [PATCH 1/2] [tk72] Incluir o atributo scimago_id em Journal Fixes #72 --- opac_schema/v1/models.py | 2 ++ tests/test_journal.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/opac_schema/v1/models.py b/opac_schema/v1/models.py index 8985be0..eaad7f8 100644 --- a/opac_schema/v1/models.py +++ b/opac_schema/v1/models.py @@ -343,6 +343,7 @@ class Journal(Document): url_segment = StringField() metrics = EmbeddedDocumentField(JounalMetrics) + scimago_id = StringField() meta = { 'collection': 'journal', @@ -355,6 +356,7 @@ class Journal(Document): 'url_segment', 'issue_count', 'current_status', + 'scimago_id', ] } diff --git a/tests/test_journal.py b/tests/test_journal.py index 0f95d7a..e54ae3c 100644 --- a/tests/test_journal.py +++ b/tests/test_journal.py @@ -15,7 +15,8 @@ def test_create_only_required_fields_success(self): 'jid': jid, 'title': 'The Dummy Journal', 'acronym': 'dj', - 'is_public': True + 'is_public': True, + 'scimago_id': '4500151524', } # when @@ -23,6 +24,7 @@ def test_create_only_required_fields_success(self): journal_doc.save() # then + self.assertEqual('4500151524', journal_doc.scimago_id) self.assertEqual(_id, journal_doc._id) self.assertEqual(jid, journal_doc.jid) self.assertEqual(1, Journal.objects.all().count()) From 7ccffe2d865fa43c7afe80508b11d1bba26783d4 Mon Sep 17 00:00:00 2001 From: robertatakenaka Date: Tue, 18 Sep 2018 10:32:29 -0300 Subject: [PATCH 2/2] =?UTF-8?q?[tk72]=20Alterar=20a=20vers=C3=A3o=20para?= =?UTF-8?q?=202.47=20(scimago=5Fid)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #72 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b895971..e215c93 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="Opac Schema", - version='2.46', + version='2.47', description="Schema of SciELO OPAC", author="SciELO", author_email="scielo@scielo.org",