Skip to content

Commit

Permalink
Fix tests and doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-E-Rose committed Dec 18, 2024
1 parent b2d0402 commit 6aa8a17
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pubmed_parser/medline_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ def parse_article_info(
if True, parse reference list as an output
parse_subs: bool
if True, parse mesh terms with subterms
Returns
-------
article: dict
Expand Down Expand Up @@ -703,8 +704,7 @@ def parse_medline_xml(
parse_downto_mesh_subterms=False
):
"""Parse XML file from Medline XML format available at
https://ftp.ncbi.nlm.nih.gov/pubmed/
https://ftp.ncbi.nlm.nih.gov/pubmed/.
Parameters
----------
Expand Down Expand Up @@ -734,7 +734,7 @@ def parse_medline_xml(
default: False
parse_downto_mesh_subterms: bool
if True, return mesh terms concatenated with "; " and mesh subterms concatenated " / "
and appended with * if the subterm is major
and appended with * if the subterm is major
if False, return mesh_terms concatenated with "; "
default: False
Expand Down
3 changes: 1 addition & 2 deletions pubmed_parser/pubmed_oa_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ def parse_pubmed_xml(path, include_path=False, nxml=False):
A dictionary contains a following keys from a parsed XML path
'full_title', 'abstract', 'journal', 'pmid', 'pmc', 'doi',
'publisher_id', 'author_list', 'affiliation_list', 'publication_year',
'publication_date', 'epublication_date' ,'subjects'
}
'publication_date', 'epublication_date', 'subjects'
"""
tree = read_xml(path, nxml)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_pubmed_web_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ def test_version():

xml_21113338 = pp.parse_xml_web('21113338')
assert xml_21113338['version_id'] == '3'
assert xml_21113338['version_date'] is None
assert xml_21113338['version_date'] == '2011/04/07'

0 comments on commit 6aa8a17

Please sign in to comment.