Introduce pytest integration out of the box
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python
- Lĩnh vực
- build-system, testing
Hướng nghiên cứu
Bắt đầu bằng việc xem xét đề xuất PyPI hub mặc định trong #2094 và cách xử lý hiện có đối với py_test, main_module, dependency declaration và version-marker được đề cập trong issue. Công việc được xem là hoàn tất khi có thiết kế đã được thống nhất cho discovery, dependency overrides và versions, optional dependencies, cũng như pytest workflow out-of-the-box.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- Starlark
- Star
- 690
- Fork
- 722
- Merge trung bình
- 1 ngày 55 phút
- Pull request đã merge (30 ngày)
- 38
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của bazel-contrib/rules_python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
bazel-contrib/rules_python#4179 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
bazel-contrib/rules_python#4164 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bazel-contrib/rules_python#3821 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
bazel-contrib/rules_python#4181 ·
-
Release 2.4.0 Đang mởtype: release
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
bazel-contrib/rules_python#4175 · 3 bình luận ·
Tất cả issue của bazel-contrib/rules_python
Issue tương tự
-
nix: vendorHash is outdated Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
typelevel/sbt-typelevel#929 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
openSUSE/python-rpm-macros#219 ·
-
HMR stops working Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Qiskit/mcp-servers#221 ·