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

validate: resolved issues with relative path input #1260

Merged
merged 3 commits into from
Apr 7, 2023
Merged

Conversation

TheChymera
Copy link
Contributor

This is what could happen before this:

(dev) [deco]~/src/bids-examples/asl003 ❱ dandi validate .
2023-04-03 12:43:56,852 [    INFO] Note: NumExpr detected 12 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
2023-04-03 12:43:56,852 [    INFO] NumExpr defaulting to 8 threads.
2023-04-03 12:43:58,230 [    INFO] Logs saved in /home/chymera/.cache/dandi-cli/log/20230403164355Z-7402.log
Error: Path '.' is not inside Dandiset path '/home/chymera/src/bids-examples/asl003'

@codecov
Copy link

codecov bot commented Apr 3, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (eef8443) 88.99% compared to head (4086377) 88.99%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1260   +/-   ##
=======================================
  Coverage   88.99%   88.99%           
=======================================
  Files          76       76           
  Lines        9784     9789    +5     
=======================================
+ Hits         8707     8712    +5     
  Misses       1077     1077           
Flag Coverage Δ
unittests 88.99% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
dandi/tests/test_validate.py 85.71% <100.00%> (+1.09%) ⬆️
dandi/validate.py 97.82% <100.00%> (+0.04%) ⬆️

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.

dandi/validate.py Outdated Show resolved Hide resolved
@TheChymera TheChymera marked this pull request as ready for review April 6, 2023 06:09
@TheChymera
Copy link
Contributor Author

@jwodder incorporated your change. Can we merge now?

@yarikoptic
Copy link
Member

yarikoptic commented Apr 6, 2023

please add a test which does just what you did to demonstrate the issue -- runs validate . and produces expected results and doesn't fail. Can just extend some existing test with that.

grep for monkeypatch.chdir to see how to temporarily chdir to run that invocation.

Otherwise, without a test, there is no guarantee that we would not "fix it back" some time. Starting a fix with a reproducer test is a good habbit to have IMHO.

TheChymera and others added 2 commits April 6, 2023 21:53
Co-authored-by: John T. Wodder II <jwodder@users.noreply.github.com>
@TheChymera
Copy link
Contributor Author

@yarikoptic done.

@yarikoptic yarikoptic added the patch Increment the patch version when merged label Apr 7, 2023
@yarikoptic yarikoptic changed the title Resolved issues with relative path input validate: resolved issues with relative path input Apr 7, 2023
@yarikoptic yarikoptic merged commit a05a0ff into master Apr 7, 2023
@yarikoptic yarikoptic deleted the validate_fix branch April 7, 2023 11:08
@github-actions
Copy link

🚀 PR was released in 0.53.0 🚀

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 released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants