diff --git a/requirements.txt b/requirements.txt index a76a669d..079fb6de 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,7 @@ yuicompressor jsonfield django-tastypie==0.9.16 django-htmlmin==0.7.0 -packtools==2.0.1 +packtools==2.0.3 celery==3.1.25 django-celery==3.1.16 defusedxml==0.4.1 diff --git a/scielomanager/export/markupfile.py b/scielomanager/export/markupfile.py index c4adaded..e0f54948 100644 --- a/scielomanager/export/markupfile.py +++ b/scielomanager/export/markupfile.py @@ -273,7 +273,7 @@ def title(self): def journal_meta(self): return '#'.join([ self.issn, - self.abbrev_title, + self.short_title, self.norma, self.pub_type, self.issn, @@ -482,7 +482,7 @@ def publisher(self): @property def title(self): - return unicode(self._journal.short_title) + return unicode(self._journal.title) @property def acron(self): @@ -499,7 +499,7 @@ def norma(self): def journal_meta(self): return '#'.join([ self.issn, - self.title, + self.short_title, self.norma, self.pub_type, self.issn, diff --git a/scielomanager/export/tests/tests_markupfiles.py b/scielomanager/export/tests/tests_markupfiles.py index c69fd75a..5954345c 100644 --- a/scielomanager/export/tests/tests_markupfiles.py +++ b/scielomanager/export/tests/tests_markupfiles.py @@ -529,7 +529,7 @@ def test_journal_meta(self): dummy_issue.journal self.mocker.result(dummy_journal) - dummy_journal.title_iso + dummy_journal.short_title self.mocker.result(u'blitz') dummy_journal.editorial_standard @@ -1345,7 +1345,7 @@ def test_publisher_is_the_journal_publisher(self): def test_title_is_the_journal_title(self): dummy_journal = self.mocker.mock() - dummy_journal.short_title + dummy_journal.title self.mocker.result(u'foo') self.mocker.replay() @@ -1359,9 +1359,13 @@ def test_journal_meta(self): dummy_journal = self.mocker.mock() dummy_study_area = self.mocker.mock() + dummy_journal.title + self.mocker.result(u'foo') + self.mocker.count(1) + dummy_journal.short_title self.mocker.result(u'foo') - self.mocker.count(2) + self.mocker.count(1) dummy_journal.editorial_standard self.mocker.result('apa') diff --git a/scielomanager/tools/import_data/from_articlemeta.py b/scielomanager/tools/import_data/from_articlemeta.py index 4999d5ff..487025fa 100644 --- a/scielomanager/tools/import_data/from_articlemeta.py +++ b/scielomanager/tools/import_data/from_articlemeta.py @@ -59,7 +59,7 @@ def items(self): for issn in self.issns: for data in self._articlemeta.issues( collection=self.collection_from, issn=issn): - logger.debug(u'Lendo fascículos (%s-%s) do periódico %s - %s' % ( + logger.debug(u'Reading issue (%s-%s) from journal %s - %s' % ( data.type, data.label, data.journal.title, data.journal.scielo_issn)) yield data @@ -104,7 +104,7 @@ def main(): args = parser.parse_args() _config_logging(args.logging_level, args.logging_file) - logger.info(u'Importando dados da coleção: %s' % args.collection_from) + logger.info(u'Importing data from collection: %s' % args.collection_from) issns = None if len(args.issns) > 0: @@ -113,7 +113,7 @@ def main(): try: importer = Importer(args.collection_from, args.collection_to, issns=issns) except ValueError: - logger.error(u'Coleção de destino (%s) não existe' % args.collection_to) + logger.error(u'Destiny collection do not exists (%s)' % args.collection_to) else: importer.run() diff --git a/scielomanager/tools/import_data/importer.py b/scielomanager/tools/import_data/importer.py index 5f398d6b..cc900c32 100644 --- a/scielomanager/tools/import_data/importer.py +++ b/scielomanager/tools/import_data/importer.py @@ -447,8 +447,8 @@ def _issue_exists(self, journal, data): @transaction.commit_on_success def load_issue(self, data): - if data.type == 'ahead': - logger.info('Issue (Ahead) will not be imported') + if data.type == 'ahead' or data.type == 'pressrelease': + logger.info('Issue (%s) will not be imported' % data.type) return journal = self.load_journal(data.journal)