Introduce pytest integration out of the box
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- python
- 領域
- build-system, testing
調査の方向性
まず、#2094 のデフォルト PyPI hub 提案と、issue で言及されている既存の py_test、main_module、dependency declaration、version-marker の処理を確認します。完了条件は、discovery、dependency overrides と versions、optional dependencies、および out-of-the-box の pytest workflow について、設計が確定していることです。
索引モデルが issue の本文から書いたものです。
説明
Currently users need to know about pytest-bazel or other ways to integrate rules_python with bazel.
Ideally the discovery and onboarding of new users should be as easy as we can make it to be without making rules_python unclude everything and the kitchen sink.
Some ideas how we could do this:
- Implement the default pypi hub idea #2094
- pre-declare the pytest and pytest-bazel dependencies, where we would generate entries in the hub repo with aliases. Maybe we could define a particular default version for everything to work out of the box.
- create a pytest_test rule where we are using the declared deps.
- the users can override the pytest and other included deps.
- use the main_module attribute to launch pytest-bazel. If pytest is not there users would get an error that it could not be imported.
Open questions:
- can we default to pytest-bazel in all py_test invocations if there is no main or main_module defined?
- Is "pypi" a good name to reserve as the default hub repo? How does the predeclaring work? We just accept the same args as whl_library but all optional?
- Who can pre-declare deps and if multiple versions are declared, which one do we chose? We have version marker parsing in rules_python and we can even do resolution based on version ranges, e.g. users declare that they need pytest 7.1 or above and we get the lowest available version that satisfies the conditions. We can also do this by python version since we have marker expression evaluation support.
- How to handle sharding related optional dependencies?
- How to handle other features that may require extra plugins?
Design goals
- no overhead in the number of targets, hence usage of main_module.
- little maintenance in rules_python.
- better out of the box experience. How would the users discover the feature?
- 主要言語
- Starlark
- スター
- 690
- フォーク
- 722
- 平均マージ
- 1日 55分
- マージ済み PR(30日)
- 38
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bazel-contrib/rules_python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
bazel-contrib/rules_python#4179 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
bazel-contrib/rules_python#4164 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bazel-contrib/rules_python#3821 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
bazel-contrib/rules_python#4181 ·
-
Release 2.4.0 オープンtype: release
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
bazel-contrib/rules_python#4175 · コメント 3 件 ·
bazel-contrib/rules_python の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
typelevel/sbt-typelevel#929 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
openSUSE/python-rpm-macros#219 ·
-
HMR stops working オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
Qiskit/mcp-servers#221 ·