Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the CLI entrypoint strategy and test/tooling configuration to reduce redundant entrypoints, avoid early-import side effects, and tighten pytest behavior while adjusting coverage reporting policy.
Changes:
- Switch console script entrypoint from
ansible_dev_tools.cli:maintoansible_dev_tools.__main__:mainand remove the redundant__main__guard fromcli.py. - Update coverage configuration to include tests in coverage reporting (and lower the global
fail_underthreshold), and mark some branches asno cover. - Configure pytest to treat warnings as errors and adjust pre-commit hook versions/priorities.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/ansible_dev_tools/tests/unit/test_basic.py | Removes the unit test that executed ansible_dev_tools.cli as a module entrypoint. |
| src/ansible_dev_tools/tests/integration/conftest.py | Removes an unused session_params fixture. |
| src/ansible_dev_tools/tests/conftest.py | Removes an explicit package import to avoid premature import side effects. |
| src/ansible_dev_tools/subcommands/server.py | Marks the debug branch as excluded from coverage. |
| src/ansible_dev_tools/cli.py | Removes if __name__ == "__main__": main() to avoid a dual entrypoint. |
| src/ansible_dev_tools/main.py | Marks the module execution guard as excluded from coverage. |
| pyproject.toml | Changes console script entrypoint, adjusts coverage thresholds/omit rules, and sets pytest warnings to errors. |
| .pre-commit-config.yaml | Updates the ansible/actions hook repo revision and adjusts hook priorities. |
Comments suppressed due to low confidence (2)
pyproject.toml:110
- PR description mentions enforcing 100% coverage for
src, but[tool.coverage.report] fail_underis reduced to 75%. If the intent is 100% for production code while allowing lower overall coverage when including tests, consider implementing separate coverage gates (e.g., a secondcoverage report --include=src/ansible_dev_tools/** --omit=src/ansible_dev_tools/tests/** --fail-under=100step in CI) or update the PR description to match the actual policy change.
[tool.coverage.report]
exclude_also = ["if TYPE_CHECKING:", "pragma: no cover"]
fail_under = 75
ignore_errors = true
pyproject.toml:122
- Removing
*/tests/*from[tool.coverage.run].omitmeans test files undersrc/now contribute to the singlefail_underthreshold. If you still want 100% enforcement for non-test code, you’ll likely need a separate coverage report/check that omitssrc/ansible_dev_tools/tests/**, otherwise the overall threshold will primarily reflect test-file coverage.
# branch is more reliable than lines, protects against false positives
branch = true
concurrency = ["multiprocessing", "thread"]
omit = ["_version.py"]
parallel = true
relative_files = true
source = ["src"]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- avoid unnecessary dual module entry point - avoids premature import that can have undesired side effects, especially with coverage - bump coverage requirements to 100% for src but include tests in total coverage reporting from now on. (75%) - configure pytest to treat warnings as errors - address problematic verbosity_assertions config option - update lint hooks
renovate bot
added a commit
to sdwilsh/ansible-playbooks
that referenced
this pull request
Mar 21, 2026
##### [\`26.3.1\`](https://github.com/ansible/ansible-dev-tools/releases/tag/v26.3.1) #### Features - feat: replace kubedock with native container-in-container support ([#709](ansible/ansible-dev-tools#709)) [@cidrblock](https://github.com/cidrblock) --- ##### [\`26.3.0\`](https://github.com/ansible/ansible-dev-tools/releases/tag/v26.3.0) #### Fixes - fix: update devtools tools to 26.3.0 ([#701](ansible/ansible-dev-tools#701)) [@ssbarnea](https://github.com/ssbarnea) - fix: entry point and pytest config ([#694](ansible/ansible-dev-tools#694)) [@ssbarnea](https://github.com/ssbarnea) - fix: compatibility with newer tox releases ([#700](ansible/ansible-dev-tools#700)) [@ssbarnea](https://github.com/ssbarnea) - fix: selenium container ([#698](ansible/ansible-dev-tools#698)) [@ssbarnea](https://github.com/ssbarnea) - fix: selenium container arm64 ([#695](ansible/ansible-dev-tools#695)) [@ssbarnea](https://github.com/ssbarnea) #### Maintenance - chore(deps): update pep621 ([#708](ansible/ansible-dev-tools#708)) @[renovate\[bot\]](https://github.com/apps/renovate) - chore(deps): update all dependencies ([#707](ansible/ansible-dev-tools#707)) @[renovate\[bot\]](https://github.com/apps/renovate) - chore(deps-dev): bump black from 26.3.0 to 26.3.1 in the uv group across 1 directory ([#705](ansible/ansible-dev-tools#705)) @[dependabot\[bot\]](https://github.com/apps/dependabot) - chore: update mkdocs ([#703](ansible/ansible-dev-tools#703)) [@ssbarnea](https://github.com/ssbarnea) - chore(deps): update all dependencies ([#702](ansible/ansible-dev-tools#702)) @[renovate\[bot\]](https://github.com/apps/renovate) - chore(deps): update all dependencies ([#696](ansible/ansible-dev-tools#696)) @[renovate\[bot\]](https://github.com/apps/renovate) - chore: improve test robustness for devspaces environment ([#697](ansible/ansible-dev-tools#697)) [@VedantMadane](https://github.com/VedantMadane) - chore: add adt and python extension to selenium container ([#699](ansible/ansible-dev-tools#699)) [@ssbarnea](https://github.com/ssbarnea)
sdwilsh
pushed a commit
to sdwilsh/ansible-playbooks
that referenced
this pull request
Mar 21, 2026
##### [\`26.3.1\`](https://github.com/ansible/ansible-dev-tools/releases/tag/v26.3.1) #### Features - feat: replace kubedock with native container-in-container support ([#709](ansible/ansible-dev-tools#709)) [@cidrblock](https://github.com/cidrblock) --- ##### [\`26.3.0\`](https://github.com/ansible/ansible-dev-tools/releases/tag/v26.3.0) #### Fixes - fix: update devtools tools to 26.3.0 ([#701](ansible/ansible-dev-tools#701)) [@ssbarnea](https://github.com/ssbarnea) - fix: entry point and pytest config ([#694](ansible/ansible-dev-tools#694)) [@ssbarnea](https://github.com/ssbarnea) - fix: compatibility with newer tox releases ([#700](ansible/ansible-dev-tools#700)) [@ssbarnea](https://github.com/ssbarnea) - fix: selenium container ([#698](ansible/ansible-dev-tools#698)) [@ssbarnea](https://github.com/ssbarnea) - fix: selenium container arm64 ([#695](ansible/ansible-dev-tools#695)) [@ssbarnea](https://github.com/ssbarnea) #### Maintenance - chore(deps): update pep621 ([#708](ansible/ansible-dev-tools#708)) @[renovate\[bot\]](https://github.com/apps/renovate) - chore(deps): update all dependencies ([#707](ansible/ansible-dev-tools#707)) @[renovate\[bot\]](https://github.com/apps/renovate) - chore(deps-dev): bump black from 26.3.0 to 26.3.1 in the uv group across 1 directory ([#705](ansible/ansible-dev-tools#705)) @[dependabot\[bot\]](https://github.com/apps/dependabot) - chore: update mkdocs ([#703](ansible/ansible-dev-tools#703)) [@ssbarnea](https://github.com/ssbarnea) - chore(deps): update all dependencies ([#702](ansible/ansible-dev-tools#702)) @[renovate\[bot\]](https://github.com/apps/renovate) - chore(deps): update all dependencies ([#696](ansible/ansible-dev-tools#696)) @[renovate\[bot\]](https://github.com/apps/renovate) - chore: improve test robustness for devspaces environment ([#697](ansible/ansible-dev-tools#697)) [@VedantMadane](https://github.com/VedantMadane) - chore: add adt and python extension to selenium container ([#699](ansible/ansible-dev-tools#699)) [@ssbarnea](https://github.com/ssbarnea)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
especially with coverage
total coverage reporting from now on. (75%)