-
Notifications
You must be signed in to change notification settings - Fork 17
Update coverage and developer configuration #157
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b14bae7
Update developer configuration
cidrblock 86c412a
chore: auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d516ab4
Fix commands
cidrblock f97088c
Fix tox
cidrblock 166d2b8
chore: auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 68471e2
Final fix for coverage error
cidrblock File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
pytest | ||
black | ||
coverage[toml] | ||
mypy | ||
pip-tools | ||
pre-commit | ||
pydoclint | ||
pytest | ||
pytest-xdist | ||
ruff | ||
toml-sort | ||
tox | ||
types-PyYAML |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
{ | ||
"recommendations": [ | ||
"charliermarsh.ruff", | ||
"esbenp.prettier-vscode", | ||
"markis.code-coverage", | ||
"ms-python.black-formatter", | ||
"ms-python.debugpy", | ||
"ms-python.mypy-type-checker", | ||
"ms-python.pylint", | ||
"charliermarsh.ruff", | ||
"matangover.mypy", | ||
"esbenp.prettier-vscode" | ||
"ms-python.python", | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
{ | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
// Override the pyproject.toml and disable xdist to enable test debugging | ||
"python.testing.pytestArgs": ["-n0", "--dist", "no"], | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[python]": { | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "explicit" | ||
"source.fixAll": "explicit", | ||
"source.organizeImports": "explicit" | ||
}, | ||
"editor.defaultFormatter": "charliermarsh.ruff" | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"editor.formatOnSave": true | ||
}, | ||
"mypy.runUsingActiveInterpreter": true, | ||
"mypy.targets": ["src", "tests"], | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
"markiscodecoverage.searchCriteria": "coverage.lcov", | ||
"mypy-type-checker.importStrategy": "fromEnvironment", | ||
"mypy-type-checker.preferDaemon": true, | ||
"mypy-type-checker.reportingScope": "workspace", | ||
"python.testing.pytestArgs": ["tests"], | ||
"python.testing.pytestEnabled": true, | ||
"python.testing.unittestEnabled": false | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"""Global conftest.py for pytest. | ||
|
||
The root package import below happens before the pytest workers are forked, so it | ||
picked up by the initial coverage process for a source match. | ||
|
||
Without it, coverage reports the following false positive error: | ||
|
||
CoverageWarning: No data was collected. (no-data-collected) | ||
|
||
This works in conjunction with the coverage source_pkg set to the package such that | ||
a `coverage run --debug trace` shows the source package and file match. | ||
|
||
<...> | ||
Imported source package 'ansible_dev_environment' as '/**/src/<package>/__init__.py' | ||
<...> | ||
Tracing '/**/src/<package>/__init__.py' | ||
""" | ||
|
||
import ansible_dev_environment # noqa: F401 |
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
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.
Uh oh!
There was an error while loading. Please reload this page.