-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests don't run after migrating to pyscaffold #649
Comments
Hi @ofosos, sorry for the inconvenience. Unfortunately this is something we cannot fix in Pyscaffold itself. However we can (and should) document a practice that would eliminate this error in our guides. The gist of what is happening is the following: PyScaffold automatically configures It seems, however, that We should modify the documentation in https://pyscaffold.org/en/stable/migration.html with steps to ensure that this error will not happen. |
On second thought, I might need a bit more time to investigate if this is not a problem with setuptools-scm. |
In particular, I need to pass 'find:' instead of 'findnamespace:' to the setup.cfg. And there's also 'term-missing' in cov-report. Both are kind of weird, but the latter just looks like a bug. |
Creating a tag 'v0.4' and running tox with the findnamespace: option results in the same output. Not working for me. |
Strike that. If I delete my tag 'draft1' and change the source back to 'find_namespace:' it works for me. |
It seems like a limitation in I will try to investigate a bit more about this limitation and propose an issue in the |
While I verify with the You can see the rendered version of the docs here: https://pyscaffold--651.org.readthedocs.build/en/651/migration.html. |
A similar problem a non-version tag seems to have been reported in setuptools-scm: pypa/setuptools-scm#449 and pypa/setuptools-scm#235. The second issue here (multiple tags in the same commit), also seems to be a well-known problem in setuptools-scm: pypa/setuptools-scm#521. |
Indeed this seems to be a problem only for certain formats of tags: The following test will pass: mkdir /tmp/myproj
cd /tmp/myproj
cat << EOS > pyproject.toml
[build-system]
requires = ["setuptools", "setuptools-scm"]
[project]
name = "myproj"
dynamic = ["version"]
[tool.setuptools_scm]
EOS
touch myproj.py
git init .
git add myproj.py pyproject.toml
git commit -m "Initial Commit"
git tag "notaversion"
pipx run build # OR pipx run --spec setuptools-scm -- python -m setuptools_scm
# ...
# Successfully built ... But if I change the tag to "notaversion3", it will fail: git tag -d not-a-version
git tag notaversion3
pipx run build # OR pipx run --spec setuptools-scm -- python -m setuptools_scm
# ...
# AssertionError: Can't parse version notaversion3 |
What about the 'term-missing' in cov-report? |
Hi @ofosos, I tried your repository at the commit For completeness, this is what the report looks like in my machine: Are you running the tests via Maybe I am not able to reproduce your results because I am running in a different OS. What I did was the following: git clone https://codeberg.org/ofosos/rotoscope.git
cd rotoscope
virtualenv -p python3.8 .venv
.venv/bin/python -m pip install -U pip tox
.venv/bin/tox (I will probably just be able to have a look on this tomorrow) |
If you look at this commit you will see what I corrected there to get it running: |
Hi @ofosos, I still don't see anything out of ordinary when the coverage configuration uses the I tried the following: git clone https://codeberg.org/ofosos/rotoscope.git # HEAD at 1b6337f
cd rotoscope
sed -i 's/--cov-report html/--cov-report term-missing/' setup.cfg
virtualenv -p python3.8 .venv
.venv/bin/python -m pip install -U pip tox
.venv/bin/tox And the output seems to be completely fine: The difference is that with the (The interpretation of the report is that in line 24 of PyScaffold adds this configuration as the default because it is the most straight forward (instant feedback) and don't require users opening a file in the browser. But the users can always edit Please let me know if you are seeing something different. Unfortunately I don't have in hand a macOS platform to try to replicate your environment, but maybe I can help. If |
Oh, Thanks @abravalheri , I'm sorry I wasted your time here. I'll have a look at the docs and see if I can help out there. |
Description of your problem
After migrating to pyscaffold, I get some errors trying to run tox.
Please provide a minimal, self-contained, and reproducible example.
Checkout https://codeberg.org/ofosos/rotoscope version f80378ef7dbec85dd86b4427ca9e2eee5af60779
# tox
Please provide the full traceback using the
--very-verbose
flag.Please provide any additional information below.
This commit of mine fixes the problem: https://codeberg.org/ofosos/rotoscope/commit/239d3a0cdb0e34bb1fb5c83878db7669e2f83905
Versions and main components
The text was updated successfully, but these errors were encountered: