-
Notifications
You must be signed in to change notification settings - Fork 609
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
Convert citation to formatted_citation usage where necessary #666
Conversation
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.
Something is missing here - either DocDetails should not allow None
citation or Doc
should allow None
citation. Otherwise we have some weird stuff going on I think
good call -- defaulting to an empty string, which I think should be fine. |
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.
Are you able to add a test case for this? Seems niche and an easy place to cause a regression
) -> dict[str, Any]: | ||
if not data.get("journal"): | ||
doi = data.get("doi", "") or "" | ||
if "10.48550/" in doi or "ArXiv" in (data.get("other", {}) or {}).get( |
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.
Can we move this to an external module-level lookup of journal to base DOI?
We were using
Doc.citation
in our queries, which skipped the extra info from our journal quality and citation count metadata.