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

Add regular expression jsons to be used by bids-validator and pybids #2

Open
tsalo opened this issue Aug 20, 2020 · 7 comments
Open

Comments

@tsalo
Copy link
Member

tsalo commented Aug 20, 2020

@rwblair has been working on using the new YAML files in the specification to build regular expressions to replace those currently in place in bids-validator. These regular expressions should also be useful for pybids. One idea we briefly talked about recently would be to either move the regex-generation code from bids-validator to here, or to push the generated regex jsons here while keeping the code in the bids-validator repo. In either case, both bids-validator and pybids could pull the jsons from this repository for their respective uses.

I have a couple of questions about this:

  1. @yarikoptic, does that fit with your plans for this repository? Basically, the schema itself would remain in bids-specification (at least for now), but several automatically-derived files, like these regex jsons, would live here.
  2. @rwblair, would you prefer to have the code here or just the generated files?
@rwblair
Copy link
Member

rwblair commented Aug 20, 2020

My current conversion code is all written in JS so dumping a node project in here feels dirty. If I ever covert it to python I'd be happy with it living in this workload, especially if this repo exposes different versions of the schemas across specification releases.

@tsalo
Copy link
Member Author

tsalo commented Aug 20, 2020

That makes sense. Python is probably the way to go for this repo, since so few BIDS folks (myself included) know JS. Thanks for clarifying!

@yarikoptic
Copy link
Collaborator

FWIW, I think minting regexes for legit filenames so they could be re-used by validators etc is a great starting point.
Probably should be JS/Python specific, so they would immediately include the group names for each entity, so they could be used not only for validation but for parsing as well.

@yarikoptic
Copy link
Collaborator

yarikoptic commented Feb 6, 2023

we already got jsonschema dump archived as schema.json right in the root of the copy. Anything else to go there?
I am on cross-roads on either to bother with subfolders. I feel like we better do, but then - what should they be, what about

  • source/ or yaml/ or bids-specification/ or orig/ or schema/? for original schema from bids-specification
  • jsonschema/? for that single ATM schema.json
  • what else?

@yarikoptic
Copy link
Collaborator

FWIW, taking an executive decision to make it schema/ , schema.json will go to the top level directory there nearby schema/

@yarikoptic
Copy link
Collaborator

FWIW, done as of 1f60004 . Check it out.

@yarikoptic
Copy link
Collaborator

@tsalo @rwblair should we keep this issue open?

I still would not object any other useful "extract" from the schema to accompany it here but indeed unclear if we have a clear utility/purpose here since regexes on their own would have only very limited utility but could still help to decide for tools on what is "legit" part of a bids dataset.

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

No branches or pull requests

3 participants