I had some "user side issues" the last few days where I got confused "all on my own" when working from source installation vs conda installation and having a bit of mess about it (which I think can easily happen when using a mix of conda envs, conda vs git installs, etc).
In short, I was confused about "am I using the 'true' version 1.10.6, or the version 1.10.6 according to setuptools, but actually this is from a commit that is more up to date"? The way to check for this now is to do:
In [1]: import opendrift as od
In [2]: od.__version__
Out[2]: '1.10.6'
In [3]: od.__path__
Out[3]: ['MYHOME/Git/opendrift/opendrift']
And then to go to the corresponding folder, check the git log or similar to check the commit, etc.
My question: is it possible / would it make sense to have an attribute in the kind of:
od.__commit__
that would return the exact commit used, either this is from a release, or from a git source install? That may make it much easier to debug / track versions etc. No idea if this can be supported out of the box, or if this would require a bit of code.
That may be a bit general, if so apologies.
I had some "user side issues" the last few days where I got confused "all on my own" when working from source installation vs conda installation and having a bit of mess about it (which I think can easily happen when using a mix of conda envs, conda vs git installs, etc).
In short, I was confused about "am I using the 'true' version 1.10.6, or the version 1.10.6 according to setuptools, but actually this is from a commit that is more up to date"? The way to check for this now is to do:
And then to go to the corresponding folder, check the
git log
or similar to check the commit, etc.My question: is it possible / would it make sense to have an attribute in the kind of:
that would return the exact commit used, either this is from a release, or from a git source install? That may make it much easier to debug / track versions etc. No idea if this can be supported out of the box, or if this would require a bit of code.