Repository navigation
refactor(data): location_urls da lab-connectors, via gcs_manifest - #284
Merged
Merged
Conversation
Util e registry non duplicano più la logica di risoluzione: - _parquet_exists/_parquet_refs usano location_urls() (path puntuale, glob per anno, espansione via listing) e object_exists() sul path canonico. - rimosso il download di gcs_manifest.json (7,3 MB) da ogni processo loader: era l'unico consumer rimasto dell'artefatto in dismissione. - resolve_url_slug() delega a lab_connectors.registry.to_url_slug: sparisce la copia locale degli override editoriali. pytest tests: 29 passed.
Review #284: - voti-deputati importava _load_manifest e risolveva mart_sintesi dal manifest (con bucket clean per errore). Ora usa il path contract mart (prefix dalla location clean + object_exists su MART_BUCKET). - _parquet_exists su location puntuale è year-aware: se il path ha un anno diverso da quello richiesto ritorna False (prima faceva HEAD e diceva sempre True). - test statico: nessun loader importa i simboli privati rimossi. - docstring dei test aggiornata (niente più gcs_manifest).
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
Il data layer dell'Explorer smette di duplicare la risoluzione dei path e smette di scaricare
gcs_manifest.json._parquet_exists()/_parquet_refs()usanolab_connectors.gcs.paths.location_urls()eobject_exists();resolve_url_slug()delega alab_connectors.registry.to_url_slug;URL_SLUG_OVERRIDESe il download del manifest (7,3 MB per processo loader, ~55 processi per build).Contesto collegato
Nessuna issue: segue lab-connectors#97 (merged, v0.16.0) e chiude l'ultimo consumer di
gcs_manifest.json.Cosa cambia
Standard check
toLocaleStringtableFormateInputs.tablein celle separatebuildMapLookup()duckdb.connect()—safe_connect()Verifica
Risultato: 31 passed; ruff pulito.
Note per chi revisiona
_parquet_existsconlocationglob fa una listing per dataset (poi match sull'anno) invece di una HEAD per anno; se la listing fallisce ricade su HEAD del singolo anno._parquet_exists/_parquet_refs/get_locationnon cambiano: le firme restano identiche.gcs_manifest.jsonnon ha più consumer funzionali: si può fermarelab-connectors/.github/workflows/gcs-manifest.ymle deprecareread_manifest().Fix dopo review
voti-deputati: non importa più_load_manifest/_find_mart; risolvemart_sintesicol path contract mart (prefix dalla location clean,object_existssuMART_BUCKET). Aggiunto test statico che nessun loader usi i simboli privati rimossi.lab-connectors#100(expand_globconlru_cache), quindi N anni = 1 listing. Questa PR va mergiata dopo Pagine tematiche (territorio, finanza, sanità, welfare, giustizia) #100 per ottenere il beneficio._parquet_existsconlocationpuntuale ritornaFalsese l'anno nel path non è quello richiesto (prima faceva HEAD e diceva sempreTrue). Test dedicato.tests/test_util.pyaggiornata (niente piùgcs_manifest).