Skip to content

Commit

Permalink
Merge pull request #229 from scholarly-python-package/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
programize-admin committed Dec 15, 2020
2 parents 36e08f5 + f327e91 commit e645619
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions scholarly/data_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ class BibEntry(TypedDict, total=False):
pub_year: str
venue: str
journal: str
volume: int
number: int
volume: str
number: str
pages: str
publisher: str

Expand Down
8 changes: 4 additions & 4 deletions scholarly/publication_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
}

_BIB_DATATYPES = {
'number': 'int',
'volume': 'int',
'number': 'str',
'volume': 'str',
}
_BIB_REVERSE_MAPPING = {
'pub_type': 'ENTRYTYPE',
Expand Down Expand Up @@ -263,9 +263,9 @@ def fill(self, publication: Publication)->Publication:
elif key == 'journal':
publication['bib']['journal'] = val.text
elif key == 'volume':
publication['bib']['volume'] = int(val.text)
publication['bib']['volume'] = val.text
elif key == 'issue':
publication['bib']['number'] = int(val.text)
publication['bib']['number'] = val.text
elif key == 'pages':
publication['bib']['pages'] = val.text
elif key == 'publisher':
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='scholarly',
version='1.0.1',
version='1.0.2',
author='Steven A. Cholewiak, Panos Ipeirotis, Victor Silva',
author_email='steven@cholewiak.com, panos@stern.nyu.edu, vsilva@ualberta.ca',
description='Simple access to Google Scholar authors and citations',
Expand Down
4 changes: 2 additions & 2 deletions test_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ def test_search_pubs_filling_publication_contents(self):
self.assertTrue(f['bib']['author'] == u'Cholewiak, Steven A and Love, Gordon D and Banks, Martin S')
self.assertTrue(f['author_id'] == ['4bahYMkAAAAJ', '3xJXtlwAAAAJ', 'Smr99uEAAAAJ'])
self.assertTrue(f['bib']['journal'] == u'Journal of vision')
self.assertTrue(f['bib']['number'] == 9)
self.assertTrue(f['bib']['number'] == '9')
self.assertTrue(f['bib']['pages'] == u'1--1')
self.assertTrue(f['bib']['publisher'] == u'The Association for Research in Vision and Ophthalmology')
self.assertTrue(f['bib']['title'] == u'Creating correct blur and its effect on accommodation')
self.assertTrue(f['pub_url'] == u'https://jov.arvojournals.org/article.aspx?articleid=2701817')
self.assertTrue(f['bib']['volume'] == 18)
self.assertTrue(f['bib']['volume'] == '18')
self.assertTrue(f['bib']['pub_year'] == u'2018')

def test_extract_author_id_list(self):
Expand Down

0 comments on commit e645619

Please sign in to comment.