bazel-contrib / bazel-contrib/rules_python
Allow customized coveragerc for Python coverage
- 主要语言
- Starlark
- 星标
- 688
- 派生
- 721
- 平均合并
- 15 小时 7 分钟
- 30 天内合并 PR
- 76
描述
### Description of the feature request:
For python coverage collection, `.coveragerc` is hardcoded in https://github.com/bazelbuild/bazel/blame/d435c6dd6e977a5c3ea1bc726557a9321948a317/tools/python/python_bootstrap_template.txt#L393-L397. To provide configurability, we'd like to introduce custom `.coveragerc` to set configurations including https://coverage.readthedocs.io/en/stable/excluding.html#advanced-exclusion.
### Which category does this issue belong to?
Configurability, Python Rules
### What underlying problem are you trying to solve with this feature?
Allow coverage configurations. In particular, we're interested in excluding import statements being collected as executable lines in coverage reports.
### Which operating system are you running Bazel on?
macOS, Linux
### What is the output of `bazel info release`?
release 6.3.0
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse master; git rev-parse HEAD` ?
_No response_
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
贡献指南
调研方向
首先阅读 tools/python/python_bootstrap_template.txt 第393-397行附近的内容,其中硬编码了 .coveragerc 路径,并跟踪 Python coverage 在 macOS 和 Linux 上的收集方式。完成的标准是,用户可以提供自定义的 .coveragerc 并配置 coverage 排除项(包括 import 语句),同时默认行为仍然可用。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- build-system
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100