Azure / Azure/azure-sdk-for-python

Add per-package `coverage` enforcement mechanism

オープン
#39,339 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
EngSys
主要言語
Python
スター
5.6k
フォーク
3.4k
平均マージ
2日 2時間
マージ済み PR(30日)
213

説明

@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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、azure-ai-ml pyproject.toml [tool.azure-sdk-build] の設定がどのように読み取られるか、また pull request のチェックでカバレッジがどこで計算されるかを確認します。enforce_coverage と coverage_limit のオプトイン動作を定義し、カバレッジが設定された上限以下の場合に何が起こるかを含めたうえで、リポジトリに既存のチェックテストを使用して動作を検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
build-system, ci-cd, testing
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。