Open hugobuddel opened 7 months ago
Just to make sure I understand what the issue is here: So this happens if someone
Is that correct?
Yeah... That's probably abuse of -e
. Because many other things could have changed that would require installing it again.
I usually just checkout a different branch when I want to compare different versions, without actually installing it again. This usually works, because earlier versions still work with newer dependencies.
In the past we had the version defined in version.py
, so we would always get that version irrespective of how things are installed. So it is kinda a regression. But maybe not worth it to do anything about this.
Maybe an editable install is a bad idea to begin with. But the option of editable installs is perhaps also an attractive part of interpreted languages.
Hmmmm. Well I guess I wouldn't hurt to additionally toml.load
the versions for the bug_report
and maybe put them next to the one obtained from importlib.metadata.version
, this might help us diagnose things.
But where does it stop? Using pip install gitpython
, this is also interesting information:
>>> git.Repo(Path(scopesim.__file__).parent.parent).head.object.hexsha
'7cfe1f51f0de96797d04131ab492a4411fa530b8'
and then of course also whether it is dirty or not, etc.
That might be more informative than what is in pyproject.toml
. Because the original issue is only relevant if there is an editable install, and an editable install is ~only interesting if there is a git checkout, and then the commit hash is more useful than the version.
So not sure it is worth it. Probably not
Not sure everything with the versioning actually works as intended. (Intended by us I mean; everything probably works as intended by the tooling.)
See this scenario with a semi fresh ScopeSim clone and semi fresh environment, without ScopeSim installed. Alternating between an empty directory and ScopeSim clone:
Empty directory, as expected:
In fresh clone install an old version of ScopeSim. More realistic scenario is installing
dev_master
now, and then wait a couple of weeks until the versions roll over, so we are mimicking that by explicitly installing something old.In empty directory, as expected again::
These files are installed:
In git clone:
In empty directory:
People are surely going to install ScopeSim in this way.
So maybe we should have
bug_report()
also try to get the version frompyproject.toml
?Originally posted by @hugobuddel in https://github.com/AstarVienna/ScopeSim/issues/355#issuecomment-1923395094