Skip to content

Conversation

@tsalo
Copy link
Member

@tsalo tsalo commented Oct 27, 2025

Closes #2234.

Changes proposed:

  • Instead of directly comparing fields that can either be floats or arrays to a single value, take the max of the field. This assumes that max(float) will return the float. The checks I modified are PostLabelingDelayGreater, BolusCutOffDelayTimeGreater, LabelingDurationGreater, and EchoTimeGreaterThan.

@tsalo tsalo added bug Something isn't working schema Issues related to the YAML schema representation of the specification. Patch version release. labels Oct 27, 2025
@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.71%. Comparing base (d62a5d2) to head (d76c8b9).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2235   +/-   ##
=======================================
  Coverage   82.71%   82.71%           
=======================================
  Files          20       20           
  Lines        1608     1608           
=======================================
  Hits         1330     1330           
  Misses        278      278           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

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

I agree. Can you base this on maint/1.10.1 so that we can cut a patched schema release?

@effigies effigies requested a review from rwblair October 27, 2025 15:27
@tsalo tsalo changed the base branch from master to maint/1.10.1 October 27, 2025 15:28
@tsalo tsalo changed the base branch from maint/1.10.1 to master October 27, 2025 15:29
@tsalo tsalo changed the base branch from master to maint/1.10.1 October 27, 2025 15:36
@tsalo tsalo changed the title Use max of float-or-array fields for checks. Use max of float-or-array fields for ASL metadata checks Oct 27, 2025
@tsalo
Copy link
Member Author

tsalo commented Oct 27, 2025

I'm happy to add explicit tests for max(float). I think the right place is schema/meta/expression_tests.yaml, but please correct me if I'm wrong.

@effigies
Copy link
Collaborator

Searching through objects.metadata for anyOf:\n.*type: number:

  • BolusCutoffDelayTime
  • EchoTime
  • FlipAngle
  • FrequencyOffset
  • HeadCoilFrequency
  • LabelingDuration
  • NumberShots
  • PharmaceuticalDoseAmount
  • PharmaceuticalDoseTime
  • PostLabelingDelay
  • ReceiveGain
  • ReconFilterSize
  • RepetitionTimePreparation
  • SpectrometerFrequency
  • VascularCrushingVENC

Would be good to grep for any numeric comparisons for each of these to see if we should wrap them in min/max. At least some EchoTime ones already check for type(EchoTime), so we don't need to rewrite those.

@tsalo tsalo changed the title Use max of float-or-array fields for ASL metadata checks fix: Use max of float-or-array fields for ASL metadata checks Oct 27, 2025
@tsalo
Copy link
Member Author

tsalo commented Oct 27, 2025

I just searched for each of those in the rules/checks/ folder and caught one EchoTime check, but that's it.

@tsalo tsalo changed the title fix: Use max of float-or-array fields for ASL metadata checks fix: Use max of float-or-array fields for numerical metadata checks Oct 27, 2025
@effigies
Copy link
Collaborator

@effigies
Copy link
Collaborator

@tsalo is this ready for review?

@tsalo tsalo marked this pull request as ready for review October 28, 2025 17:59
@tsalo tsalo requested a review from erdalkaraca as a code owner October 28, 2025 17:59
@tsalo
Copy link
Member Author

tsalo commented Oct 28, 2025

It is.

@effigies effigies merged commit 8459602 into bids-standard:maint/1.10.1 Oct 28, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working schema Issues related to the YAML schema representation of the specification. Patch version release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Issues with rules.checks.asl

2 participants