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

Aperta Adatta ai principianti
#152 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

  • #154 di @Chouffe — chiusa senza merge

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
api, backend

Direzione di ricerca

Inizia in scripts/data_transfer/ingestion/platform/import.py intorno alle righe 803-809 e confronta il precedente --no-stage-update in pull_sequence_annotations.py. Esegui il comando clone fornito con --skip-source-stage-update e verifica che le sequenze vengano importate localmente senza chiamare update_source_annotations_stage() sull'origine; considera le note per i test locali di Makefile e README, se incluse.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
0
Fork
1
Merge medio
2g 6h
PR unite (30g)
4

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pyronear/pyro-annotator

Tutte le issue di pyronear/pyro-annotator

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.