kedro-org / kedro

Kedro is a toolbox for production-ready data science. It uses software engineering best practices to help you create data engineering and data science pipelines that are reproducible, maintainable, and modular.
https://kedro.org
Apache License 2.0
9.48k stars 874 forks source link

Configure Coverage using new `exclude_also` option #3850

Closed deepyaman closed 1 month ago

deepyaman commented 2 months ago

Description

The exclude_also option is newer, and Coverage is trying to lean on it more heavily. The benefit is, you don't need to write the default excludes again (e.g. # pragma: no cover, and whatever may come in the future).

Development notes

Developer Certificate of Origin

We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a Signed-off-by line in the commit message. See our wiki for guidance.

If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.

Checklist

deepyaman commented 1 month ago

The exclude_also option is newer, and Coverage is trying to lean on it more heavily. The benefit is, you don't need to write the default excludes again (e.g. # pragma: no cover, and whatever may come in the future).

It's quite minimal; as you can see in https://coverage.readthedocs.io/en/latest/excluding.html#advanced-exclusion, the difference between the exclude_also instead of exclude_lines is that it doesn't override the default excludes, and instead appends to the list.