datalad / datalad-catalog

Create a user-friendly data catalog from structured metadata
https://datalad-catalog.netlify.app
MIT License
14 stars 12 forks source link

Bids translator - fix name & license reporting #286

Closed mslw closed 1 year ago

mslw commented 1 year ago

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).

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -0.08 :warning:

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

Additional details and impacted files ```diff @@ 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%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/datalad/datalad-catalog/pull/286?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad) | Coverage Δ | | |---|---|---| | [...lad\_catalog/translators/bids\_dataset\_translator.py](https://codecov.io/gh/datalad/datalad-catalog/pull/286?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9jYXRhbG9nL3RyYW5zbGF0b3JzL2JpZHNfZGF0YXNldF90cmFuc2xhdG9yLnB5) | `48.05% <0.00%> (-1.29%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad)

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

jsheunis commented 1 year ago

Thanks @mslw looks good to me!