Conversation
b383615 to
56c3548
Compare
56c3548 to
5d6da09
Compare
5d6da09 to
157bc3c
Compare
157bc3c to
a44f73e
Compare
|
Really would love to merge this MR. But need more understandable background on what was changed since its to high level for me to understand. Also the new unit tests are failing here. Can you have a look at them ? |
|
In sum this means versions are derived relative to tags on Git. If you are on the exact commit then your version matches the tag, if you are ahead a tag a version relative to the last tag gets constructed. The new tests expect the version.txt file to be read and for it to be patchable. WIth this change tests require the installed package to run tests against, otherwise there is no .dist-info metadata and the version function in this PR returns Do the tests run from the source repo without a proper package installation? I would expect it to simply require |
b468856 to
149c174
Compare
feadfa5 to
f246274
Compare
|
I tested it locally via docker-compose.dev.yml. When running it on in the .env settings i only get version 0.0.0. |
|
Can you somehow call |
that is working. But when running the dev container which mounts the linux-voice-assistant directory it is not able to detect the version. |
|
The dev container would require access to |
|
Hm, ok i did try to mount the .git directory into the container by adding: But in the container the version script does not give any version. I noticed that there is no git installed in the container, think we it needs to at least be added right ? |
This fixes the package version, since setuptools-scm needs to be enabled through the existence of its config section. The Docker container is now passed a VERSION attribute at build time that for CI jobs is derived from the Git tree. This is necessary because the Git tree is not copied into the Docker container.
With --tag we get a version relative to the last tag, while with --always we sometimes just get a short hash.
Not every test makes sense any more, when we are consuming dist-info metadata. - We are not testing file operations any more - Testing always requires an installed package - Permission errors can't happen unless someone mangled the venv - Checking for strip() happens on the wrong layer now
6b7d29c to
f1c82f6
Compare
|
Would you mind adding the relevant changes for the development container? Or giving me some hints what the relevant files are? |
This fixes the package version, since setuptools-scm needs to be enabled through the existence of its config section.
From
To
This requires further changes to the container builds, since they don't have a
.gittree to pull the version info from. Instead, we usegit describeat build time to come up with a version.With that change applied the package version can be looked up from package metadata and
version.txtis not required any longer.