Azure / Azure/azure-sdk-for-python
Add per-package `coverage` enforcement mechanism
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
@pdhotems has requested that we enforce a minimum code coverage number, below which we will deny the pullrequest.
I didn't receive any specific feedback on the feature itself. I think the way I'd _want_ this to work is to offer a `pyproject.toml` customization that will enable this behavior. That way nobody will be surprised.
Here is a section of the `azure-ai-ml` `pyproject.toml`
```toml
# existing config
[tool.azure-sdk-build]
mypy = true
pyright = false
type_check_samples = false
pylint = true
mindependency = false
latestdependency = false
black = true
# new keys
enforce_coverage = true
coverage_limit = 0.3 # the check will be <=
```
Where the overall coverage goal comes from `coverage_limit`, and `enforce_coverage` enables this behavior. Opt-in to start.
Contributor guide
Assessment
This issue has not been assessed yet.