-
Notifications
You must be signed in to change notification settings - Fork 22
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
exclude eggsupport.py
from coverage
#184
Conversation
…to `.coveragerc`" This reverts commit f4d3cbc. The `coveralls` part fails on GH for unknown reasons with the `.coveragerc` file. Leave the `coverage omit` in `tox.ini` and let later find out who to get it there through the generation process.
Help needed: It started with a Using I switched back to the |
I don't know this well, but I'll try to help anyway. The examples from https://zopemeta.readthedocs.io/en/latest/narr.html#options show that we can have some local additional config specific for a package. According to this, it would be a patch like this: diff --git a/.meta.toml b/.meta.toml
index 2c2ebc9..8f90dc5 100644
--- a/.meta.toml
+++ b/.meta.toml
@@ -15,6 +15,12 @@ with-macos = false
[coverage]
fail-under = 84
+[coverage-run]
+additional-config = [
+ "omit =",
+ " eggsupport.py",
+ ]
+
[manifest]
additional-rules = [
"include *.md", if I run with the same version of meta ( Line 5 in 02c6af3
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 03cea90..a8cc240 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -39,7 +39,7 @@ jobs:
- ["3.10", "py310-subunit"]
- ["3.11", "py311-subunit"]
- ["3.12", "py312-subunit"]
- - ["3.13.0-alpha - 3.13.0", "py313-subunit"]
+ - ["3.13.0-alpha - 3.13.0", "py313-subunit"]
- ["pypy-3.9", "pypy3-subunit"]
exclude:
- { os: ["windows", "windows-latest"], config: ["3.9", "release-check"] }
diff --git a/tox.ini b/tox.ini
index 441ad7e..5754728 100644
--- a/tox.ini
+++ b/tox.ini
@@ -85,13 +85,15 @@ deps =
coverage
commands =
mkdir -p {toxinidir}/parts/htmlcov
- coverage run --omit eggsupport.py -m zope.testrunner --test-path=src {posargs:-vc}
+ coverage run -m zope.testrunner --test-path=src {posargs:-vc}
coverage html --ignore-errors
coverage report --ignore-errors --show-missing --fail-under=84
[coverage:run]
branch = True
source = zope.testrunner
+omit =
+ eggsupport.py
[coverage:report]
precision = 2 but if I run with the current latest version it generates lots of changes, it seems @icemac is already handling these changes in #183 |
Jérome Perrin wrote at 2024-10-14 07:28 -0700:
I don't know this well, but I'll try to help anyway.
Tkank you!
...
but if I run with the current latest version it generates lots of changes, it seems @icemac is already handling these changes in #183
My main problem has been that the geenrated `tox.ini`
did not match the `tox.ini` template in the current `meta`.
I should have recognized that it likely was generated by an older
`meta` version.
Thank you for pointing me to
#183.
|
For how old |
Michael Howitz wrote at 2024-10-14 23:40 -0700:
For how old `setuptools` versions we need `eggsupport.py`?
I have never used this `eggsupport` and frankly even found the
corresponding documentation difficult to understand.
But someone took the effort to implement it.
Could it be a way foreward to remove it and use the `setuptools` version which no longer needs it as minimum version?
Removing it everywhere (implementation, tests, doc, ...) is more work
than just not include it in the `coverage` analysis.
But, I would not mind if it went away.
|
Issue solved by #183 |
This PR excludes
eggsupport.py
from thecoverage
analysis:the
eggsupport.py
functionality is available only for oldersetuptools
versions and the GH testrunnter uses a newer one. As a consequence,eggsupport.py
is no longer covered by the test suite and thecoverage
check fails.