-
Notifications
You must be signed in to change notification settings - Fork 7
fix arxiv_id bug in ingest_publication #124
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
Conversation
Is there an associated ticket with the bug? Just wondering if there is an explicit example and any additional notes/information. |
In addition to the arxix_id bug, I was also responding to Ruff letting me know the function was too complex. |
) | ||
return | ||
|
||
if reference and not bibcode and not doi: |
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.
In general, I recommend if statements be explicit unless they are booleans already. Neither reference, bibcode, or doi are booleans so you would want to use things like if reference is not None
instead of just if reference
name_add = reference | ||
using = f"ref: {reference} user input. No bibcode or DOI provided." | ||
|
||
if ignore_ads is False and check_ads_token() is False: |
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.
Here, I would have done the opposite since these are booleans: if not ignore_ads and not check_ads_token()
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.
Approving this for now, but I think more could be done to clean this up.
fixes bug in
ingest_publication
when only an arxiv-id was provided. Adds relevant tests.