dandi / dandi-schema

Schemata for DANDI archive project
Apache License 2.0
7 stars 10 forks source link

Count only for the first hit for subject or tissue within filename #173

Open yarikoptic opened 1 year ago

yarikoptic commented 1 year ago

Also added assertion so we do not count incorrectly. But may be should be just a warning?

Closes #172

satra commented 1 year ago

i think this also requires line 302 replaced with the sanitize function from dandi-cli.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (b310e3e) 97.71% compared to head (d22ac9c) 97.72%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #173 +/- ## ======================================= Coverage 97.71% 97.72% ======================================= Files 17 17 Lines 1751 1755 +4 ======================================= + Hits 1711 1715 +4 Misses 40 40 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `97.72% <100.00%> (+<0.01%)` | :arrow_up: | 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=dandi#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/dandi/dandi-schema/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dandi) | Coverage Δ | | |---|---|---| | [dandischema/metadata.py](https://codecov.io/gh/dandi/dandi-schema/pull/173?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dandi#diff-ZGFuZGlzY2hlbWEvbWV0YWRhdGEucHk=) | `96.69% <100.00%> (+0.06%)` | :arrow_up: | 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=dandi). 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=dandi)

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

yarikoptic commented 1 year ago

i think this also requires line 302 replaced with the sanitize function from dandi-cli.

did you try that and it resolved #172? would better be done in a separate PR then since this one does resolve issue too

yarikoptic commented 1 year ago

i think this also requires line 302 replaced with the sanitize function from dandi-cli.

did you try that and it resolved #172? would better be done in a separate PR then since this one does resolve issue too

I tested, it does. Will submit a complimentary PR.

yarikoptic commented 1 year ago

@satra so what do you think about this one? It is complimentary to #175