-
Notifications
You must be signed in to change notification settings - Fork 5
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
A fix to processing entries for zenodo, print ORCID URL in interactive mode, perform some internal code refactorings #78
Conversation
So instead of INFO:github:Alejandro de la Vega: found more than 1 result, run with --interactive mode to select. INFO:github:Alejandro de la Vega: found more than 1 result, run with --interactive mode to select. INFO:github:Alejandro de la Vega: found more than 1 result, run with --interactive mode to select. we get INFO:github:Alejandro de la Vega: found more than 1 (186) result for ORCID search by name, run with --interactive mode to select. INFO:github:Alejandro de la Vega: found more than 1 (1000) result for ORCID search by name without middle, run with --interactive mode to select. INFO:github:Alejandro de la Vega: found more than 1 (1000) result for ORCID search full name, run with --interactive mode to select. (disregard that there is no middle name here... separate issue)
I think it does not change any result but IMHO should be more Kosher
…not orcid_id" conditioning
…o ease checking full record
…: just use min) Without this fix I could not enter the last choice index
It now should work also disregarding explicitly specified to be null or empty ORCID entries or values for name or affiliation which people might explicitly white out in a specific case. Before it was solely based on the presence of the key and I think making it more value based would be more robust. Also dictionary comprehension for lookup generation should be easier to read IMHO, and the code simplifications/reduction of [][] lookups also should be making it easier to read. Also may be it is just an anecdotal evidence and just coincided, but with this code we got one more affiliation assigned in datalad case right after prior run http://github.com/datalad/datalad/commit/ffc008b67c0596c16dadd7daeb58204a010ece74
tributors/main/orcid.py
Outdated
@@ -129,7 +130,7 @@ def get_orcid_token(): | |||
return orcid_token | |||
|
|||
|
|||
def record_search(url, email, interactive=False): | |||
def record_search(url, email, interactive=False, how=""): |
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 can tell what "how" is based on reading below how the functions are using it - can we use a more descriptive label here, like search type, and document this in the docstring so it's clear the string is just for informational purposes and doesn't derive any logic?
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.
done in c76a90a
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.
If you’ve tested this and are happy, LGTM. Last final tweak is to please bump the version and update the CHANGELOG.md with a description of your fixes. Thank you!
I have merged #74, so hopefully it all would just get released when we merge it. I added |
Hmm that approach seems super complex compared to what I usually do, but if you are managing it I’m indifferent. LGTM merge and release as you like. |
Initial setup is indeed a bit "complex" but whenever it works - it can't be simpler, just
|
One commit addresses #77 (has proper Closes). Individual commits have description on the changes so best to review one commit at a time.