Repository navigation
Conversation
`--cov=scs` measures nothing when pytest runs from the repo root: `scs/` has no `__init__.py`, so coverage resolves the name to that namespace-package directory rather than to the installed package, and reports 0% with "No data was collected". `source_pkgs` states that `scs` is an importable package name, so coverage follows the import to site-packages instead. The threshold lives in `[tool.coverage.report]`, so the CI invocation is a bare `pytest --cov` with no inline flags. Gate added to build_openmp only; the other test jobs run plain pytest, where the coverage config is inert. Also gitignore the coverage data files — the existing entry was `python/.coverage` from the pre-meson layout. Closes bodono#238 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Owner
|
Thanks for the work, but as noted on #238 we're not adding a coverage gate on the Python layer. Closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #238
scs/py/__init__.pyis at 100% statement coverage today, but nothing measures it, so a regression would land silently.The reason it was never wired up is a real trap:
--cov=scscollects nothing when pytest runs from the repo root.scs/has no__init__.py, so coverage resolves the name to that namespace-package directory rather than to the installed package, and reports 0% withNo data was collected.source_pkgssaysscsis an importable package name, so coverage follows the import to site-packages instead.[tool.coverage.run] source_pkgs = ["scs"]inpyproject.toml[tool.coverage.report] fail_under = 100, so the CI invocation is a barepytest --covwith no inline flagspytest-covadded tobuild_openmp's pixi depsGate added to
build_openmponly; the other test jobs run plainpytest, where the coverage config is inert.Also gitignores the coverage data files — the existing entry was
python/.coverage, from the pre-meson layout.Verified locally from the repo root:
The threshold is safe cross-platform:
test_scs_coverage.pymockssys.platformfor darwin, linux and win32, so_resolve_auto's branches are covered regardless of the runner.🤖 Generated with Claude Code