JuliaDynamics / DrWatson.jl

The perfect sidekick to your scientific inquiries

Home Page:https://juliadynamics.github.io/DrWatson.jl/stable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tag with git commit message

harrybooth opened this issue · comments

Maybe I have overlooked this functionality, but would it be possible to add the git commit message to the result dictionary using DrWatson.@tag!?

This would be really useful, as for example the git commit hash e.g. gitcommit => "96df587e45b29e7a46348a3d780db1f85f41de04" is non-descriptive, especially if you are trying to compare different versions of the same data and understand what the change was. Allowing the git commit message to be included, e.g. "changed parameter x to y" would be a nice automated way to relate code changes to experimental results.

Sure, this seems like providing a keyword arugment use_description = false to tag!. If true, the commit description is used instead of the tag. Note that this is dangerous: commit descriptions can be arbitrarily small and non-unique, so this may not really help you reverse time and go back to given commit. But of course use at your own risk hence the default value will be false.

Could we do it so that the commit description is provided in addition to the tag? I agree the tag should always remain for reproducibility.

we can do it like the gitpatch keyword: the commit message can be added as an additional field instead of replacing or mingling with the git commit field