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

Bulk metadata ARXIVNG-332 #155

Merged
merged 9 commits into from
Apr 16, 2018
Merged

Bulk metadata ARXIVNG-332 #155

merged 9 commits into from
Apr 16, 2018

Conversation

JaimieMurdock
Copy link
Contributor

No description provided.

Copy link
Contributor

@erickpeirson erickpeirson left a comment

Choose a reason for hiding this comment

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

Fantastic! A couple of minor things in the docstring, but otherwise good to go (pending passing tests)


Parameters
----------
arxiv_id : str
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the docstring could use an update

def bulk_retrieve(self, document_ids: List[str]) -> Dict[str, DocMeta]:
"""
Retrieve metadata for an arXiv paper.

Copy link
Contributor

Choose a reason for hiding this comment

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

This one too :-)

) from e

if response.status_code not in \
[status.HTTP_200_OK, status.HTTP_206_PARTIAL_CONTENT]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Thinking out loud: what would actually happen if we got a 206? Would we risk not being able to deserialize the content?

Copy link
Contributor

Choose a reason for hiding this comment

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

In which case it would be handled below, I suppose

Copy link
Contributor

Choose a reason for hiding this comment

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

Also thinking out loud here: we should consider adding a parameter to cap the number of document_ids per request to the bulk_docmeta endpoint, similar to what id being done with bulk indexing.

Copy link
Contributor

@mhl10 mhl10 left a comment

Choose a reason for hiding this comment

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

Looks great!

@coveralls
Copy link

coveralls commented Apr 16, 2018

Coverage Status

Coverage decreased (-1.2%) to 83.962% when pulling 5618820 on task/ARXIVNG-332 into 05681ca on develop.

@JaimieMurdock JaimieMurdock merged commit 9b4b4f7 into develop Apr 16, 2018
@bmaltzan bmaltzan deleted the task/ARXIVNG-332 branch April 1, 2021 17:31
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.

4 participants