Contributing#
Use Pixi for local development.
Setup#
Install Pixi, then create the default environment from the repo root:
pixi install
Git Hooks#
Install the repo hooks after the Pixi environment is ready:
pixi exec pre-commit install --install-hooks
The hook configuration delegates to the existing Pixi tasks:
pre-commit:pixi run format,pixi run lint,pixi run typecheckpre-push:pixi run testmanual:pixi run docs-build,pixi run package-check
You can invoke each stage manually from the repo root:
pixi exec pre-commit run --all-files
pixi exec pre-commit run --hook-stage pre-push --all-files
pixi exec pre-commit run --hook-stage manual --all-files
pixi exec pre-commit run --all-files now runs formatting, linting, and type checking in one pass.
Common Commands#
Run these from the repo root:
pixi run format
pixi run lint
pixi run typecheck
pixi run test
pixi run coverage
pixi run docs-build
pixi run docs-serve
pixi run package-check
What they do:
format: run Ruff formatting onsrc/andtests/lint: run Ruff lint checks onsrc/andtests/typecheck: runtyonsrc/andtests/test: run the unit and offline test suitecoverage: run the full coverage report used for release auditsdocs-build: build the static documentation site intodocs/_build/htmldocs-serve: start a live-reload documentation preview server on an automatically selected free portpackage-check: build and audit the wheel and sdist that would be published to PyPI
Live Integration Tests#
Live provider integration tests are skipped by default.
tests/test_page_detection_integration.pyusesCHURRO_RUN_LIVE_VERTEX_TESTStests/test_hf_ocr_integration.pyusesCHURRO_RUN_LIVE_HF_TESTS
These tests may require credentials, external services, and billable APIs. Do not enable them in routine local runs unless you intend to use those services.
Package Check#
pixi run package-check runs the repo-local publish gate defined in scripts/package_check.py. It validates the built artifacts, not the editable checkout.
The current package check does all of the following:
removes stale
build/,dist/, and generated egg-info directoriesbuilds a fresh wheel and sdist
runs
twine checkon both artifactsverifies the wheel metadata, including project URLs, extras, and the
churro-ocrconsole entry pointverifies that repo-only content such as
tests/,tooling/,scripts/, and release audit notes do not ship inside the artifactssmoke-installs the base wheel and base sdist in clean virtual environments and checks
import churro_ocr,import churro_ocr.providers, andpython -m churro_ocr --helpsmoke-installs the lightweight
localandpdfextras from the built wheelaudits direct dependency licenses for incompatible or unknown licenses
If package-check fails, treat that as a release blocker until the artifact or documentation contract is fixed.
For benchmark runs and evaluation outputs from a repo checkout, see Benchmarking.