Repository navigation
refactor(decoupling): rimuovi dipendenza toolkit → lab_connectors.discovery - #427
Merged
Merged
Conversation
Gabrymi93
force-pushed
the
feat/lc-decoupling
branch
2 times, most recently
from
October 13, 2026 10:50
80683e5 to
d2fa348
Compare
…covery
SO importa ora direttamente da lab_connectors.discovery.
Zero import toolkit rimasti in scripts/, so_mcp/, tests/.
- collectors/html.py → import da lab_connectors.discovery.{classify,links}
- collectors/_validate_base.py → import da lab_connectors.discovery.{infer,links}
- radar_check.py → import da lab_connectors.discovery.classify
- scripts/portal.py → probe_html_portal portato da toolkit (SO-specifico, 1 fonte)
- pyproject.toml → toolkit → lab-connectors[duckdb,gcs,mcp]
- tests/ → import aggiornati a LC
Prerequisito: lab-connectors feat/discovery-module (da mergiare PRIMA).
29 test pass. ruff pulito.
Pilot appalti-pubblici (ANAC): - ckan.py: user_agent da config [tool.observatory] per bypassare WAF che blocca UA non-browser (dati.anticorruzione.it) - upstream.py: riconosce dataset_id (ckan_dataset) oltre a resource_id - schema: enum esteso con ckan_dataset Verificato: 70 package inventariati, 8/8 datasets_in_use upstream mappati. Validate 0/48 per WAF sui probe HEAD (nota: il validatore condiviso non riceve l'UA dal config — miglioramento futuro).
Il WAF ANAC blocca anche i probe HEAD del validatore CKAN (UA di default). run_validate accetta ora user_agent opzionale, passato dal config [tool.observatory] nel build_catalog. Verificato su appalti-pubblici: 47/48 reachable (prima 0/48), 22 CSV.
PortalProfile, fetch_robots_sitemaps, fetch_sitemap_pages spostati da lab_connectors/discovery/portal.py. SO è l'unico consumer.
Gabrymi93
force-pushed
the
feat/lc-decoupling
branch
from
October 13, 2026 10:59
c821656 to
ed17c9e
Compare
Merged
2 of 8 tasks
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
SO importa ora direttamente da
lab_connectors.discovery. Rimossa la dipendenza da toolkit. Zero import toolkit rimasti inscripts/,so_mcp/,tests/.Contesto collegato
Piano:
_local/notes/current/PLAN_scout_LC_decoupling_2026-10-12.mdPrerequisito: lab-connectors#90 (da mergiare PRIMA)
Cosa cambia
Dettaglio
scripts/collectors/html.pylab_connectors.discovery.{classify,links}scripts/collectors/_validate_base.pylab_connectors.discovery.{infer,links}scripts/radar_check.pylab_connectors.discovery.classifyscripts/portal.pyprobe_html_portalportato da toolkit (SO-specifico, 1 fonte)pyproject.tomldataciviclab-toolkit→lab-connectors[duckdb,gcs,mcp]tests/Impatto su consumer downstream
pyproject.tomlaggiornatoVerifica
pytest tests/ # 29 pass ruff check scripts/Ordine di merge