Skip to content

Commit e6d04ec

Browse files
timmensclaude
andcommitted
Fix coverage: scope --cov to src/optimagic instead of ./
--cov=./ measured coverage of the entire repo including .tools/ and other non-source files. Scoping to src/optimagic gives accurate results and restores the codecov/project check. Also reverts the codecov target change since the root cause is now fixed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9d41249 commit e6d04ec

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

codecov.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ coverage:
1212
target: 80%
1313
project:
1414
default:
15-
target: auto
16-
threshold: 1%
15+
target: 90%
1716
ignore:
1817
# Uses numba
1918
- src/optimagic/benchmarking/cartis_roberts.py

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ pytest-xdist = ">=3.2"
451451
[tool.pixi.feature.test.tasks]
452452
tests = { cmd = "pytest", description = "Run the full test suite" }
453453
tests-fast = { cmd = "pytest -m 'not slow and not jax'", description = "Run tests excluding slow and jax tests" }
454-
tests-with-cov = { cmd = "pytest --cov-report=xml --cov=./", description = "Run tests with XML coverage report" }
454+
tests-with-cov = { cmd = "pytest --cov-report=xml --cov=src/optimagic", description = "Run tests with XML coverage report" }
455455

456456
# --- Feature: typecheck (mypy + type stubs) ------------------------------------------
457457
[tool.pixi.feature.typecheck.dependencies]

0 commit comments

Comments
 (0)