Skip to content

Change --omit-covered from 100% coverage to --fail-under value#119

Open
strobeflash wants to merge 2 commits intoeconchick:masterfrom
strobeflash:master
Open

Change --omit-covered from 100% coverage to --fail-under value#119
strobeflash wants to merge 2 commits intoeconchick:masterfrom
strobeflash:master

Conversation

@strobeflash
Copy link
Copy Markdown

Hey, I just made a Pull Request!

Description

Change --omit-covered from 100% coverage to --fail-under value

Motivation and Context

--omit-covered currently only hides 100% covered files even when --fail-under sets another value

Have you tested this? If so, how?

Ran interrogate with the changes and they seem to work.

Checklist for PR author(s)

  • Changes are covered by unit tests (no major decrease in code coverage %).
  • All tests pass.
    No, but already before my changes.
  • Docstring coverage is 100% via tox -e docs or interrogate -c pyproject.toml (I mean, we should set a good example 😄).
  • Updates to documentation:
    • Document any relevant additions/changes in README.rst.
    • Manually update both the README.rst and docs/index.rst for any new/changed CLI flags.
    • Any changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives. Find the appropriate next version in the project's __init__.py file.

Release note

Change --omit-covered from absolute coverage of 100% to relative coverage based on --fail-under

@econchick
Copy link
Copy Markdown
Owner

Sorry for the silence! I like this idea, but I want to keep the same behavior (not introduce a breaking change like this, even though it is innocuous), while allowing the option to hide files that meet the --fail-under condition.

I think it'd be a better approach to have --omit-covered-files default to 100% coverage (basically behaving like a flag, as it does right now), but add the ability for --omit-covered-files to take in a value, which can match the --fail-under (so it behaves like an option argument, not just a flag). e.g. supporting the following: interrogate --fail-under 85 --omit-covered-files 85.

Feel free to update this PR; otherwise, I can add this at some point for the next release (1.8.0).

@econchick econchick added enhancement New feature or request needs followup Needs response from issue/PR filer labels Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs followup Needs response from issue/PR filer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants