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

Reorganize file_level_rules.json #1034

Closed
rwblair opened this issue Aug 3, 2020 · 1 comment
Closed

Reorganize file_level_rules.json #1034

rwblair opened this issue Aug 3, 2020 · 1 comment

Comments

@rwblair
Copy link
Member

rwblair commented Aug 3, 2020

Current implementation has lots of repeated regex. I was thinking along the lines of putting all the entities and their regex in an object. Then when defining valid file names we can just have a list of entities key names (and if they are required or optional) instead of the regex itself.

I think we could also provide better feed back on filename issues if we parsed the file extension first and selectively chose which rules to apply, and if it fails return information on whats required and optional. Doesn't look like there's a way to get the regex show you points of failure. One option would be to apply entity regex consecutively against a file name, and consume the entities as they match. This way we could find specifically which ones fail.

@rwblair
Copy link
Member Author

rwblair commented Aug 11, 2020

We should use these schema files to enforce required entities: bids-standard/bids-specification#475

@effigies effigies closed this as not planned Won't fix, can't repro, duplicate, stale Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants