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

[SCHEMA] make schemacode into bids-schema (bids_schema pkg) #965

Open
yarikoptic opened this issue Jan 6, 2022 · 2 comments
Open

[SCHEMA] make schemacode into bids-schema (bids_schema pkg) #965

yarikoptic opened this issue Jan 6, 2022 · 2 comments
Labels
schema Issues related to the YAML schema representation of the specification. Patch version release.

Comments

@yarikoptic
Copy link
Collaborator

#892 made the main work to detach schema handling code into an installable python package.

https://github.com/bids-standard/bids-specification/pull/892/files#diff-fca7304d24a5898ab105cce4ccd5a21761e7673dbeccb692b65bc6cddef9eee7R3 lists https://github.com/bids-standard/schemacode and setup.py https://github.com/bids-standard/bids-specification/pull/892/files#diff-a2a4329d57cbccf54036da2be45bf77cf3059065fb0e856244f86d05394e3082R17 lists it as `"schemacode" .

I think eventually, whenever this code matures to leave the mothership of the bids-specification, its name should become globally unique. And even before the detachment from this repo, it would be nice to have a copy deposited to PyPI while building/releasing straight from this repo (with its own versioning in 0.x.y series while it matures, independently from bids-specification, so versioneer might need to be gone to replaced). Upload to PyPI would require the name to be unique. So I am proposing to rename the beast into bids_schema package (but for PyPI to make it prettier, could be bids-schema name). Then whoever wants to use that as a library would be able to do so.

Attn @TheChymera

@tsalo tsalo added the schema Issues related to the YAML schema representation of the specification. Patch version release. label Jan 6, 2022
@TheChymera
Copy link
Collaborator

@yarikoptic
Set up this repo to try out full separation and allow easier management of schema PRs without having to keep track of full bids-specification repository history and merge conflicts:
https://github.com/TheChymera/bids-schemadata

@TheChymera
Copy link
Collaborator

TheChymera commented May 31, 2022

Following up on this:

With the addition of the validator XS code which checks for readability and may also be loaded by external tools needing a simple officially working backend, probably simply splitting off the schema in and of itself is not such a great idea as I had originally thought.

I have experimented a bit and the schemacode package works well on its own, and given access to a linux package manager (in my example, Gentoo) it can easily if not very elegantly be distributed as such with zero changes to the current codebase: TheChymera/overlay@ae712deinstalled files.

The follow-up issues I am thinking of are:

  1. since this is schema with testcode, perhaps changing the name to bids_schemacode (@yarikoptic 's suggestion) is a good idea. This should be easy to sort out, just let me know if you agree and I can make a PR.
  2. revising (though this might be more like additional stress-testing, since this issue came up in development) the code so that the schema shipped with bids_schemacode is used as a fallback via the relative path, and compatible versions as specified via BIDSVersion can be selected from an archive provided by a second package, perhaps bids-schema.
  3. How (or whether at all) this could be shoehorned into PIP. The issue here is that being YAML, ideally being downstream programming language agnostic, and having no need for the user to write to them, the files belonging to bids-schema might be better put under a system-wide application data directory, such as /usr/share/bids-schema. This is of course easy to do with a fully-featured package manager, and probably Yaro can set this up on Debian as easily as I on Gentoo... but what about users who use neither?

@tsalo

@Remi-Gau Remi-Gau self-assigned this May 21, 2023
@Remi-Gau Remi-Gau removed their assignment Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
schema Issues related to the YAML schema representation of the specification. Patch version release.
Projects
None yet
Development

No branches or pull requests

4 participants