elifesciences / elife-tools

Python library for parsing eLife article XML data.
MIT License
15 stars 7 forks source link

sub-article data for use in peer review deposits. #312

Closed gnott closed 5 years ago

gnott commented 5 years ago

Re: issue https://github.com/elifesciences/elife-tools/issues/310

Here is a new JATS parsing function to extract <sub-article> tag metadata. It includes some details about the parent <article> tag.

The one test case is based on the eLife article 00666 kitchen sink XML, edited for brevity.

The output is the basic data I want to use in generating Crossref peer review deposits.

The data the new function targets is similar but slightly different than the JSON output the parser produces from the decision_letter() and author_response() functions, because those others are tailored to produce JSON output that is valid against the RAML API schema.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.002%) to 99.562% when pulling 5ba3d7c4ed5c287ccc3994f1b51899a628a9aea8 on sub-article into a22f57dbe3423231fdd129ab91f4149d032d87c5 on develop.

gnott commented 5 years ago

Thanks for taking a look @giorgiosironi! Of course, I managed to miss something -- the <sub-article> tag's attributes, including the article_type and id values. I think these may be useful in downstream projects, so I added with a new commit. I will re-request a review, expecting it should not require much to check again (if you choose to).

gnott commented 5 years ago

I will go ahead and merge with the latest commit included, to allow me to progress in the next project.