Skip to content
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

Add coverage config #253

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add coverage config #253

wants to merge 4 commits into from

Conversation

cbrnr
Copy link
Owner

@cbrnr cbrnr commented Jan 16, 2025

Move .coveragerc to pyproject.toml and try to automatically run it with pytest.

@cbrnr
Copy link
Owner Author

cbrnr commented Jan 16, 2025

Hmmm, pytest runs fine locally, I don't know why it's failing here (apparently, pytest-cov does not get installed?). Any idea @larsoner?

@larsoner
Copy link
Contributor

You'll need to add pytest-cov to

test-requires = "pytest"

@@ -116,6 +121,7 @@ filterwarnings = [
'ignore:.*datetime.datetime.utcfromtimestamp\(\):DeprecationWarning',
'ignore:(?s).*Pyarrow:DeprecationWarning',
]
addopts = "--cov"
Copy link
Contributor

@larsoner larsoner Jan 16, 2025

Choose a reason for hiding this comment

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

From looking at lost of tracebacks on CIs and locally I'd recommend a couple more options we have in MNE-Python

Suggested change
addopts = "--cov"
addopts = "--cov=sleepecg -rfEXs --cov-report= --tb=short"

some of which could then be removed from

- run: pytest -rfEXs --cov=sleepecg --cov-report=xml --tb=short --cov-branch --color=yes $PYTEST_EXTRA tests/

@larsoner larsoner mentioned this pull request Jan 16, 2025
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