Skip to content

packaging: pyproject.toml (pip install) + .editorconfig + .clang-format#396

Merged
JustVugg merged 1 commit into
JustVugg:devfrom
ZacharyZcR:feat/python-packaging
Jul 19, 2026
Merged

packaging: pyproject.toml (pip install) + .editorconfig + .clang-format#396
JustVugg merged 1 commit into
JustVugg:devfrom
ZacharyZcR:feat/python-packaging

Conversation

@ZacharyZcR

Copy link
Copy Markdown
Contributor

Summary

Two quality-of-life additions for a 16k-star project:

1. Python packaging (pip install colibri-engine)

pip install -e .              # CLI + serve (stdlib only, no heavy deps)
pip install -e .[convert]     # adds numpy + huggingface_hub
pip install -e .[oracle]      # adds torch + transformers + safetensors
pip install -e .[bench]       # adds tokenizers + datasets
  • pyproject.toml with setuptools backend, version from colibri/_version.py
  • colibri/ package: thin wrapper delegating to the existing c/coli script
  • Console script entry point: coli command works after pip install
  • Engine binary is still native C (not pip-distributed) β€” the CLI auto-detects it

2. Code style definitions

  • .editorconfig: consistent indent/charset/EOL for all editors
  • .clang-format: LLVM-based, 120 columns, single-line short functions β€” matches the existing engine style without reformatting everything

These are definitions only β€” no pre-commit hook or CI enforcement yet (that can be a follow-up once the team agrees on whether to enforce).

Test plan

  • pip install -e . β†’ Successfully installed colibri-engine-1.0.0
  • python3 -c "import colibri; print(colibri.__version__)" β†’ 1.0.0
  • python3 -m colibri.cli β†’ banner prints
  • Existing tests unaffected

🐦 Generated with Claude Code

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
@JustVugg JustVugg mentioned this pull request Jul 19, 2026
@JustVugg
JustVugg changed the base branch from main to dev July 19, 2026 10:38
JustVugg added a commit that referenced this pull request Jul 19, 2026
packaging: pyproject + editorconfig + clang-format (#396) with a single version source
@JustVugg
JustVugg merged commit 741d46b into JustVugg:dev Jul 19, 2026
4 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