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

ENH: Better validation of info and subject_info #12875

Merged
merged 4 commits into from
Sep 26, 2024

Conversation

larsoner
Copy link
Member

Turns out it wasn't too hard to generalize the nice validation set up originally by @mscheltienne using a ValidatedDict class. In principle yes this could be done with something like pydantic but this would require a separate new dependency (which is a high bar for us) so this PR just refactors and reuses the existing Info logic instead.

Closes #12874

mne/_fiff/meas_info.py Outdated Show resolved Hide resolved
Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

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

nice !

@drammock drammock merged commit 5492174 into mne-tools:main Sep 26, 2024
28 checks passed
@drammock drammock deleted the validate branch September 26, 2024 20:41
Copy link
Member

@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.

Great work! Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: subject_info dict validation
4 participants