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

[BUG]? Python bids-validator returns true on non-bids folder names #1821

Closed
bendhouseart opened this issue Oct 2, 2023 · 4 comments · Fixed by #1967
Closed

[BUG]? Python bids-validator returns true on non-bids folder names #1821

bendhouseart opened this issue Oct 2, 2023 · 4 comments · Fixed by #1967

Comments

@bendhouseart
Copy link
Contributor

Was playing around a bit last week and noticed that the python version of the validator seems to misclassify non-bids folder names as compliant.

See:

>>> from bids_validator import BIDSValidator
>>> validator = BIDSValidator()
>>> validator.is_bids('/sub_07/eeg/sub-07_task-matchingpennies_events.tsv')
True
>>>

Python and validator version(s):

Python 3.10.9 (main, Mar  1 2023, 12:20:14) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import bids_validator
>>> bids_validator.__version__
'1.12.0'
@effigies
Copy link
Collaborator

effigies commented Oct 2, 2023

I'm a little inclined to mark this wontfix. If you would like to do filename validation in Python, the bidsschematools validator is going to be better supported.

@effigies
Copy link
Collaborator

effigies commented Oct 2, 2023

Actually, I think the better fix is to depend on bidsschematools and write shims for the current API. We should strip the Python validator out of the JS validator repository and free up JS developers to reorganize without potentially breaking the Python packaging.

@sappelhoff
Copy link
Member

+1 to remove the python validator from the JS repo and potentially even deprecating it in favor of the new schema based python validator.

@effigies
Copy link
Collaborator

effigies commented May 6, 2024

This will be fixed with #1967

In [1]: from bids_validator import BIDSValidator

In [2]: BIDSValidator().is_bids('/sub_07/eeg/sub-07_task-matchingpennies_events.tsv')
Out[2]: False

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 a pull request may close this issue.

3 participants