nu-radio / NuRadioReco

reconstruction framework for radio detectors of high-energy neutrinos
GNU General Public License v3.0
5 stars 3 forks source link

Save git hashes #243

Closed christophwelling closed 4 years ago

christophwelling commented 4 years ago

Using GitPython (https://gitpython.readthedocs.io/en/stable/) we can get the git hash of NuRadioReco, NuRadioMC and radiotools and store them as an event parameter. This way, we can later tell which exact software version a .nur file was created with

cg-laser commented 4 years ago

We already have this feature for NuRadioMC with the additional feature that also the version number is saved. It's implemented in the utilites: https://github.com/nu-radio/NuRadioMC/blob/master/NuRadioMC/utilities/version.py and saved in the hdf5 output files. I think it is a good idea to also save it to the nur files. I suggest to move the utility function over to NuRadioReco and use these functions. As we already have a implementation that does not need an external package, I suggest we keep using it to reduce the number of dependencies.

christophwelling commented 4 years ago

Nice, I didn't know about that. I moved the utility over to NuRadioReco and will change that in NuRadioMC once this PR is merged, so I don't break anything over there. The implementation seems to have broken when we switched to py3 anyway.