Skip to content

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"

'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.

3 participants