theochem / iodata

Python library for reading, writing, and converting computational chemistry file formats and generating input files.
https://iodata.readthedocs.io/
GNU Lesser General Public License v3.0
133 stars 46 forks source link

Record coverage for fast tests and analyze with deepsource and codecov #335

Closed tovrstra closed 5 months ago

tovrstra commented 5 months ago

See #313 for the overview.

Summary by Sourcery

This pull request optimizes test coverage analysis by splitting tests into 'slow' and 'fast' categories, using DeepSource for coverage analysis of fast tests, and updating the CI workflow to handle these changes. Additionally, it refactors some slow tests into faster, parameterized tests and updates the contributing guide.

sourcery-ai[bot] commented 5 months ago

Reviewer's Guide by Sourcery

This pull request optimizes the test suite by categorizing tests into fast and slow groups, refactoring some slow tests into smaller, parameterized ones, and updating the CI workflow to handle these changes. Additionally, the contributing guide has been updated to reflect the new testing strategy.

File-Level Changes

Files Changes
iodata/test/test_fchk.py
iodata/test/test_wfx.py
iodata/test/test_wfn.py
iodata/test/test_molekel.py
Refactored multiple individual test functions into parameterized tests using pytest.mark.parametrize and marked specific tests as slow using pytest.mark.slow.
.github/workflows/pytest.yaml
.deepsource.toml
Updated CI workflow to run fast tests with coverage analysis on Linux and upload the coverage report to Deepsource. Enabled test-coverage analyzer in Deepsource configuration.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - You can change your review settings at any time by accessing your [dashboard](https://sourcery.ai/dashboard): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
deepsource-io[bot] commented 5 months ago

Here's the code health analysis summary for commits 286d95f..ac34301. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Test coverage LogoTest coverage⚠️ Artifact not reportedTimed out: Artifact was never reportedView Check ↗
DeepSource Shell LogoShell✅ SuccessView Check ↗
DeepSource Python LogoPython✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.
tovrstra commented 5 months ago

Thanks for checking. Going in...