-
Notifications
You must be signed in to change notification settings - Fork 33
Add HINT validation result for dandiset.yaml in both validate and upload commands #1741
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1741 +/- ##
=======================================
Coverage 75.08% 75.09%
=======================================
Files 84 84
Lines 11910 11920 +10
=======================================
+ Hits 8943 8951 +8
- Misses 2967 2969 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
When BIDS validator encounters dandiset.yaml (not part of BIDS spec), now: - Keeps the existing ERROR about the file not matching BIDS patterns - Adds a new HINT level validation result suggesting to create/update .bidsignore Includes test to verify both ERROR and HINT are generated Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com>
5d5dd81 to
957da04
Compare
|
@yarikoptic I don't get the point of this or #1740. If we don't want the problem with |
|
We don't want to "cheat" bids validator, so if people run it directly they get the same result. AI we want to instruct for to mitigate that error consistently |
|
Tested against dandiset 001442 (chosen because it is a smallish BIDS dataset, though lots of validation noise). The PR works as described - the IMO this is fine, the HINT probably will be easier to understand for unfamiliar users, even though the duplication and extra noise are somewhat undesirable. trimmed raw output: master branchtrimmed output: PR branchDiff between master and branch5a6,7
> [DANDI.BIDSIGNORE_DANDISET_YAML] /home/austin/devel/dandi-cli/001442 — Consider creating or updating a `.bidsignore` file in the root of your BIDS dataset to ignore `dandiset.yaml`. Add the following line to `.bidsignore`:
> dandiset.yaml |
candleindark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposed some changes.
Additionally, if we want this custom validation hint to show up in the dandi upload command as well, we need to move this logic to an earlier point the in the calling process. The current setup only affect dandi validate not dandi upload where the issue was originally reported at #1734 (comment).
|
per discussion with @candleindark the issuing of HINT should be done deeper inside where we validate BIDS datatasets so we effect also |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
@copilot also please address now failing tests |
- Moved dandiset.yaml HINT logic from validate() to _harmonize() in bids_validator_deno - This ensures HINT appears for both 'dandi validate' and 'dandi upload' commands - Removed modification of original BIDS error message (preserving original error) - Updated test to not expect modified error message - All 101 validation tests passing Co-authored-by: yarikoptic <39889+yarikoptic@users.noreply.github.com>
Fixed failing tests (commit bbe7870). The test was expecting the modified error message, but per review feedback we now preserve the original BIDS error. Updated test to not check for the modified message. All 101 validation tests now passing.
Moved HINT generation logic to |
When BIDS validator encounters
dandiset.yaml(not part of BIDS spec), users now receive both the original ERROR from BIDS validator and a HINT suggesting to add the file to.bidsignore. The HINT is generated at the BIDS validator level, ensuring it appears in bothdandi validateanddandi uploadcommands.Changes
dandi/bids_validator_deno/_validator.py
_harmonize()function after processing each dandiset.yaml errorDANDI.BIDSIGNORE_DANDISET_YAML, severity:Severity.HINT, scope:DATASET.bidsignoredandi/tests/test_validate.py
test_validate_bids()to verify both ERROR and HINT are generatedExample Output
Impact
The HINT now appears in both
dandi validateanddandi uploadcommands, providing consistent guidance to users regardless of which command they use.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.