Skip to content
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

Configure Coverage using new exclude_also option #3850

Merged
merged 2 commits into from
May 9, 2024
Merged

Conversation

deepyaman
Copy link
Member

@deepyaman deepyaman commented May 4, 2024

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

  • Read the contributing guidelines
  • Signed off each commit with a Developer Certificate of Origin (DCO)
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes
  • Checked if this change will affect Kedro-Viz, and if so, communicated that with the Viz team

Signed-off-by: Deepyaman Datta <deepyaman.datta@utexas.edu>
@deepyaman deepyaman changed the title build: use new exclude_also over exclude_lines Configure Coverage using new exclude_also option May 7, 2024
Copy link
Member

@astrojuanlu astrojuanlu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a worthy change but I don't fully understand what it implies, leaving this to somebody else from engineering to comment 🙏🏼

@deepyaman
Copy link
Member Author

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.

@deepyaman deepyaman enabled auto-merge (squash) May 9, 2024 12:54
@deepyaman deepyaman merged commit daf1c01 into main May 9, 2024
34 checks passed
@deepyaman deepyaman deleted the deepyaman-patch-1 branch May 9, 2024 15:26
astrojuanlu pushed a commit that referenced this pull request May 10, 2024
…params` (#3861)

* Added globals with runtime params example

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>

* Fixed typos

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>

* build: use new exclude_also over exclude_lines (#3850)

Signed-off-by: Deepyaman Datta <deepyaman.datta@utexas.edu>

* Removed changes merged by mistake

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>

* Changed yaml -> yml

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>

* Removed changes merged by mistake

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>

* Removed changes merged by mistake

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>

---------

Signed-off-by: Elena Khaustova <ymax70rus@gmail.com>
Signed-off-by: Deepyaman Datta <deepyaman.datta@utexas.edu>
Co-authored-by: Deepyaman Datta <deepyaman.datta@utexas.edu>
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

Successfully merging this pull request may close these issues.

None yet

4 participants