Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Collect coverage of numba decorated code #124

Merged
merged 9 commits into from
Apr 21, 2023

Conversation

dstansby
Copy link
Member

@dstansby dstansby commented Mar 31, 2023

Fixes #110. This adds a new CI workflow that only runs on main that disables numba, and therefore collects code coverage for the parts of the code that would otherwise be optimised by numba. The tests are slow (~20 mins), but not unreasonably slow, so running them only on commits to main seems like a good compromise.

I've also enabled carryforward flags for these parts of the code in codecov. This will automatically carry forward the covered lines on main to pull requests, so coverage isn't going up and down in main compared to pull requests where the new workflow isn't run.

@github-advanced-security
Copy link

You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@dstansby dstansby force-pushed the numba-coverage branch 2 times, most recently from 1c7fc65 to afa5ea2 Compare March 31, 2023 09:50
@dstansby dstansby deleted the branch brainglobe:main March 31, 2023 10:12
@dstansby dstansby closed this Mar 31, 2023
@dstansby dstansby reopened this Mar 31, 2023
@dstansby dstansby changed the base branch from benchmarks to main March 31, 2023 10:17
@dstansby
Copy link
Member Author

This seems to work well, but the tests with Numba turned off takes 13 minutes to run. I'm on the fence about whether this is too slow or not for regular CI. I will take a look and see if there's a way to run the slower Numba off run only on merges to main, and have codecov play nicely and not complain that every PR decreases coverage.

@dstansby
Copy link
Member Author

Currently wainting on neuroinformatics-unit/actions#18

@dstansby dstansby marked this pull request as ready for review April 21, 2023 08:48
@dstansby dstansby requested a review from a team April 21, 2023 08:48
@dstansby dstansby changed the title Add CI with Numba turned off Collect coverage of numba decorated code Apr 21, 2023
@adamltyson adamltyson merged commit d9b5fc2 into brainglobe:main Apr 21, 2023
@dstansby dstansby deleted the numba-coverage branch April 21, 2023 09:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Measure code coverage of previously Cythonized code
2 participants