adsabs / ADSIngestParser

Curation parser library
MIT License
0 stars 7 forks source link

fix: Issue #30 missing abstracts #32

Closed seasidesparrow closed 1 year ago

seasidesparrow commented 1 year ago

Fixes Issue #30

The XML 'crossref-xml' formatted output from the habanero.crossref.cn.content_negotiation endpoint has a slightly different metadata structure than does the crossref-xml harvested via the OAIPMH endpoint with regards to abstract metadata. From the OAIPMH endpoint, abstracts are (or can be) tagged with <jats:abstract>, while in the API XML endpoint, they are tagged with <abstract>.

This fix adds the capability of parsing habanero-sourced crossref-xml using the existing crossref parser by extending the check for abstracts within the <abstract> tag. This also removes any <title> tags and their content from the abstract prior to output.

codecov-commenter commented 1 year ago

Codecov Report

Base: 86.16% // Head: 86.96% // Increases project coverage by +0.79% :tada:

Coverage data is based on head (bee1b40) compared to base (92e4b7b). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #32 +/- ## ========================================== + Coverage 86.16% 86.96% +0.79% ========================================== Files 18 19 +1 Lines 1771 1979 +208 ========================================== + Hits 1526 1721 +195 - Misses 245 258 +13 ``` | [Impacted Files](https://codecov.io/gh/adsabs/ADSIngestParser/pull/32?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adsabs) | Coverage Δ | | |---|---|---| | [adsingestp/parsers/crossref.py](https://codecov.io/gh/adsabs/ADSIngestParser/pull/32/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adsabs#diff-YWRzaW5nZXN0cC9wYXJzZXJzL2Nyb3NzcmVmLnB5) | `91.70% <100.00%> (+0.56%)` | :arrow_up: | | [tests/test\_crossref.py](https://codecov.io/gh/adsabs/ADSIngestParser/pull/32/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adsabs#diff-dGVzdHMvdGVzdF9jcm9zc3JlZi5weQ==) | `93.93% <100.00%> (+0.18%)` | :arrow_up: | | [adsingestp/\_\_init\_\_.py](https://codecov.io/gh/adsabs/ADSIngestParser/pull/32/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adsabs#diff-YWRzaW5nZXN0cC9fX2luaXRfXy5weQ==) | | | | [adsingestp/parsers/wiley.py](https://codecov.io/gh/adsabs/ADSIngestParser/pull/32/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adsabs#diff-YWRzaW5nZXN0cC9wYXJzZXJzL3dpbGV5LnB5) | `93.56% <0.00%> (ø)` | | | [tests/test\_wiley.py](https://codecov.io/gh/adsabs/ADSIngestParser/pull/32/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adsabs#diff-dGVzdHMvdGVzdF93aWxleS5weQ==) | `91.17% <0.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adsabs). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=adsabs)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.