Skip to content

chore: migrate packaging to setuptools, align with org standard (A3) - #94

Merged
Gabrymi93 merged 1 commit into
mainfrom
chore/setuptools-migration-a3
Oct 15, 2026
Merged

Gabrymi93 merged 1 commit into
mainfrom
chore/setuptools-migration-a3

Conversation

@Gabrymi93

Copy link
Copy Markdown
Member

Sintesi

Migrazione del packaging di ACB da hatchling a setuptools e allineamento completo allo standard org infra/lab-ops/standards/pyproject.md, che nomina esplicitamente ACB come caso da migrare ("including ACB/hatchling → migrate to setuptools").

Contesto collegato

Terza e ultima PR della fase di pulizia pre-catalog (A1 #92, A2 #91+#93). Dopo il merge, si passa alla fase B (CatalogFetcher per-repo).

Cosa cambia

  • Nuovo artifact o modifica schema (session_bootstrap / triage / topic_index)
  • Modifica builder (src/)
  • Modifica configurazione (dataciviclab.config.yml)
  • Bug fix
  • CI / deploy
  • Dipendenze
  • Documentazione

Impatto su artifact upstream

ACB consuma artifact da source-observatory e dataset-incubator.

  • Dipendenza da nuovo artifact upstream → issue aperta nel repo produttore
  • Modifica schema artifact prodotto → verificato che i consumer (MCP tools) siano allineati
  • Nessun impatto su artifact

Verifica

pytest tests/
ruff check src/
  • pytest tests/ passa (152 passed, 86% cov)
  • ruff check src/ passa
  • mypy src/ tests/ passa
  • Reinstall editable in venv workspace OK (dataciviclab-agent-context-builder)
  • Entry point CLI verificati: agent-context --help funziona
  • uv build produce wheel corretto (agent_context_builder/ + dist-info)

Checklist PR

  • Perimetro stretto: una PR = un tema o un fix
  • Issue collegata o motivazione dell'assenza (piano pulizia concordato in sessione)

Note per chi revisiona

  • Dist name: agent-context-builder → dataciviclab-agent-context-builder (standard dataciviclab-<nome>). Gli entry point agent-context e agent-context-mcp non cambiano. La CI installa via -e ".[dev]" (path), quindi non ne risente. Dopo il merge serve un reinstall nelle venv locali che usavano il vecchio nome.
  • requests rimosso: mai importato nel sorgente — l'HTTP passa da lab_connectors.http.HttpClient. Verificato con grep su src/, scripts/, tests/.
  • classifiers 3.10/3.11 rimossi: contraddicevano requires-python = ">=3.12"; lo standard non li prevede.
  • ruff target-version py310 → py312: coerente con requires-python e con il root workspace.
  • lab-connectors resta dipendenza dichiarata: ACB lo importa direttamente (http, mcp, registry) — la regola "transitive non si ripetono" del standard riguarda chi dipende da toolkit.
  • [tool.ruff]/[tool.mypy] mantenuti: necessari perché la CI esegue gli tool sulla checkout del solo repo (nessun pyproject genitore); i valori sono allineati al root workspace.

Per infra/lab-ops/standards/pyproject.md (which names ACB explicitly):

- hatchling -> setuptools>=68; src-layout via
  [tool.setuptools.packages.find] where=["src"]
- dist name agent-context-builder -> dataciviclab-agent-context-builder
  (entry points agent-context / agent-context-mcp unchanged)
- license dict -> "MIT" string; drop stale 3.10/3.11 classifiers
- drop requests (never imported; HTTP via lab_connectors.http)
- ruff target-version py310 -> py312 (coherent with requires-python)
- add [project.urls] Repository
@Gabrymi93
Gabrymi93 merged commit 94af3f8 into main Oct 15, 2026
2 checks passed
@Gabrymi93
Gabrymi93 deleted the chore/setuptools-migration-a3 branch October 15, 2026 15:05
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.

1 participant