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

[SCHEMA] Add remaining enum definitions #1640

Merged
merged 11 commits into from
Nov 7, 2023

Conversation

sappelhoff
Copy link
Member

@sappelhoff sappelhoff commented Oct 26, 2023

specifically, I intend to add definitions for those "enums" that don't have one yet.

See @tsalo and my discussion here: #919 (comment)

  • add todo comments to enums that have not yet been worked on
  • address all todo comments that are deemed relevant
    • answer this questions: should we add definitions for something like this?
  type: string
  # TODO: Add definitions for these values.
  enum:
    - left
    - l
    - L
    - LEFT
    - Left

@sappelhoff sappelhoff added schema Issues related to the YAML schema representation of the specification. Patch version release. exclude-from-changelog This item will not feature in the automatically generated changelog labels Oct 26, 2023
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8dc5221) 87.83% compared to head (ff604e6) 87.97%.
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1640      +/-   ##
==========================================
+ Coverage   87.83%   87.97%   +0.14%     
==========================================
  Files          16       16              
  Lines        1356     1356              
==========================================
+ Hits         1191     1193       +2     
+ Misses        165      163       -2     

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sappelhoff
Copy link
Member Author

sappelhoff commented Oct 26, 2023

I think we don't have to add anything for:

  • units of length and time (m, nm, um, etc. and s, sec, etc.)
  • abbreviations for left/right/ambidextrous and male/female/other (L, left, LEFT, etc. and m, M etc.)

What do you think @effigies @Remi-Gau @tsalo ?

EDIT: If you clone my branch (this PR), you can search the repo (src/schema) for # TODO: Add definitions for these values. to get a good overview. The definitions that I think we should leave without entries in enums.yml have the appendix: (perhaps don't specify)

Copy link
Member Author

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

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

Okay, I have added all definitions that I think could potentially make sense to have.

That said, this doesn't mean that all the definitions I added are meaningful beyond what the "value" says. But that's up to add for people who work with this data -- with this PR we at least:

  • have added all sensible definitions and thus the infrastructure to improve the descriptions more easily (no more digging, just one search and edit the description)
  • have tracked the enums for which a definition would probably not make a lot of sense with inline comments (see [SCHEMA] Add remaining enum definitions #1640 (comment))

I'd be happy for input and for help solving the CI issue 🙂

@sappelhoff sappelhoff marked this pull request as ready for review October 26, 2023 13:01
src/schema/objects/columns.yaml Outdated Show resolved Hide resolved
src/schema/objects/metadata.yaml Show resolved Hide resolved
Copy link
Member Author

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

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

Thanks @effigies! what is your general take on this PR?

@effigies
Copy link
Collaborator

effigies commented Nov 4, 2023

Sorry, I don't have a general take. At this point I was just trying to get it working. Please bug me to think about this again next week.

@sappelhoff
Copy link
Member Author

Sorry, I don't have a general take. At this point I was just trying to get it working. Please bug me to think about this again next week.

cc @effigies

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.

This seems fine as-is. I don't think we need to define meter, mm and cm and mass replace those. I think the ultimate end-point of these would be to turn this into an actual ontology, with relationships between fields and values, and we need to be careful about reinventing wheels. The more we elaborate the schema, the more we're going to need to reconsider our "lightweight" custom approach versus some existing effort.

Not sure if you're looking for anything more specific in a general take.

@sappelhoff sappelhoff merged commit 3ea6132 into bids-standard:master Nov 7, 2023
26 checks passed
@sappelhoff sappelhoff deleted the enum_schema branch November 7, 2023 14:55
@sappelhoff
Copy link
Member Author

Thanks @effigies that's the granularity I was expecting for the take I asked for 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude-from-changelog This item will not feature in the automatically generated changelog 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.

2 participants