Closed jngrad closed 4 months ago
The pyMBE.py
script has 55% code coverage at the time of writing. See #58 for the features that require our attention.
If we could get every pyMBE community member to contribute unit tests for 5 features and invest no more than 20 min of developer time per unit test, we should be able to reach 90% code coverage in pyMBE.py
in about a week. We don't need to write simulation scripts, just a few np.testing.assert_allclose()
or pd.testing.assert_frame_equal()
checks. Convenience scripts under the lib/
folder might require more effort, since they need either synthetic data or a minimal ESPResSo simulation script as input.
The report is available online. You can generate the code coverage report locally with the following commands:
make unit_tests COVERAGE=1
make coverage_html
firefox coverage/index.html
This draft PR will be rebased once all dependency issues are sorted out. It is currently designed around Codecov, because I'm already familiar with this service, but I am open to alternatives. For completeness, here are the main competing services: Codecov, Coveralls, Codacy. Here is a brief comparison of these services.
@jngrad a million thanks for addressing this point. I will add this to our tomorrow's meeting schedule so we can start splitting the workload of developing the tests.
@pm-blanco While we wait for the Pylint PR to be merged, could you please give Codecov access to the pyMBE organization? Right now I'm using my own Codecov token, which means only the commits on my fork can upload coverage reports. Here is the official quick start page. You will need to follow step 1 using your GitHub account to sign up and establish access rights (the app needs to get read access to the organization and write access to write a green check mark in the commit metadata) and step 2 to store the secret token in the pyMBE-dev/pyMBE repository settings. That's it. The YAML file described in step 2 is already available in this PR. Steps 3-6 are already done in this PR too.
@jngrad I belive it should be done now!
Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.
:information_source: You can also turn on project coverage checks and project coverage reporting on Pull Request comment
Thanks for integrating Codecov - We've got you covered :open_umbrella:
The code coverage reports are now uploaded to https://app.codecov.io/gh/pyMBE-dev/pyMBE and written to the commit status (green checkmark or red cross). New features require a unit test, otherwise code coverage will drop and CI will fail.
Things to keep in mind:
Upload failed: {"detail":"Tokenless has reached GitHub rate limit. Please upload using a token: https://docs.codecov.com/docs/adding-the-codecov-token. Expected available in 358 seconds."}
codecov-action@d42a336:src/buildExec.ts#L47-L54
)samples
job runs long tests and samples that reproduce paper results
20 6 5,20 * *
main
branch!
Description of changes:
samples