[Refactor]: Make shared ingestion script helpers public
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 32/100
Direzione di ricerca
Start with the cross-imports in backend/app/scripts/ingestion/archive_client.py and archive_ingestor_core.py, then run the grep in the acceptance criteria to list every _-prefixed import. Decide per helper whether it is renamed or moved, and update the test imports and patch targets to match. Done means the grep returns nothing outside the PR's listed exceptions and make backend-test and make pre-commit-run pass. The module-split choices need maintainer agreement before you start.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem?
Modules in backend/app/scripts/ingestion/ import about 100 private (_-prefixed) names from each other. These helpers are shared APIs in practice, but their names say otherwise. That makes it unclear which functions are safe to change, and the call graph is hard to follow.
The heaviest dependencies:
| Provider | Importers | Examples |
|---|---|---|
archive_client.py |
hpc_upload_archive_ingestor, nersc_archive_ingestor, archive_source_directories, archive_workflow, backfill/metadata |
_build_config_from_env, _fetch_ingestion_state, _fetch_archive_checkpoints, _build_json_request, _http_request_error |
archive_ingestor_core.py |
Almost every script | _log_event (12 imports), _log_multiline_event |
archive_workflow.py |
hpc_upload_archive_ingestor, nersc_archive_ingestor |
_validate_run_preconditions, _handle_ingest_run, _finalize_archive_checkpoints |
archive_discovery.py |
archive_workflow, archive_source_directories, hpc_upload_archive_ingestor |
_scan_archive, _settled_archive_snapshot_keys, _build_processed_ids_by_key |
archive_layout.py |
archive_discovery, archive_source_directories, backfill/metadata, v3_data/lcrc_v3_archive_ingestor |
_case_identity_key, _filter_archive_walk_dirnames |
Scripts also reach into app/features and app/common for private names: features.ingestion.ingest._normalize_path_candidate, private helpers in features.ingestion.parsers.parser, and common.utils._normalize_hpc_username.
Related: #306 (feature module split).
Describe the solution you'd like
- Make every helper imported by another module public (drop the
_prefix). Keep helpers used in only one module private. - Where a provider module is mainly shared helpers (for example,
archive_client.pyand the logging helpers inarchive_ingestor_core.py), consider moving those helpers into a focused module such asarchive_logging.pyorarchive_http.pyinstead of only renaming them. - Make
common.utils._normalize_hpc_usernameandfeatures.ingestion.ingest._normalize_path_candidatepublic, or move them to a shared utility module. - Update test imports and
patch(...)targets for renamed names.
Acceptance criteria
-
No module under
app/scripts/ingestion/imports a_-prefixed name from another module. Verify with:grep -rnE "^from app\.[a-z_.]+ import .*\b_[a-z]" app/scripts/ingestionThe output should be empty, apart from any exceptions listed in the PR description.
-
No behavior change:
make backend-testandmake pre-commit-runpass.
Describe alternatives you've considered
- Keep the names private and document the module boundaries. This doesn't fix the misleading names or stop accidental breakage.
- Merge the scripts into fewer, larger modules. This removes the cross-imports but makes the files bigger, which is the opposite of what we want.
Additional context
The same pattern appears outside scripts: app.core.logger._setup_custom_logger and _setup_root_logger are imported across the app. Include them if the change stays small.
- Lingua principale
- Python
- Stelle
- 2
- Fork
- 2
- Merge medio
- 12h 49m
- PR unite (30g)
- 30
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di E3SM-Project/simboard
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
E3SM-Project/simboard#504 ·
I maintainer di solito rispondono entro 1 giorno
-
doc
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
E3SM-Project/simboard#356 ·
I maintainer di solito rispondono entro 1 giorno
-
devops
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
E3SM-Project/simboard#292 ·
I maintainer di solito rispondono entro 1 giorno
-
devops
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
E3SM-Project/simboard#170 ·
I maintainer di solito rispondono entro 1 giorno
-
refactor
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
E3SM-Project/simboard#509 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di E3SM-Project/simboard
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
hermes hooks doctor smoke test never checks the hook exit code — a crashing hook (exit=1) renders ✓ "ran clean" and "All shell hooks look healthy"Forse già presa @cestercian l’ha presa oggi. Apertacomp/cli P2 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
NousResearch/hermes-agent#162259 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
AOSSIE-Org/PictoPy#1802 · 2 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
community-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NVIDIA-NeMo/Run#727 ·
I maintainer di solito rispondono entro 1 giorno
-
bot-triaged module: higher order operators module: pickle module: pt2-dispatcher oncall: pt2 triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
pytorch/pytorch#207247 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno