Make anywidget an optional dependency?

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
44/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
build-system

Hướng nghiên cứu

Start in pyproject.toml at the dependency list and locate the anywidget entry, then grep the package for anywidget imports to see which module owns the notebook widget path. Confirm the static PNG/SVG rendering path never imports it, so an install without the extra still exports images. Done means anywidget moves to an optional extras group, the widget import fails with a clear message when absent, and the test suite passes both with and without the extra installed. Note the issue asks a design question, so a maintainer's answer on the intended policy comes first.

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

Mô tả

Thanks for creating XY I was looking for a lightweight alternative to Matplotlib for generating static plots, and XY caught my attention.

Currently, anywidget is listed as a mandatory dependency in pyproject.toml.

However, it seems to be primarily used for interactive notebook display, while static exports such as PNG and SVG use separate rendering paths.

For users who only use XY for static image generation (e.g. in batch processing or server-side scripts), installing anywidget and its dependencies seems unnecessary.

Would it be possible to make anywidget an optional dependency, required only when using the notebook widget functionality?

Or is there a reason why it needs to be a mandatory dependency?

Ngôn ngữ chính
Python
Star
1.9k
Fork
81
Merge trung bình
7 giờ 57 phút
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

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.

Issue khác của reflex-dev/xy

Tất cả issue của reflex-dev/xy

Issue tương tự

Thêm issue về Python

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.