-
-
Notifications
You must be signed in to change notification settings - Fork 516
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
sage --tox -e coverage.py
#36505
sage --tox -e coverage.py
#36505
Conversation
|
||
*Documentation:* https://coverage.readthedocs.io | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the doctest coverage follows the code coverage right below, you may want to write something below to distinguish one from the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion, done in 657c624
envdir = {[sage_src]envdir} | ||
commands = {[sage_src]commands} | ||
allowlist_externals = {[sage_src]allowlist_externals} | ||
|
||
[testenv:coverage] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get
$ ./sage -tox -e coverage.py-html
ROOT: HandledError| provided environments not found in configuration file:
coverage.py-html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does ./sage -tox --version
say on your system?
Edit: Never mind, I can reproduce it here with tox 4.11.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tox-dev/tox#3096 may be relevant for this.
I'll work around it.
(Edit: Done in 5887b53)
In the report, I see many instances of
and at the end, I get
|
We also see these messages in large quantities the Build & Test CI runs, in the section "Prepare coverage results". For example https://github.com/sagemath/sage/actions/runs/6623852735/job/17991733088#step:19:20
This one also shows up in the CI, for example https://github.com/sagemath/sage/actions/runs/6606391152/job/17942563622#step:19:1162, but with much less frequency. This looks to me like a concurrency bug. It may, in fact, help explain the nondeterministic coverage results that we observed even after fixing the random seed. (Edit: See #35522) @tobiasdiez any insights on this? |
Not really. I don't remember seeing it when I introduced the codecov feature, but it might have been there. At least, the oldest available github log also shows it: https://github.com/sagemath/sage/actions/runs/5706566264/job/15462390831 But you can have a look at the reported coverage file and see how/where it duplicates with others? In general, coverage works way better with pytest. |
I've opened #36539 for this. |
Let's get this in please. |
I get
|
This comes from our old-fashioned installation of the Sage library using "setup.py develop" for the editable mode. The helper script installed as venv/bin/sage-runtests contains this use of pkg_resources. This will go away with #34209 |
From
|
Is this expected or normal? |
This |
af2f051
to
75177b0
Compare
Fixed it now. It prints this at the end:
|
I see
from the help. |
Thanks, fixed in aa53aad |
3634f85
to
aa53aad
Compare
Documentation preview for this PR (built with commit aa53aad; changes) is ready! 🎉 |
I still get
Perhaps because of many
Since I get the coverage report (may not be accurate), I may simply ignore this, if this is unfixable now... |
It's not the same error messages as in #36539, but I'd think it's the same reason of failure |
In this old thread nedbat/coveragepy#408, people experience a similar error and blame some version conflict. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Let's get this in now.
The new feature does not always work. But the cause seems to be on Coverage.py side.
Thank you! |
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> We add the Coverage.py analysis, already part of our Build&Test CI, as a tox environment, and add documentation. <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36505 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee, Matthias Köppe
We add the Coverage.py analysis, already part of our Build&Test CI, as a tox environment, and add documentation.
📝 Checklist
⌛ Dependencies