xBOUT icon indicating copy to clipboard operation
xBOUT copied to clipboard

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

Open johnomotani opened this issue 2 years ago • 6 comments

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.

johnomotani avatar Sep 01 '22 20:09 johnomotani

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

  • title
  • software_name
  • software_version
  • netcdf_version
  • date_created
  • id

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?

ZedThree avatar Sep 02 '22 08:09 ZedThree

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

bendudson avatar Sep 02 '22 17:09 bendudson

Yes :)

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

  • no distance and clean: {tag}
  • distance and clean: {next_version}.dev{distance}+{scm letter}{revision hash}

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

ZedThree avatar Sep 05 '22 07:09 ZedThree

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

johnomotani avatar Sep 05 '22 19:09 johnomotani

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

dschwoerer avatar Sep 30 '22 10:09 dschwoerer

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

ZedThree avatar Sep 30 '22 12:09 ZedThree