-
Notifications
You must be signed in to change notification settings - Fork 382
Update API documentation for daily papers #2065
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
base: main
Are you sure you want to change the base?
Conversation
Add params documentation for /api/daily_papers
merveenoyan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot!
docs/hub/api.md
Outdated
|
|
||
| Other keywords that are supported: | ||
|
|
||
| 1. `limit` - the number of pages returned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as in length of the paper or number of papers returned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, yeah that's what it should say.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it
docs/hub/api.md
Outdated
| 1. `limit` - the number of pages returned | ||
| 2. `p` - the page number, for paging through results | ||
| 3. `submitter` - to filter by summitter | ||
| 4. `date`, `week`, `month` - for filtering by date range |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 4. `date`, `week`, `month` - for filtering by date range | |
| 4. `date`, `week`, `month` - for filtering by date range |
of the paper release dates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't create the API, and it's not clear to me from the openapi docs. It could be either the paper release date, or the day it was featured on Daily Papers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to DeepWiki
The date parameter refers to when the paper was included in the daily papers on the Hub, not when it was written or originally submitted to arXiv. hf_api.py:1527-1528
This is confirmed by the PaperInfo dataclass, which has two distinct date fields:
published_at: The date the paper was published (on arXiv) hf_api.py:1513-1514
submitted_at: The date the paper appeared in daily papers on the Hub hf_api.py:1527-1528|
I will update it according to that.
docs/hub/api.md
Outdated
| 2. `p` - the page number, for paging through results | ||
| 3. `submitter` - to filter by summitter | ||
| 4. `date`, `week`, `month` - for filtering by date range | ||
| 5. `sort` - to specify how results are sorted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how can they be sorted? by date or?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the openapi docs:
sortCopy link to sort
enum
default:
"publishedAt"
publishedAt
trending
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated this as well
docs/hub/api.md
Outdated
|
|
||
| Search the daily papers by keyword: | ||
|
|
||
| 1. `q` - the keyword to search |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems standalone so no need to number I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
Co-authored-by: Merve Noyan <merve@huggingface.co>
Clarify the default sorting behavior and options for the API.
Clarified filtering parameters for date and sorting in API documentation.
merveenoyan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm but would like @AK391 to review too just in case
Co-authored-by: Merve Noyan <merve@huggingface.co>
Co-authored-by: Merve Noyan <merve@huggingface.co>
This PR documents the parameters for the
/api/daily_papers.This is just a first quick pass. Let me know if you'll take a PR to improve these docs, and any clean-up or edits you'd like me to do.
Thanks @AK391 for pointing me to these docs.