ENH: consistent reporting and exit codes for pytensor-cache clear and unlock

Đang mở
#2,534 3 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
55/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
cli

Hướng nghiên cứu

Read the implementations of the clear, unlock, and cleanup commands, along with issue #2531 for the stderr reporting convention. Trace how each command determines what it changed and whether files remain; done means consistent outcome reports and exit codes that indicate partial failure. The issue does not name specific files or tests, so first locate the command entry points and their existing tests.

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

Mô tả

Description

Observed behavior across the mutating commands:

  • clear prints nothing on success; it warns only when tmp* entries remain.
  • unlock prints "Lock successfully removed!" even when no lock existed (verified: exit 0).
  • clear and cleanup exit 0 even when delete_if_problem=True leaves files behind.

So some commands report their outcome and some do not, and the exit code does not distinguish full success from partial success.

Proposal

Make outcome reporting consistent across commands:

  • Every command reports what it did in the same style: action taken, count/bytes where applicable.
  • unlock: distinguish "no lock found" from "removed stale lock".
  • Exit codes reflect the outcome: nonzero on partial failure.

Reporting goes to stderr per #2531; data summaries on stdout.

Ngôn ngữ chính
Python
Star
655
Fork
266
Merge trung bình
3 ngày 23 giờ
Pull request đã merge (30 ngày)
43

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 pymc-devs/pytensor

Tất cả issue của pymc-devs/pytensor

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.