From 6513a2c9b00a89015325f2f1a142ad4abd64c195 Mon Sep 17 00:00:00 2001 From: Geert Kapteijns <ghkapteijns@gmail.com> Date: Mon, 15 May 2017 14:16:52 +0200 Subject: [PATCH] change authorlist to author_list in DOICaller --- scipost/services.py | 4 ++-- scipost/test_services.py | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scipost/services.py b/scipost/services.py index 70dbcb9c0..111f9c381 100644 --- a/scipost/services.py +++ b/scipost/services.py @@ -30,7 +30,7 @@ class DOICaller: def _format_data(self): data = self._crossref_data pub_title = data['title'][0] - authorlist = ['{} {}'.format(author['given'], author['family']) for author in data['author']] + author_list = ['{} {}'.format(author['given'], author['family']) for author in data['author']] journal = data['container-title'][0] volume = data.get('volume', '') pages = self._get_pages(data) @@ -38,7 +38,7 @@ class DOICaller: self.data = { 'pub_title': pub_title, - 'authorlist': authorlist, + 'author_list': author_list, 'journal': journal, 'volume': volume, 'pages': pages, diff --git a/scipost/test_services.py b/scipost/test_services.py index 08bfbcc5d..4202d7f52 100644 --- a/scipost/test_services.py +++ b/scipost/test_services.py @@ -19,7 +19,6 @@ class ArxivCallerTest(TestCase): def test_identifier_old_style(self): caller = ArxivCaller('cond-mat/0612480') self.assertTrue(caller.is_valid) - print(caller.data) correct_data = { 'author_list': ['Kouji Ueda', 'Chenglong Jin', 'Naokazu Shibata', 'Yasuhiro Hieida', 'Tomotoshi Nishino'], 'pub_date': datetime.date(2006, 12, 19), 'arxiv_link': 'http://arxiv.org/abs/cond-mat/0612480v2', 'pub_abstract': 'A kind of least action principle is introduced for the discrete time\nevolution of one-dimensional quantum lattice models. Based on this principle,\nwe obtain an optimal condition for the matrix product states on succeeding time\nslices generated by the real-time density matrix renormalization group method.\nThis optimization can also be applied to classical simulations of quantum\ncircuits. We discuss the time reversal symmetry in the fully optimized MPS.', 'pub_title': 'Least Action Principle for the Real-Time Density Matrix Renormalization\n Group' } @@ -37,7 +36,7 @@ class DOICallerTest(TestCase): 'pub_date': '2015-12-18', 'journal': 'Physical Review B', 'pages': '', - 'authorlist': [ + 'author_list': [ 'R. Vlijm', 'M. Ganahl', 'D. Fioretto', 'M. Brockmann', 'M. Haque', 'H. G. Evertz', 'J.-S. Caux'], 'volume': '92', 'pub_title': 'Quasi-soliton scattering in quantum spin chains' @@ -52,10 +51,10 @@ class DOICallerTest(TestCase): 'journal': 'SciPost Physics', # Inexplicably, an extra space is added between 'inpenetrable' and 'bosons', but this is a # Crossref error. - 'pub_title': 'One-particle density matrix of trapped one-dimensional impenetrable bosons from conformal invariance', + 'pub_title': 'One-particle density matrix of trapped one-dimensional impenetrable bosons from conformal invariance', 'pages': '', 'volume': '2', - 'authorlist': ['Yannis Brun', 'Jerome Dubail'] + 'author_list': ['Yannis Brun', 'Jerome Dubail'] } self.assertTrue(caller.is_valid) self.assertEqual(caller.data, correct_data) -- GitLab