Repository navigation
chore(scripts): rimuovi 8 script morti, sostituisci audit-imports con test di layering - #508
Merged
Merged
Conversation
- test_clean_duckdb_read: i 3 test ODS usano importorskip("odf") —
fallivano in env senza extra pandas (CI resta verde grazie a [dev,pandas])
- test_smoke_scout: i 4 test con URL reali (finanze.gov.it, consip.it)
dietro RUN_NETWORK_SMOoke=1 come RUN_S3_SMOKE — lo step smoke CI
(-m smoke) li includeva nonostante il docstring dicesse il contrario,
creando dipendenza da endpoint esterni; il test puro infer_years
resta smoke e gira sempre
L'audit markers richiede un marker per ogni test nei file toccati; i 4 test di rete avevano solo skipif senza marker. Stesso pattern di test_s3_parquet_smoke: @pytest.mark.smoke + skipif env var — restano collezionabili da -m smoke ma saltano senza RUN_NETWORK_SMOKE=1.
… test di layering Rimossi (nessun riferimento da CI/Makefile/docs, o referenziano moduli/file eliminati): - audit-imports.py (referenziava core.parquet/core.artifacts, eliminati) - audit_test_markers.py (sovrapposto a conftest + marker pytest) - find-contract.sh (equivale a rg) - generate-contracts-map.py (sostituito da toolkit contract CLI + MCP) - quality/check_tests.py + legacy/strict lists (mai wired nel CI, sovrapposto alla allow-list di conftest) - usage_matrix.py (referenzia file morti: dataset.test.yml, ecc.) Tenuti: smoke_install_cli.py (usato dalla CI, testa il packaging) e pre-commit (citato da CONTRIBUTING, hook manuale senza framework). Sostituto del valore residuo di audit-imports: tests/test_layering_guard.py — test pytest che fallisce se un modulo toolkit.core.* importa un layer superiore. Rende meccanico il guard che PR #504 ha ripristinato a mano. Suite: 1317 passed, 0 falli, 23s.
Gabrymi93
force-pushed
the
chore/drop-dead-scripts
branch
from
October 13, 2026 21:54
3337747 to
6be1f39
Compare
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
Rimuove 8 script morti da
scripts/e sostituisce l'unico con valore residuo (audit-imports.py) con un test di layering automatico.Contesto collegato
Analisi di
scripts/: 8 su 10 file non referenziati da CI/Makefile/docs, o referenziano moduli/file eliminati (core.parquet,core.artifacts,dataset.test.yml).Cosa cambia
Rimossi
audit-imports.pycore.parquet,core.artifacts)audit_test_markers.pyfind-contract.shrggenerate-contracts-map.pytoolkit contractCLI + MCPquality/check_tests.py+ 2 listusage_matrix.pydataset.test.yml,clean_ispra_test.sql)Tenuti
smoke_install_cli.py— usato dalla CI, testa il packaging (venv pulita +pip install .+ CLI entry point)pre-commit— citato da CONTRIBUTING, hook manuale senza framework pre-commitAggiunto
tests/test_layering_guard.py(46 righe, markerpolicy): test AST che fallisce se un modulotoolkit.core.*importa un layer superiore (clean/mart/raw/domain/scout/scaffold/plugins/cli/mcp). Sostituisce il guard manuale che PR #504 ha ripristinato.Verifica
Metriche PR
Checklist PR