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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

strobeflash
Copy link

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
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