Skip to content

testing codecov - #294

Merged
orbeckst merged 1 commit into
mainfrom
test-codecov-config
Jul 11, 2025
Merged

testing codecov#294
orbeckst merged 1 commit into
mainfrom
test-codecov-config

Conversation

@orbeckst

Copy link
Copy Markdown
Member

Test different versions of codecov.yml to see if anything solves #287

Validate with

curl --data-binary @codecov.yml https://codecov.io/validate

@codecov

codecov Bot commented Sep 14, 2024

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.25%. Comparing base (e7fd8c3) to head (2568d8a).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##            main     #294       +/-   ##
==========================================
+ Coverage   0.00%   51.25%   +51.25%     
==========================================
  Files         22       23        +1     
  Lines       3954     4318      +364     
  Branches       0      624      +624     
==========================================
+ Hits           0     2213     +2213     
+ Misses      3954     1924     -2030     
- Partials       0      181      +181     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@orbeckst
orbeckst marked this pull request as draft September 14, 2024 00:54
@orbeckst

Copy link
Copy Markdown
Member Author

I was able to get normal coverage when running locally

pytest -v --disable-pytest-warnings --durations=20 --low-performance  --cov-report=xml  --cov-report=term-missing --color=yes ./tests
coverage report

I can locally reproduce the No data to report. --- I think after adding the pytest-pep8 plugin to pytest-cov (and pytest-xdist) (python 3.13).

When removing the plugin (mamba uninstall pytest-pep8) the lack of coverage remains, so maybe something else changed.

@orbeckst
orbeckst force-pushed the test-codecov-config branch from c018d03 to b3c24a4 Compare July 11, 2025 21:20
@orbeckst

Copy link
Copy Markdown
Member Author

The issue was that --cov=gromacs in the presence of a ./gromacs directory expected the code to be installed with pip install -e . instead of a normal installation. Although the package is installed as gromacs, the presence of the directory seems to have confused it.

I didn't explore more specific options in the pyproject.toml where it may be possible to specify a module name (to disambiguate source = ["gromacs"]).

In short: use a developer installation for testing.

@orbeckst
orbeckst force-pushed the test-codecov-config branch from 1f44f46 to 1a4bcf7 Compare July 11, 2025 21:39
@orbeckst
orbeckst marked this pull request as ready for review July 11, 2025 21:55
- fix #287
- must install as editable for --cov=gromacs to work
- consolidated pytest-cov/coverage configuration in pyproject.toml
- updated codecov plugin to v5
@orbeckst
orbeckst force-pushed the test-codecov-config branch from 1dd3843 to 2568d8a Compare July 11, 2025 22:01
@orbeckst
orbeckst merged commit 5182535 into main Jul 11, 2025
22 checks passed
@orbeckst
orbeckst deleted the test-codecov-config branch July 11, 2025 22:30
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.

1 participant