Skip to content

packaging: pyproject + editorconfig + clang-format (#396) with a single version source#412

Merged
JustVugg merged 3 commits into
devfrom
p396-packaging
Jul 19, 2026
Merged

packaging: pyproject + editorconfig + clang-format (#396) with a single version source#412
JustVugg merged 3 commits into
devfrom
p396-packaging

Conversation

@JustVugg

Copy link
Copy Markdown
Owner

Porta dentro la #396 di @ZacharyZcR con le due sistemazioni discusse in review:

  1. Fonte versione unica: colibri/_version.py ora legge c/version.py (la fonte della release: version infrastructure + GitHub Release workflow (v1.0.0) #394 usata da coli --version e dal workflow release) invece di duplicare il literal — al primo bump non possono più divergere. Fallback a importlib.metadata per il caso wheel installata (dove c/ non esiste su disco).
  2. Semantica d'installazione onesta: il README documenta che la forma supportata è pip install -e . dal clone — il motore vive in c/ e non viene impacchettato in una wheel standalone (una wheel pura darebbe un coli che muore con "engine directory not found").

Verificato in un venv pulito: pip install -e .colibri.__version__ == 1.0.0 letto da c/version.py, entrypoint coli sul PATH e funzionante.

Include invariati .editorconfig e .clang-format della PR originale.

Closes #396

🤖 Generated with Claude Code

ZacharyZcR and others added 3 commits July 19, 2026 06:10
Python packaging:
- pyproject.toml: pip install colibri-engine (editable dev install works)
- colibri/ package with __version__, CLI entry point delegating to c/coli
- Optional dependency groups: [convert] (numpy, huggingface_hub),
  [oracle] (torch, transformers, safetensors), [bench] (tokenizers, datasets)

Code style:
- .editorconfig: consistent indent/charset across all file types
- .clang-format: LLVM-based, 120 col, matches existing engine style

Usage:
  pip install -e .              # dev install (CLI + serve, no heavy deps)
  pip install -e .[convert]     # adds converter dependencies
  pip install -e .[oracle]      # adds torch/transformers for oracle validation
…(on top of #396)

colibri/_version.py now reads c/version.py (#394's single source of truth --
coli --version, the release workflow, and pip metadata can no longer drift),
with an importlib.metadata fallback for the installed-wheel case where c/ is
not on disk. README documents that pip install -e . is the supported form:
the engine lives in c/ and is not packaged into a standalone wheel.

Verified in a clean venv: pip install -e . -> colibri.__version__ == 1.0.0
read from c/version.py, coli entrypoint on PATH and functional.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@JustVugg
JustVugg merged commit fae4b2c into dev Jul 19, 2026
8 checks passed
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.

2 participants