Skip to content

Report test-code coverage in CI - #709

Open
anshurajbisoyi98-ctrl wants to merge 2 commits into
optimagic-dev:mainfrom
anshurajbisoyi98-ctrl:ci-564-test-code-coverage
Open

anshurajbisoyi98-ctrl wants to merge 2 commits into
optimagic-dev:mainfrom
anshurajbisoyi98-ctrl:ci-564-test-code-coverage

Conversation

@anshurajbisoyi98-ctrl

@anshurajbisoyi98-ctrl anshurajbisoyi98-ctrl commented Oct 4, 2026 •

Copy link
Copy Markdown

What problem do you want to solve?

Related to #564 and the coverage-reporting step requested in #571.

The CI coverage task currently measures only src, and Codecov explicitly ignores tests. This change adds --cov=tests alongside --cov=src and removes the test-directory exclusion from Codecov, making uncovered test helpers visible for review.

This is the reporting step only. It does not remove test helpers, add coverage exclusions, enforce 100% test coverage, or resolve all of #564. Categorizing uncovered test code can follow once the full CI report is available.

Validation on macOS with Python 3.13:

  • 28 focused tests passed (tests/optimagic/test_decorators.py and tests/optimagic/test_batch_evaluators.py).
  • Confirmed that the generated XML report contains source and test files.
  • All applicable pre-commit hooks passed for the two changed files.
  • git diff --check passed.

The full test suite and remote CI have not yet been verified.

Todo

  • Target the right branch and pick an appropriate title.
  • Close the relevant issue automatically: not applicable because this PR addresses only the reporting step of Ensure 100% coverage in tests #564.
  • Verify the full CI run and uploaded Codecov report after submission.

AI assistance

Codex assisted with implementation and local verification, .

Signed-off-by: Anshu Raj Bisoyi <anshurajbisoyi98@gmail.com>
@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 122 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timmens timmens left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice PR, thank you!

Please merge main into this branch. Once done, ping me and I will merge the PR.

@anshurajbisoyi98-ctrl

Copy link
Copy Markdown
Author

Done! i have updated the branch @timmens ,My pleasure.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants