Repository navigation
fix(registry): time_coverage del config vince sull'period editoriale stale - #512
Merged
Merged
Conversation
…stale Il merge editoriale sovrascriveva sempre il period derivato dal time_coverage del dataset.yml con il valore storico del registry: un cambio di copertura temporale nei config non propagava mai. Ora l'editoriale copre solo l'assenza di time_coverage. Regression visto in dataciviclab/energia-italia#6 (espansione serie 2015→2000).
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 merge editoriale del registry builder sovrascriveva sempre il
periodderivato daltime_coveragedeldataset.ymlcon il valore storico del registry esistente: un cambio di copertura temporale nei config non propagava mai al registry.Contesto collegato
Regression visto in dataciviclab/energia-italia#6 (espansione serie Terna 2015→2000/2005): il registry continuava a dichiarare
2015-2024nonostante i config e i dati aggiornati. Lo schema documenta cheperiodviene "da time_coverage del dataset.yml" — il comportamento contraddiceva il contratto.Cosa cambia
builders.py: l'editoriale copre ora solo l'assenza ditime_coveragenel config; se il config dichiaratime_coverage, il valore derivato vince.Verifica
pytest tests/test_registry_builder.py -q # 31 passed (2 nuovi policy) ruff check + mypy sui file toccatitest_period_time_coverage_beats_editorial— fallisce senza il fix (verificato), passa con il fixtest_period_editorial_fills_when_no_time_coverage— l'editoriale resta la fonte senzatime_coverageNote per chi revisiona
time_coverage: l'editoriale fa ancora da fonte (compatibilità piena).toolkit registry build --write) nei repo interessati dopo il merge/release.Metriche PR