v0.22.0
A focused release that polishes the chapkit CLI for users coming from R or with little Python background, removes unused surface, and ships clearer scaffolded projects. Several breaking changes - read the upgrade notes if you depend on chapkit run / chapkit migrate / the task module / --with-monitoring.
Breaking changes
- Init template names renamed.
--template ml->--template fn-py,--template ml-shell->--template shell-py. New--template shell-rfor R models onchapkit-r-inla. The old names error cleanly. (#41) chapkit runandchapkit migratemoved underchapkit mlproject. Canonical forms are nowchapkit mlproject run/chapkit mlproject migrate. The old top-level commands stay registered as hidden backwards-compat aliases (so thechapkit-pybase image's existingCMDkeeps working) but documentation and tests use the new path. (#41)- Task module removed.
chapkit.task(TaskRegistry,TaskExecutor,TaskRouter, ...) is gone, along with thetaskinit template, the task example, anddocs/guides/task-execution.md. Nothing internal used it; the only consumer was the template that scaffolded projects which used it. If you importchapkit.TaskRegistryetc. anywhere, those imports will break. (#41) --with-monitoringflag removed. The scaffolded service still exposes/metrics(Prometheus format) by default -.with_monitoring()is unconditional now. Layer Prometheus + Grafana yourself via the newdocs/guides/monitoring.md. (#42)- Postman collection removed from the scaffold. FastAPI's auto-generated
/docs(Swagger UI) covers the same use case for free; users who specifically want Postman can import/openapi.json. (#42) - Default scaffolded host port changed from
8000to9090to dodge the usual busy ports (8000= FastAPI default, chap-core itself;8080= generic). Container-internal port stays8000. (#41) - Scaffolded compose service name is now the project slug, not
api- so the service's docker-DNS hostname is unique when used as a chap-core overlay alongside other models. (#41)
CLI
- New
--template shell-rscaffold built onghcr.io/dhis2-chap/chapkit-r-inla:latestwith platform-pinned amd64 (Rosetta-friendly), R script stubs inscripts/{train.R, predict.R}, and aConfigclass that R scripts read viayaml::yaml.load_file(\"config.yml\"). (#41) - Init Dockerfile rewritten on top of
ghcr.io/dhis2-chap/chapkit-py:latest(was a heavy multi-stage build from rawuvbase) and usesuv sync --frozen --no-dev --no-install-projectfor reproducible builds. (#41) - Scaffolded
compose.ymlships with commented blocks for GHCR image pulls and chap-core registration env, so flipping a service into a chap-core overlay is one uncomment. (#41) chapkit init --helpnow shows usage examples in its epilog; top-levelchapkit --helpopens with a Quick Start block pointing at the three init templates. (#42)chapkit testopens with a banner showing which URL it's hitting, so accidentali'm testing the wrong thingis visible immediately. (#42, #42)chapkit mlprojectgroup is hidden from--helpwhen there's noMLprojectfile in the cwd;initis hidden inside chapkit projects;testis hidden outside them. (#41)chapkit initno longer emits a Postman collection. (#42)
Generated projects
- New top-of-file banner in
main.pyexplainingWhat is this file?and what users typically edit (Config class, ServiceInfo, train/predict scripts) - a gentler intro for users who aren't deep in Python. (#42) AssessedStatuscolour system documented in three places at once: the enum docstring, an inline comment in generatedmain.py, and a colour table in the scaffolded README's Customization section. (#42)- Scaffolded README has a
What you'll editandWhat you need installedsection template-aware (shell-r leads with Docker; shell-py / fn-py mention Python + uv). (#42) model.rdsplaceholder for shell-r (was incorrectlymodel.pickleeven for R scripts). (#42)
Examples directory cleanup
- Removed:
examples/quickstart/,examples/full_featured/,examples/config_basic/,examples/artifact_manager/,examples/custom_migrations/,examples/vega_visualization/,examples/task_execution/. The first five were redundant withchapkit init/ docs; the last two were untested showcase code. (#41) - Surviving examples (
artifact,config,config_artifact,dataframe_usage,library_usage,ml_class,ml_functional,ml_pipeline,ml_shell) are pattern-focused and most are exercised by the test suite.
Documentation
- New R Quickstart - 10-minute path from `chapkit init --template shell-r` to a running chapkit service. (#42)
- New Shell-runner Contract documenting the workspace lifecycle, file inventory, and `config.yml` shape per scaffolding path. (#42)
- New Monitoring guide with a drop-in Prometheus + Grafana compose overlay for the scaffolded `/metrics` endpoint. (#42)
- Removed the Task Execution guide.
- Sweep across all 19 .md files for stale references after the refactor: ~60 `localhost:8000` -> `localhost:9090`, `/workspace/data` -> `/work/data`, removed-feature pointers updated. (#43, #43)
- `mkdocs build --strict` now passes clean. (#44, #44)
Verification
All three init templates verified end-to-end before tagging:
| Template | Build | Health | `chapkit test --verbose` |
|---|---|---|---|
| `fn-py` | OK | OK | ALL TESTS PASSED |
| `shell-py` | OK | OK | ALL TESTS PASSED |
| `shell-r` (chapkit-r-inla, Rosetta) | OK | OK | ALL TESTS PASSED |