Skip to content

find a way to do code-coverage analysis (for C++ code) in PyPartMC #390

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

Closed
slayoo opened this issue Dec 12, 2024 · 4 comments
Closed

find a way to do code-coverage analysis (for C++ code) in PyPartMC #390

slayoo opened this issue Dec 12, 2024 · 4 comments

Comments

@slayoo
Copy link
Member

slayoo commented Dec 12, 2024

No description provided.

@dbaston
Copy link

dbaston commented Dec 16, 2024

I was looking into this over the course of pyOpenSci/software-submission#179, since it's difficult to tell how complete the test suite is without it. I tried adding the usual -fprofile-arcs -ftest-coverage build flags, but the coverage ends up being generated for the F90 files only. Not sure what the problem is.

@slayoo
Copy link
Member Author

slayoo commented Jan 28, 2025

Thank you, @dbaston for pinging this issue!
I've tried compiling using:

CMAKE_ARGS="-DCMAKE_CXX_FLAGS=-coverage -DCMAKE_C_FLAGS=-coverage -DCMAKE_Fortran_FLAGS=-coverage" pip install -e .

and it seems to work for both C++ and Fortran code:

Image

Stay tuned for a proper codecov automation.

For the record, these were helpful resources:

@slayoo
Copy link
Member Author

slayoo commented Jan 29, 2025

And here it is: https://app.codecov.io/github/open-atmos/PyPartMC
Thanks @dbaston

@slayoo slayoo closed this as completed Jan 29, 2025
@slayoo
Copy link
Member Author

slayoo commented Jan 29, 2025

(code in #397, incl. badge)

Image

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

No branches or pull requests

2 participants