-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fetch BIDS information from schema #34
Conversation
return entity_schema["name"], Optional[type_], field_ | ||
|
||
|
||
BIDSEntities: Any = make_dataclass( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BIDSEntities: Any = make_dataclass( | |
BIDSEntities: type = make_dataclass( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had it like this, but mypy does not like it at all (results in everything being flagged missing-attr). There is an open issue: python/mypy#6063
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool...
Co-authored-by: Chris Markiewicz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these need to be reverted now?
This PR makes bids2table fetch BIDS entity definitions and BIDS datatypes from the official BIDS schema.
This will ensure bids2table is always up-to-date and does not need to be changed when the schema changes.
Custom schema definitions can be injected via
bids2table.entities.set_bids_schema_path(...)
.See also ohbm/hackathon2024#22
@effigies
Note:run
(incorrectly) was an integer before - hence certain changes in the tests.