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

Improve/correct unit validation in schema #999

Open
tsalo opened this issue Feb 3, 2022 · 0 comments
Open

Improve/correct unit validation in schema #999

tsalo opened this issue Feb 3, 2022 · 0 comments
Labels
bug Something isn't working schema Issues related to the YAML schema representation of the specification. Patch version release. units

Comments

@tsalo
Copy link
Member

tsalo commented Feb 3, 2022

Once #885 is merged, value formats will validated (or at least validate-able) by the schema. However, the unit format will allow any string, which does not match the actual description of valid unit values.

From @yarikoptic:

I thought we had discussion and there was a decision on some unicodes to be ok (but not any), then with #411 CMIXF-12 ascii recommended. https://github.com/bids-standard/bids-specification/blob/HEAD/src/99-appendices/05-units.md mentions µ (could be only as prefix) Ω (only as suffix) and ° (all by itself?). So may be regex and test here could be made more stringent? well, aforementioned page gives example just as "NOT RECOMMENDED" instead of "WRONG": volts per microsecond so may be my whining is all in vein? But then I would restrict to composition of alphanumerics, space, - and those 3 unicodes, and thus disallow everything else.

This stems from #885 (comment).

@tsalo tsalo added bug Something isn't working schema Issues related to the YAML schema representation of the specification. Patch version release. labels Feb 3, 2022
@Remi-Gau Remi-Gau added the units label Sep 26, 2023
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. units
Projects
None yet
Development

No branches or pull requests

2 participants