bazel-contrib / bazel-contrib/rules_python
Allow customized coveragerc for Python coverage
- 主要言語
- Starlark
- スター
- 688
- フォーク
- 721
- 平均マージ
- 15時間 7分
- マージ済み PR(30日)
- 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 のパスがハードコードされている箇所を確認して、macOS と Linux で Python のカバレッジがどのように収集されるかを追跡します。完了の条件は、ユーザーがカスタムの .coveragerc を指定し、import 文を含むカバレッジの除外を設定でき、デフォルトの動作が使用できなくならないことです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- build-system
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100