feat(scripts): read-only clone mode — add --skip-source-stage-update to import.py (pull-sequences)

オープン 初心者向け
#152 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

  • #154 @Chouffe による — マージされずにクローズ

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python
領域
api, backend

調査の方向性

scripts/data_transfer/ingestion/platform/import.py の803~809行付近から始め、pull_sequence_annotations.py にある --no-stage-update の先例と比較してください。提供された clone コマンドを --skip-source-stage-update 付きで実行し、ソース上で update_source_annotations_stage() を呼び出さずにシーケンスがローカルにインポートされることを確認してください。含まれている場合は、Makefile と README のローカルテストに関する注記も確認してください。

索引モデルが issue の本文から書いたものです。

説明

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-run skips 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 in import.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.

主要言語
TypeScript
スター
0
フォーク
1
平均マージ
2日 6時間
マージ済み PR(30日)
4

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pyronear/pyro-annotator のほかの issue

pyronear/pyro-annotator の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。