posit-dev / posit-dev/rsconnect-python

Consider supporting additional dependency formats

Đang mở
#327 1 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Python
Star
37
Fork
28
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
7

Mô tả

We use bot RSConnect and pypoetry quite a bit. It would be great if rsconnect-python supported deploying pypoetry projects or other ways of plugging in to pyproject.toml buiold systems.

We currently work around this limitation by wrapping rsconnect with our own tool that first runs poetry export (without extra repo urls) and copies our apps (stored using an src project layout) to a deploy directory containing the AppStore json file. We use the fact that rsconnect.environment stops after finding a requirements.txt.

There's multiple aspects of this request:

Implementation options
1.1 Possibly consider supporting poetry directly
1.2 There are other competing approaches to python dependencies e.g. PEP 631 allows dependencies in the pyproject.toml and other package management tools like Hatch use that. Allow cli callers to specify a cli tool to be called for resolving project dependencies
1.3 like 1.2 but only expose it via an api (i.e. pluggable build / dependency systems would only be supported by writing a custom tool that has rsconnect-python as a dependency and invokes it programatically.

Streamline non-pypi package registries
When running poetry export on a project that's setup to use non pypi repositories, extra pip urls are included at the top of the generated requirements.txt. When the repo is private and password protected

  1. rsconnect-python fails to properly parse the requirements
  2. the username and password are included in the file, which is insecure given how connect deploys content.
    We currently work around this by stripping any extra pip url lines and manually configuring the connect serve's pipconf with the required private package registry details.

Support other project layouts
We organize all our project sources under a src folder. Poetry already knows about our python path and where our sources, tests and resources live. One possible approach would be to allow deploying an app by copying dist tarball since poetry build can easily produce that (the poetry.lock / poetry export should still be used to resolve dependencies though).

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với cách rsconnect.environment xử lý requirements.txt được mô tả trong issue, sau đó tái hiện workflow poetry export và trường hợp registry riêng tư. So sánh việc phân giải dependency được yêu cầu trong pyproject.toml, các layout src và các tùy chọn triển khai tarball dist. Để hoàn tất, cần xác định phạm vi và hướng triển khai bao quát hành vi dependency và layout project đã chọn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
build-system, cli
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.