Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed eLocator bug #100

Merged
merged 3 commits into from
Apr 4, 2024
Merged

Conversation

seasidesparrow
Copy link
Member

This fix captures eLocator into electronic_id in the case where <FirstPage> is included in the document but is one of ["n/a", "no"]. I am also exporting the entire eLocator value, rather than [-5:]`; we can extract a substring for bibcode creation in an ADSIngestEnrichment.bibcodes special case.
modified: adsingestp/parsers/wiley.py
modified: tests/stubdata/output/wiley_jgra_57392.json
modified: tests/stubdata/output/wiley_swe_21103.json
modified: tests/test_wiley.py

 	modified:   adsingestp/parsers/wiley.py
 	modified:   tests/stubdata/output/wiley_jgra_57392.json
 	modified:   tests/stubdata/output/wiley_swe_21103.json
 	modified:   tests/test_wiley.py
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.43%. Comparing base (f2b8dad) to head (f98a696).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
+ Coverage   90.25%   90.43%   +0.17%     
==========================================
  Files          25       25              
  Lines        2627     2624       -3     
==========================================
+ Hits         2371     2373       +2     
+ Misses        256      251       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

 	modified:   adsingestp/parsers/wiley.py
 	modified:   tests/stubdata/output/wiley_jgra_57392.json
 	modified:   tests/stubdata/output/wiley_swe_21103.json
 	modified:   tests/stubdata/output/wiley_swe_461.json
 	modified:   tests/stubdata/output/wiley_swe_539.json
@@ -2,7 +2,7 @@
"authors": [{"affiliation": [{"affPubID": "jgra57392-aff-0001", "affPubRaw": "Astronomy Department, University of Maryland, College Park, MD, USA"}, {"affPubID": "jgra57392-aff-0002", "affPubRaw": "NASA Goddard Space Flight Center, Greenbelt, MD, USA"}], "attrib": {"email": "swang90@umd.edu", "orcid": "0000-0002-6783-7759"}, "name": {"given_name": "Shan", "surname": "Wang"}}, {"affiliation": [{"affPubID": "jgra57392-aff-0001", "affPubRaw": "Astronomy Department, University of Maryland, College Park, MD, USA"}, {"affPubID": "jgra57392-aff-0002", "affPubRaw": "NASA Goddard Space Flight Center, Greenbelt, MD, USA"}], "attrib": {"orcid": "0000-0002-5431-174X"}, "name": {"given_name": "Naoki", "surname": "Bessho"}}, {"affiliation": [{"affPubID": "jgra57392-aff-0003", "affPubRaw": "Swedish Institute of Space Physics, Uppsala, Sweden"}], "attrib": {"orcid": "0000-0002-1046-746X"}, "name": {"given_name": "Daniel B.", "surname": "Graham"}}, {"affiliation": [{"affPubID": "jgra57392-aff-0004", "affPubRaw": "Laboratoire de Physique des Plasmas, CNRS/Sorbonne Université/Université Paris‐Saclay/Observatoire de Paris/ Ecole Polytechnique Institut Polytechnique de Paris, Paris, France"}], "attrib": {"orcid": "0000-0003-2713-7966"}, "name": {"given_name": "Olivier", "surname": "Le Contel"}}, {"affiliation": [{"affPubID": "jgra57392-aff-0005", "affPubRaw": "Department of Physics, University of Texas at Arlington, Arlington, TX, USA"}], "name": {"given_name": "Frederick D.", "surname": "Wilder"}}, {"affiliation": [{"affPubID": "jgra57392-aff-0003", "affPubRaw": "Swedish Institute of Space Physics, Uppsala, Sweden"}], "attrib": {"orcid": "0000-0001-5550-3113"}, "name": {"given_name": "Yuri V.", "surname": "Khotyaintsev"}}, {"affiliation": [{"affPubID": "jgra57392-aff-0006", "affPubRaw": "Earth, Oceans, and Space Science, Southwest Research Institute, Durham, NH, USA"}], "attrib": {"orcid": "0000-0001-6890-2973"}, "name": {"given_name": "Kevin J.", "surname": "Genestreti"}}, {"affiliation": [{"affPubID": "jgra57392-aff-0007", "affPubRaw": "Institut de Recherche en Astrophysique et Planétologie, Université de Toulouse, Toulouse, France"}, {"affPubID": "jgra57392-aff-0008", "affPubRaw": "Centre National de la Recherche Scientifique, Toulouse, France"}], "attrib": {"orcid": "0000-0001-6807-8494"}, "name": {"given_name": "Benoit", "surname": "Lavraud"}}, {"affiliation": [{"affPubID": "jgra57392-aff-0001", "affPubRaw": "Astronomy Department, University of Maryland, College Park, MD, USA"}, {"affPubID": "jgra57392-aff-0002", "affPubRaw": "NASA Goddard Space Flight Center, Greenbelt, MD, USA"}], "name": {"given_name": "Seung", "surname": "Choi"}}, {"affiliation": [{"affPubID": "jgra57392-aff-0009", "affPubRaw": "Southwest Research Institute San Antonio, San Antonio, TX, USA"}], "attrib": {"orcid": "0000-0003-0452-8403"}, "name": {"given_name": "James L.", "surname": "Burch"}}],
"copyright": {"statement": "©2022. The Authors.", "status": true},
"editorialHistory": {"acceptedDate": "2022-09-01", "receivedDates": ["2022-07-28"], "revisedDates": ["2022-08-26"]},
"pagination": {"pageCount": "21"},
"pagination": {"electronicID": "e2022JA030882", "firstPage": "2022JA030882", "pageCount": "21"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that firstPage = the value in . I'm just curious, is that whole string what we want to capture for first page? It seems more like an electronicID or something else?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't write the original code, so I'm not sure. I suspect it's trying to work within the limits of the Ingest_Data_Model to capture multiple tags into the pagination structure. I will need to ask Carolyn.

 	modified:   adsingestp/parsers/wiley.py
Copy link
Contributor

@mugdhapolimera mugdhapolimera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Feel free to merge at your convenience

@seasidesparrow seasidesparrow merged commit ca0a121 into adsabs:main Apr 4, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants