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

ENH: adopt sanitize_value from dandi-cli and use for sanitization of identifier #175

Merged
merged 3 commits into from
Aug 13, 2024

Conversation

yarikoptic
Copy link
Member

@yarikoptic yarikoptic commented Apr 6, 2023

Closes #172 as empirically shown

@satra do you see a quick way to add a test?

TODO

  • compare to current (time has passed; 0.63.0-2-g5faa18a4) normalization in dandi-cli
  • after release - adjust dandi-cli to use this normalization implementation

@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.75%. Comparing base (1110194) to head (03748b9).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #175      +/-   ##
==========================================
+ Coverage   97.74%   97.75%   +0.01%     
==========================================
  Files          16       16              
  Lines        1727     1739      +12     
==========================================
+ Hits         1688     1700      +12     
  Misses         39       39              
Flag Coverage Δ
unittests 97.75% <100.00%> (+0.01%) ⬆️

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.

@satra
Copy link
Member

satra commented Apr 6, 2023

you could use an asset in the tests directory and change the "path" key and subject identifier keys to make the aggregate function raise that assertion you put.

@yarikoptic
Copy link
Member Author

I didn't add assertion in this PR. In this PR such assertion would not be appropriate since code would still allow for multiple subjects from a single path.

@satra
Copy link
Member

satra commented Apr 6, 2023

you could manually assert in the test.

@yarikoptic yarikoptic added the patch Increment the patch version when merged label Apr 17, 2023
@yarikoptic
Copy link
Member Author

you could manually assert in the test.

well, all tests assert "manually", the question what and in which test.... well -- since confirmed empirically, just feel free to either merge as is, or extend with the test as you see fit.

@satra
Copy link
Member

satra commented Apr 11, 2024

@yarikoptic - this needs to be updated and merged for #172

dandischema/utils.py Outdated Show resolved Hide resolved
@yarikoptic yarikoptic merged commit 6fc16b8 into master Aug 13, 2024
76 checks passed
@yarikoptic yarikoptic deleted the enh-sanitize-value branch August 13, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect summaries (at least number of subjects) in some dandisets
2 participants