CWorthy-ocean / C-Star

C-Star is a python package for setting up and running ocean model simulations, with a particular focus on marine carbon dioxide removal (mCDR) applications.
https://c-star.readthedocs.io
8 stars 3 forks source link

Schema version for blueprint #98

Open TomNicholas opened 1 week ago

TomNicholas commented 1 week ago

The blueprint files should have a number in them which indicates which version of the blueprint schema is being used. For now this can just be e.g. 0.0.1, but as soon as any PR modifies the schema (i.e. the layout), this number should be incremented.

This will allow us in future to do things like

if blueprint['version'] < "0.1.0" 
    raise ValueError

which could save a lot of headaches.

It will also help when we eventually want to put these blueprints in a database online somewhere, at which point it can be mapped to schema evolution of that database.

dafyddstephenson commented 1 week ago

Would this not just correspond to a C-Star version? roms-tools handles this nicely in to_yaml, we could probably recreate that quite easily.

TomNicholas commented 1 week ago

Interesting question - it could be, but it doesn't have to be. It might be better not to constrain the version of the C-Star as a whole to be the same thing as the version of the blueprint file format.