Skip to content

Handle new exit behavior and validation result of the BIDS validator#1644

Merged
yarikoptic merged 5 commits intodandi:masterfrom
candleindark:update-bids-validator
May 30, 2025
Merged

Handle new exit behavior and validation result of the BIDS validator#1644
yarikoptic merged 5 commits intodandi:masterfrom
candleindark:update-bids-validator

Conversation

@candleindark
Copy link
Member

@candleindark candleindark commented May 27, 2025

BIDS validator has new exit behavior and a slightly different validation result output in 2.0.6, this commit put in changes that handles the new behavior and the output correctly. For info about the new return behavior, check out bids-standard/bids-validator#196. The change in the validation output is the age field in SubjectMetadata is now an decimal number instead of an integer.

This PR closes #1626 and undoes the temporary fix provided by #1642.

Additionally, this PR also includes some minor refactoring of the models defined in dandi/bids_validator_deno/_validator.py. Please see the individual commit for details.

@codecov
Copy link

codecov bot commented May 27, 2025

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.82%. Comparing base (444e8b4) to head (e5cb294).
⚠️ Report is 102 commits behind head on master.

Files with missing lines Patch % Lines
dandi/bids_validator_deno/_validator.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1644      +/-   ##
==========================================
+ Coverage   88.75%   88.82%   +0.07%     
==========================================
  Files          82       82              
  Lines       11438    11440       +2     
==========================================
+ Hits        10152    10162      +10     
+ Misses       1286     1278       -8     
Flag Coverage Δ
unittests 88.82% <92.85%> (+0.07%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@candleindark candleindark changed the title Handle new return behavior of BIDS validator Handle new exit behavior and validation result of BIDS validator May 27, 2025
@candleindark candleindark changed the title Handle new exit behavior and validation result of BIDS validator Handle new exit behavior and validation result of the BIDS validator May 27, 2025
@candleindark candleindark force-pushed the update-bids-validator branch from 093b7d2 to 1f399f7 Compare May 27, 2025 21:43
@candleindark candleindark requested a review from Copilot May 27, 2025 21:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the BIDS validator integration to handle new exit behaviors and output changes introduced in version 2.0.6, including updated error handling and a change in the type of the age field.

  • Tests now parameterize expected exit codes and error messages based on the validator version.
  • The validator module conditionally checks exit codes and stderr based on the version.
  • The models have been refactored to use a shared base model and update the age field type.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
dandi/tests/test_bids_validator_deno/test_validator.py Adjusted test parameters based on validator version changes
dandi/bids_validator_deno/_validator.py Added version-specific checks for error conditions
dandi/bids_validator_deno/_models.py Refactored models to use a base model and updated the age field type

@candleindark candleindark force-pushed the update-bids-validator branch from 1f399f7 to dfb4304 Compare May 27, 2025 21:51
@candleindark candleindark added the minor Increment the minor version when merged label May 27, 2025
BIDS validator has a new exit behavior in 2.0.6,
this commit put in changes that handles this
new behavior correctly. For info about the new
exit behavior, check out
bids-standard/bids-validator#196
The new version of BIDS validator, at 2.0.6,
returns `age` in `SubjectMetadata` as a float
@candleindark candleindark force-pushed the update-bids-validator branch from dfb4304 to e5cb294 Compare May 27, 2025 22:21
@candleindark candleindark marked this pull request as ready for review May 27, 2025 22:40
@candleindark
Copy link
Member Author

@CodyCBakerPhD I am requesting your review as well since I think you are familiar with the related code.

@candleindark candleindark added patch Increment the patch version when merged and removed minor Increment the minor version when merged labels May 28, 2025
@yarikoptic yarikoptic added the release Create a release when this pr is merged label May 30, 2025
@yarikoptic yarikoptic merged commit b50d1b8 into dandi:master May 30, 2025
31 checks passed
@github-actions
Copy link

🚀 PR was released in 0.69.2 🚀

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 release Create a release when this pr is merged released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle new exit behavior in deno-compiled BIDS validator

3 participants