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

Bids translator - fix name & license reporting #286

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

mslw
Copy link
Collaborator

@mslw mslw commented Apr 13, 2023

In BIDS 1.8.0 and earlier, dataset_description.json has "Name" and "License" keys, and both fields are strings. The bids_dataset extractor from datalad-neuroimaging keeps these key names.

This PR fixes the field lookup, and also includes the license in the translated output.

The change also lets the extractor add license url for "PDDL" and "CC0" (the two are named explicitly in bids spec, others are allowed but at least we give the two a chance to get translated with a proper URL).

In BIDS 1.8.0 and earlier, dataset_description.json has "Name" and
"License" keys, and both fields are strings. The bids_dataset
extractor from datalad-neuroimaging (looking at current master) keeps
these keys.

The change also includes the license in the translated output.
Only covers "PDDL" and "CC0", the two licenses named explicitly with
urls in the BIDS v1.8.0 spec.

BIDS spec lists those as examples (alongside PD, which has no link),
and anything else is possible, but at least we give the two a chance
to get translated with a proper URL -- dataset_description.json only
stores license name.
@codecov-commenter
Copy link

codecov-commenter commented Apr 13, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.08 ⚠️

Comparison is base (78592ee) 82.40% compared to head (140d12b) 82.32%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #286      +/-   ##
==========================================
- Coverage   82.40%   82.32%   -0.08%     
==========================================
  Files          32       32              
  Lines        2171     2173       +2     
==========================================
  Hits         1789     1789              
- Misses        382      384       +2     
Flag Coverage Δ
unittests 71.76% <0.00%> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
...lad_catalog/translators/bids_dataset_translator.py 48.05% <0.00%> (-1.29%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jsheunis
Copy link
Member

Thanks @mslw looks good to me!

@jsheunis jsheunis merged commit 2a295a8 into datalad:main Apr 18, 2023
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.

3 participants