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

doi_common.get author details (not get_doi_record) #112

Open
virginiascarlett opened this issue Oct 22, 2024 · 2 comments
Open

doi_common.get author details (not get_doi_record) #112

virginiascarlett opened this issue Oct 22, 2024 · 2 comments
Assignees

Comments

@virginiascarlett
Copy link
Collaborator

I've discovered why I am invoking this with the doi collection as the second argument. Because using the orcid collection or leaving it blank throws an error. Not sure if this is just a documentation issue or a functionality issue.Image

@robsv
Copy link
Contributor

robsv commented Oct 22, 2024

Yesterday we were looking at get_author_details, which takes as input the dois collection record, and an optional collection object for the orcid collection.
get_doi_record takes as input the DOI and the collection object for the dois collection

(venv) svirskasr@svirskasr-lm10 bin % python3
Python 3.10.15 (main, Sep 7 2024, 00:20:06) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from operator import attrgetter
import jrc_common.jrc_common as JRC
import doi_common.doi_common as DL
dbconfig = JRC.get_config("databases")
dbo = attrgetter("dis.prod.read")(dbconfig)
DB = {'dis': JRC.connect_database(dbo)}
rec = DL.get_doi_record('10.1007/s12264-024-01253-8', DB['dis']['dois'])
print(DL.get_author_details(rec, DB['dis']['orcid']))
[{'paper_orcid': '0000-0002-3457-4462', 'family': 'Ahrens', 'given': 'Misha B.', 'is_first': True, 'is_last': True, 'orcid': '0000-0002-3457-4462', 'in_database': True, 'janelian': True, 'asserted': False, 'alumni': False, 'validated': True, 'match': 'ORCID', 'group': 'Misha Ahrens Lab', 'group_code': '093327', 'tags': ['CellMap', 'Misha Ahrens Lab'], 'employeeId': '49301', 'userIdO365': '[email protected]'}]

@virginiascarlett virginiascarlett changed the title doi_common.get_doi_record issue doi_common.get author details (not get_doi_record) Oct 23, 2024
@virginiascarlett
Copy link
Collaborator Author

Assigning this to myself. get_doi_record works fine--that was my mistake. I will try out get_author_details on a test case: someone who has an orcid but it's not on the paper. Once I confirm that get_author_details(doi_rec, orcid coll) won't muck up this test case, then I'll invoke it that way in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants