feat(scripts): read-only clone mode — add --skip-source-stage-update to import.py (pull-sequences)
Chưa có ai nhận issue này.
- #154 của @Chouffe — đã đóng, không merge
Đá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
- 78/100
Hướng nghiên cứu
Bắt đầu tại scripts/data_transfer/ingestion/platform/import.py, khoảng các dòng 803-809, và so sánh với tiền lệ --no-stage-update trong pull_sequence_annotations.py. Chạy lệnh clone được cung cấp với --skip-source-stage-update và xác minh rằng các sequence được import cục bộ mà không gọi update_source_annotations_stage() trên source; xem xét các ghi chú kiểm thử cục bộ trong Makefile và README nếu có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Finding
make pull-sequences (clone mode of scripts/data_transfer/ingestion/platform/import.py) is not read-only against the source API: after a successful clone it PATCHes every cloned sequence's annotation on the source to under_annotation (update_source_annotations_stage(), called at import.py:803-809) to "claim" the sequences for workflow A.
That behavior is correct for the production annotation workflow, but it makes it impossible to hydrate a local API from the remote for testing/debugging without mutating remote state:
- There is no flag to skip the source stage update.
--dry-runskips the source update but also skips the import itself, so it can't be used for hydration.- The equivalent flag exists in the pipeline-B pull script (
pull_sequence_annotations.py --no-stage-update, read-only export) — but not inimport.py.
Proposal
Add a --skip-source-stage-update flag to import.py (mirroring the --no-stage-update precedent) that guards the update_source_annotations_stage() call, so clone mode can run read-only against the source:
uv run python -m scripts.data_transfer.ingestion.platform.import \
--source-annotation-url https://annotationapi.pyronear.org \
--url-api-annotation http://localhost:5050 \
--max-sequences 10 \
--clone-processing-stage ready_to_annotate \
--skip-source-stage-update
Optionally expose it through the Makefile (e.g. make pull-sequences READ_ONLY_SOURCE=1) and mention it in the README's local-testing notes.
- Ngôn ngữ chính
- TypeScript
- Star
- 0
- Fork
- 1
- Merge trung bình
- 2 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có 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 pyronear/pyro-annotator
-
hackathon-theodo P2-medium T4-26 topic: frontend type: enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
pyronear/pyro-annotator#409 ·
-
type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
pyronear/pyro-annotator#397 ·
-
type: enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
pyronear/pyro-annotator#322 ·
-
Backend: fix make test warningsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
pyronear/pyro-annotator#68 · 1 bình luận ·
-
P1-high topic: frontend type: bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
pyronear/pyro-annotator#428 ·
Tất cả issue của pyronear/pyro-annotator
Issue tương tự
-
reproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 61/100
anomalyco/opencode#62873 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
code-quality good-first-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
OpenRailAssociation/netzgrafik-editor-frontend#1481 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🙌 icon request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
lucide-icons/lucide#5183 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Unhandled rejection when a call fails before delivery and an argument is an imported promiseĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 81/100
cloudflare/capnweb#293 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug implicit-state
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100