Skip to content

Anagrafica IPA nel pacchetto: ripiego per gli enti senza schede, categoria dell'ente - #45

Merged
aborruso merged 2 commits into
mainfrom
feat/ipa-registry-fallback
Oct 10, 2026
Merged

aborruso merged 2 commits into
mainfrom
feat/ipa-registry-fallback

Conversation

@aborruso

Copy link
Copy Markdown
Member

Closes #44

  • discover --what ipa --match: se il vocabolario non trova nulla, cerca nell'anagrafica dell'Indice PA nel pacchetto (data/ipa-enti.csv.gz, 23.757 enti, 397 KB) e restituisce gli enti con schede: 0, con un avviso su stderr. --match "comune di palermo" → c_g273.
  • Stesso ripiego nei suggerimenti di --org su zero risultati.
  • Ordine: prima le categorie che pubblicano più schede nel RNDT, poi per nome. palermo → Comune, Città metropolitana, AMAT, invece di un ordine professionale per primo.
  • Categoria IPA (categoria, nome_categoria) nell'anagrafica data-ipa e nel vocabolario, dal dataset categorie-enti; colonna nella tabella di discover.
  • Libreria: find_ipa_registry().
  • Vocabolario rigenerato con scansione completa: conteggi identici, due campi in più per voce.

Dopo il merge va lanciato a mano il workflow ipa-registry: finché l'asset di data-ipa non ha le colonne nuove, build_ipa_vocabulary.py senza --registry si ferma con un errore esplicito.

ruff, mypy, 277 test passati.

…categoria dell'ente (#44)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cccwf2hhkHNWdUCQH9yF42
@greptile-apps

greptile-apps Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Retrigger

[Medium impact] The PR appears safe to merge; the new tests address the previous finding without introducing a new issue.

Summary

This PR adds the packaged IPA registry as a fallback for organizations missing from the RNDT vocabulary. It also adds organization categories and sorts fallback results by category activity.

  • IPA searches can find entities that have no RNDT records.
  • IPA entries now show each entity’s category and category name.

Reviews (2) · Last reviewed commit: "test(ipa): build_ipa_vocabulary offline,..." · Reviewed by Greptile

Comment thread scripts/build_ipa_vocabulary.py Resolved
…p (review #45)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cccwf2hhkHNWdUCQH9yF42
@aborruso
aborruso merged commit 9b7298a into main Oct 10, 2026
3 checks passed
@aborruso
aborruso deleted the feat/ipa-registry-fallback branch October 10, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Anagrafica IPA: ripiego su --match per gli enti senza schede nel RNDT, e categoria dell'ente

1 participant