refactor: elimina 4 duplicazioni CLI, sposta sql_dry_run in core - #441
Merged
Conversation
- dump_cfg_section → ensure_dict (common.py, -20) - _quoted_identifier → q_ident (sql_dry_run.py, -3) - sql_dry_run.py → core/sql_validation.py (+backward compat) - _batch_helpers.py rimosso (orfano, -79) - _run_pipeline/_execute_pipeline separati (cmd_run.py -292) - ADR-003 superseded Totale: -164 nette, 12 file, 1234 test
Review PR #441: - Critical: _run_batch usciva con 0 quando _run_pipeline ritornava status=failed senza eccezione (config check fallito). Ora exit 1 se failures o qualsiasi riga non SUCCESS/DRY_RUN. - Medium: report batch ri-segnala DRY_RUN (era perso dopo refactor). summary.passed conta SUCCESS+DRY_RUN. - Medium: test dry-run ripristinati con assert sui messaggi errore (normalizzati per il logger rich che spezza le righe). - Low: ensure_dict documentato (filtro None == vecchio dump_cfg_section). - Test batch: config test con read.columns esplicite per SQL validation dry-run.
Member
Author
Fix review applicati (commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sintesi
Elimina 4 punti di duplicazione tra CLI e moduli interni del toolkit.
Sposta
sql_dry_run.pydacli/acore/sql_validation.py(non è logica CLI).Rimuove
_batch_helpers.py(orfano dopo refactor_run_batch).Cosa cambia
Impatto su contratti pubblici
sql_dry_run) con backward compat stub +DeprecationWarningCosa è stato fatto
dump_cfg_section→ re-export diensure_dictcommon.py_quoted_identifier→q_identsql_dry_run.pysql_dry_run.py→core/sql_validation.py_batch_helpers.pyrimosso (orfano)_run_pipeline/_execute_pipelineseparaticmd_run.py1267→975Verifica
pytest -m corepassaruff check .passamypy toolkit/passa (2 errori preesistenti in read_excel.py e profile/raw.py, non toccati)sql_dry_runrimosso: verificato conrgsu org, lasciato stub backward compatChecklist PR
rgverificato, shim backward compat conDeprecationWarningNote per chi revisiona
sql_dry_run.pyè ora uno stub che re-exporta dacore/sql_validation.pye stampaDeprecationWarningcommon.py:dump_cfg_sectionè ora un alias dicore.config.ensure_dict(stessa logica, firma identica)_batch_helpers.pynon era importato da nessun modulo di produzione (solo da test, rimosso)cmd_run.pyda 1267 a 975 righe:_run_pipeline()(esecuzione pura) separata da_execute_pipeline()(presentazione CLI)