boutproject / xBOUT

Collects BOUT++ data from parallelized simulations into xarray.
https://xbout.readthedocs.io/en/latest/
Apache License 2.0
21 stars 10 forks source link

Should `BoutDataset.save()` record the version of `xBOUT` used to produce the files? #244

Open johnomotani opened 2 years ago

johnomotani commented 2 years ago

Might be useful for provenance tracking and reproducibility to know what version of xBOUT was used to produce some file. Similar to https://github.com/boutproject/boutdata/pull/79.

ZedThree commented 2 years ago

Oh, I perhaps should've thought about this on that other PR, it would be good to have this set of metadata as attributes:

I've cobbled this set together from various conventions, including netCDF and the Climate Forcasting conventions, and I've been trying to get it into various output files.

I think we might already have some of these?

bendudson commented 2 years ago

Quick bikeshedding question: Should software_version be a semantic or at least sequential version number, or a git checksum, or a combination?

ZedThree commented 2 years ago

Yes :)

Personally, I'm a big fan of setuptools_scm's scheme, which is SemVer compatible. It's basically:

So a release would be 1.2.3 say, and the first commit after that would get version 1.2.3.dev1+gdeadbeef

johnomotani commented 2 years ago

:+1: I was gonna say what @ZedThree said.

dschwoerer commented 2 years ago

Offtopic: Isn't the next one 1.2.4.dev1+gdeadbeef?

ZedThree commented 2 years ago

Good catch, yes. I think there's some setting to make it bump the minor version instead too.