Skip to content

Commit

Permalink
ENH: introduce versioning of the schema itself (#1013)
Browse files Browse the repository at this point in the history
* ENH: introduce versioning of the schema itself

Note -- it is not a version of the content of the schema, it is
a version over organization of the schema (e.g. we could add some
schema to describe how schema is organized).

The 'desire' for having a version over the BIDS schema's version
is somewhat described in README.md in added section.  Just to facilitate
tools to know what versions of bids schema they can read without explicitly
whitelisting BIDS versions themselves.

* Adding versioning for after 1.0.0

I thought we had it but managed to screw it up during rebase. Thanks @sappelhoff

Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>

* line breaks

Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
yarikoptic and sappelhoff authored Apr 13, 2022
1 parent 1909cac commit 1379ab0
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/schema/README.md
Original file line number Diff line number Diff line change
@@ -498,3 +498,22 @@ In cases where there is a data file and a metadata file, the `.json` extension f

This file contains a dictionary in which each key is a directory and the value is a dictionary with one key: `required`.
The `required` entry contains a boolean value to indicate if that directory is required for BIDS datasets or not.

## Version of the schema

File `SCHEMA_VERSION` in the top of the directory contains a semantic
version (`MAJOR.MINOR.PATCH`) for the schema (how it is organized).
Note that while in `0.` series, breaking changes are
permitted without changing the `MAJOR` (leading) component of the version.
Going forward, the 2nd, `MINOR` indicator should be
incremented whenever schema organization introduces "breaking changes":
changes which would cause existing tools reading schema to
adjust their code to be able to read it again.
Additions of new components to the schema should increment the last,
`PATCH`, component of the version so that tools could selectively
enable/disable loading specific components of the schema.
With the release of `1.0.0` version of the schema,
we expect that the `MAJOR` component
will be incremented whenever schema organization introduces "breaking changes",
`MINOR` - when adding new components to the schema,
and `PATCH` - when fixing errors in existing components.
1 change: 1 addition & 0 deletions src/schema/SCHEMA_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0

0 comments on commit 1379ab0

Please sign in to comment.