bids-specification icon indicating copy to clipboard operation
bids-specification copied to clipboard

Clarify that age Units could be overriden + that type is number OR "89+" string

Open yarikoptic opened this issue 10 months ago • 1 comments

Ultimately closes https://github.com/bids-standard/bids-specification/issues/1633

FWIW here is what I see among openneuro datasets ATM

$> for j in ds*/participants.json; do jq '.age.Units' $j; done | sort | uniq -c
jq: error (at ds002873/participants.json:577): Cannot index array with string "age"
      2 "Measurement units. [<prefix symbol>]<unit symbol> format following the SI standard is RECOMMENDED"
    227 null
      1 "weeks"
    206 "years"
     21 "Years"
      2 "years old"
      1 "years (rounded down)"
      3 "Years, with one quantile precision"

and among examples

❯ for j in ds*/participants.json; do jq '.age.Units' $j; done | sort | uniq -c
      2 null
      7 "year"
      9 "years"

so nobody uses it really besides 1 "weeks". If we decide to go for it we need

  • [ ] extend list of units with "month", "week", "day", ...
  • [ ] see if / how we could adjust validation rules in the schema (attn @effigies as guided me on #1633)

yarikoptic avatar Apr 17 '24 15:04 yarikoptic

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.93%. Comparing base (37b11ec) to head (a9d3f28).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1791   +/-   ##
=======================================
  Coverage   87.93%   87.93%           
=======================================
  Files          16       16           
  Lines        1351     1351           
=======================================
  Hits         1188     1188           
  Misses        163      163           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 17 '24 15:04 codecov[bot]