kevin218 / Eureka

Eureka! is a data reduction and analysis pipeline intended for time-series observations with JWST.
https://eurekadocs.readthedocs.io/
MIT License
58 stars 45 forks source link

[Enhancement]: add Eureka! version to log and meta file #566

Closed lkreidberg closed 8 months ago

lkreidberg commented 11 months ago

Instrument

Other (any stage)

What is your suggestion?

We should add the Eureka! version to the log file and the meta file to help with debugging, reproducibility, etc.

Should be updated at each stage!

Error traceback output

No response

What operating system are you using?

No response

What version of Python are you running?

No response

What Python packages do you have installed?

No response

Code of Conduct

taylorbell57 commented 9 months ago

I've got an initial version of this applied in my dev/tjb branch that I'll make a PR for soonish, but we might want to add a warning when the previous stage used a different Eureka! version than the current version. Thoughts (e.g., @kevin218)?

kevin218 commented 9 months ago

Yes, I think a warning statement in the log file is sufficient in the case where the Eureka! versions don't match.

Are you tracking the version number at each state, presumably in meta?

taylorbell57 commented 9 months ago

At present, I store the CRDS pmap and Eureka! version for the current stage in the meta and print a warning to the terminal when either is changed between stages. This is also done even if the pmap is not manually set and ends up changing automatically, although that warning won't be backwards compatible (it won't throw an warning, but it also wont crash or throw false-positive warnings or anything). I don't log the warning since I do the checks before the log is made, but I do log the CRDS pmap and Eureka! version in the log as well, so while there won't be a warning there you'll be able to see that the version changed between the stages