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

Added some docs and adjusted field names for ease of use in DocDetails #440

Merged
merged 8 commits into from
Sep 19, 2024

Conversation

whitead
Copy link
Collaborator

@whitead whitead commented Sep 19, 2024

Just promoted some fields I thought were useful: license and pdf_url. These can be provided by S2 client at some point, but for now they come from unpaywall.

Also added to README: https://github.com/Future-House/paper-qa/tree/doc-details-docs?tab=readme-ov-file#using-clients-directly

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Sep 19, 2024
@whitead whitead requested review from jamesbraza and mskarlin and removed request for jamesbraza September 19, 2024 05:47
@dosubot dosubot bot added the documentation Improvements or additions to documentation label Sep 19, 2024
description="string indicating license."
" Should refer specifically to pdf_url (since that could be preprint). None means unknown/unset.",
)
pdf_url: str | None = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think of calling this source_url over pdf_url, as we'll someday generalize beyond PDFs

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think doi_url should cover the HTML/WEB url and pdf_url should directly go to PDF. We may later add source_url and then I think doi_url would be depcretaed rather than pdf_url

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds good

paperqa/types.py Outdated Show resolved Hide resolved
)
if self.source_quality_str:
return (
f"{self.citation} This article has {self.citation_count} citations and is"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does self.citation have a newline at the end of it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should not have that

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 19, 2024
README.md Show resolved Hide resolved
@whitead whitead enabled auto-merge (squash) September 19, 2024 06:02
@whitead whitead merged commit 4dba3dc into main Sep 19, 2024
5 checks passed
@whitead whitead deleted the doc-details-docs branch September 19, 2024 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants