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

Script to get bibliography for (all) dandisets (prototype) #1449

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

yarikoptic
Copy link
Member

a follow up to @bendichter 's

I think this is a viable prototype with some TODOs (provided in the script) for us to collate/update an ultimate DANDI bibliography (as bibtex). WDYT?

Also includes the dandi.bib which script produced.

Related:



# DANDISET 000029
<!DOCTYPE html>
Copy link
Member Author

Choose a reason for hiding this comment

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

Ho ho -- we might be identifying problems for dandisets where we have releases and DOI minting has failed! someone might need to look into that!

Copy link
Member Author

Choose a reason for hiding this comment

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

sandbox/get-bibliography Fixed Show fixed Hide fixed
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.65%. Comparing base (59f5da0) to head (75cd517).
Report is 71 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1449      +/-   ##
==========================================
+ Coverage   88.47%   88.65%   +0.18%     
==========================================
  Files          77       78       +1     
  Lines       10518    10589      +71     
==========================================
+ Hits         9306     9388      +82     
+ Misses       1212     1201      -11     
Flag Coverage Δ
unittests 88.65% <ø> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

url = {https://dandiarchive.org/dandiset/000404/0.230605.2024},
author = {Athalye, Vivek R and Khanna, Preeya and Gowda, Suraj and Orsborn, Amy L and Costa, Rui M and Carmena, Jose M},
keywords = {neural population dynamics, motor cortex, motor control, brain-machine interface, neuroprosthetics, optimal feedback control, motor commands, movement representations, dynamical systems},
title = {Monkey 2D cursor BMI},
Copy link
Member Author

Choose a reason for hiding this comment

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

apparently data.crosscite.org is not doing that great of a job here -- for BibTeX it ideally should have made it into

Suggested change
title = {Monkey 2D cursor BMI},
title = {Monkey {2D} cursor {BMI}},

to prevent LaTeX lower casing them... now we just need to figure out where is that code to file a complaint :-/

Copy link
Member Author

Choose a reason for hiding this comment

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

the easiest of cause IIRC is just to double {} it ie

Suggested change
title = {Monkey 2D cursor BMI},
title = {{Monkey 2D cursor BMI}},

and in principle we could do that ourselves here after someone confirms that my concern here is correct

attn @TheChymera as who might know and @bendichter as who might care ;-)

Comment on lines +45 to +46
# for dandiset in [{'identifier': '000027', 'most_recent_published_version':
# {'version': '0.210831.2033'}}]:

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

# OUTPUT BibTeX
try:
out = open(args.bibtex, "w") if args.bibtex else sys.stdout

Check warning

Code scanning / CodeQL

File is not always closed Warning

File is opened but is not closed.
datacite_records = []
for m in metadata_records:
try:
datacite_record = to_datacite(m)

Check failure

Code scanning / CodeQL

Potentially uninitialized local variable Error

Local variable 'to_datacite' may be used before it is initialized.
try:
datacite_record = to_datacite(m)
try:
validate_datacite(datacite_record)

Check failure

Code scanning / CodeQL

Potentially uninitialized local variable Error

Local variable 'validate_datacite' may be used before it is initialized.
datacite_record = to_datacite(m)
try:
validate_datacite(datacite_record)
except JSONValidationError as exc:

Check failure

Code scanning / CodeQL

Potentially uninitialized local variable Error

Local variable 'JSONValidationError' may be used before it is initialized.
"schema_path": list(exc.schema_path),
}
datacite_errors[m["identifier"]].append(error_rec)
except ValidationError as exc:

Check failure

Code scanning / CodeQL

Potentially uninitialized local variable Error

Local variable 'ValidationError' may be used before it is initialized.
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

Successfully merging this pull request may close these issues.

1 participant