Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

-s3_fast with -r, -g or -b also runs the full step 3 with LED fits

Đang mở Phù hợp với người mới
#176 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
84/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
cli, testing

Hướng nghiên cứu

Đọc ledsa/core/parser_arguments_run.py quanh dòng 60–75 và lần theo cách các cờ màu thiết lập step_3 và step_3_fast. Thêm các bài kiểm thử để xác nhận -s3_fast -r chỉ chạy bước nhanh và chỉ riêng -r vẫn chạy bước 3; chạy bộ kiểm thử liên quan. Công việc hoàn tất khi cả hai tổ hợp đối số đều chọn đúng bước dự kiến.

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

Mô tả

bug

Problem

python -m ledsa -s3_fast -r runs the full step 3, with the LED fit on every LED of every image, and then the fast step 3 again. -g and -b behave the same way. Only -s3_fast -rgb, the combination the README shows, runs the fast step alone.

Cause

parser_arguments_run.py, line 60:

if args.red or args.green or args.blue or args.rgb and not args.step_3_fast:
    args.step_3 = True

and binds tighter than or, so the condition reads red or green or blue or (rgb and not step_3_fast), and the not step_3_fast guard only applies to -rgb. With -r, step_3 is set, so the full step 3 runs (line 70) before the fast one (line 75).

Impact

The fast run overwrites the result files of the full run, so the values that end up in analysis/channel*/ are those of the fast step. What is lost is the runtime of the LED fits, by far the slowest part of step 3, and logfiles/warnings.log collects the warnings of failed fits that were never asked for.

Fix

Group the colour flags before the guard:

if (args.red or args.green or args.blue or args.rgb) and not args.step_3_fast:
    args.step_3 = True

and add a test that -s3_fast -r runs only the fast step 3, while -r alone still runs step 3.

Ngôn ngữ chính
Python
Star
7
Fork
4
Merge trung bình
3 giờ 55 phút
Pull request đã merge (30 ngày)
32

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 FireDynamics/LEDSmokeAnalysis

Tất cả issue của FireDynamics/LEDSmokeAnalysis

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.