bazel-contrib / bazel-contrib/rules_python
Allow customized coveragerc for Python coverage
- Langage dominant
- Starlark
- Étoiles
- 688
- Forks
- 721
- Merge moyen
- 15 h 7 min
- PR mergées (30 j)
- 76
Description
### 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_
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par lire tools/python/python_bootstrap_template.txt autour des lignes 393-397, où le chemin de .coveragerc est codé en dur, et suivez la manière dont la couverture Python est collectée sur macOS et Linux. Le travail est terminé lorsque les utilisateurs peuvent fournir un .coveragerc personnalisé et configurer des exclusions de couverture, y compris les instructions d'importation, sans que le comportement par défaut devienne inutilisable.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- build-system
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100