Contributing to Piceli¶
Contributions are welcome: bug reports, documentation fixes, new templates and larger features. For anything beyond a small fix, please open an issue first so the design can be discussed. The Roadmap lists the areas where help has the most impact.
Development setup¶
Piceli uses uv for environments, locking and builds.
git clone https://github.com/pynenc/piceli.git
cd piceli
make install # uv sync --all-extras (creates .venv from uv.lock)
make install-pre-commit # ruff, mypy, uv-lock and commit-message hooks
make test # unit + fault-injected API acceptance tests
make test never contacts a real cluster. The acceptance suite runs the real
Kubernetes client against an in-process fake API server that injects faults.
Tests run on busy CI runners, several at a time. A test that bounds how long
something takes must leave room for that: the bound is at least 1 s and about
three times what a loaded runner needs, and the broken behaviour it rules out
takes at least twice the bound (make the hung call wait 30 s, not 5 s).
Prefer an event, a fake clock or a counted call to a wall-clock bound.
tests/unit/test_test_hygiene.py rejects bounds under 1 s, and make test-stress shows whether a new test is reliable.
Other targets (make help lists them all):
Target |
What it does |
|---|---|
|
Every pre-commit hook on all files (ruff lint + format, uv lock check, YAML/TOML) |
|
mypy on the |
|
One test suite |
|
Unit + acceptance three times on twice as many workers as cores; lists every test that failed in any round (CI runs it nightly) |
|
Integration tests against the disposable cluster named by |
|
Tests with an HTML coverage report in |
|
Self-tests of the cross-model eval harness in |
|
Build the documentation with warnings treated as errors |
|
Build the sdist and wheel into |
|
Build and open the production frontend with disposable sample state; no cluster or credentials required |
|
Verify browser contracts, TypeScript and lint; bundle frontend assets |
|
Check workspace navigation, topology, versions, plan history and logs at desktop, tablet and phone sizes |
|
Record fixed journeys as WebP/GIF clips and screenshots in an ignored gallery |
Add dependencies with uv add <package> (or uv add --group test <package> for
development-only tools) so that pyproject.toml and uv.lock stay in sync.
CI runs the same commands on Python 3.12, 3.13 and 3.14, plus the integration tests on a kind cluster of the newest supported Kubernetes minor (nightly: all four, see Compatibility and shared ownership) and a strict docs build.
Working on the web UI¶
Install Node.js and npm alongside uv, then run make ui. The command prepares
the locked frontend dependencies, builds the current application and opens a
disposable workspace, normally at http://127.0.0.1:4178. Plain addresses work
in a fresh browser. Keep the terminal running; Ctrl+C stops the preview and
removes its service state. The Piceli web application guide explains each page and real
target setup.
Before changing a UI workflow, run the frontend regression suite from ui/:
npm test
After the change, run make ui-check ui-build and the browser suites for the
affected journeys. Plan and run history must remain tied to exact application,
plan and approval identities; retain separate log permissions and explicit
missing-evidence states. See tests/browser/README.md for suite selection,
Chromium setup and recording. make ui-clips also needs ffmpeg; its retained
gallery contains WebP clips, GIF fallbacks and screenshots. Copy selected
screenshots into docs/_static/ui/ when documentation changes.
Releases¶
Releases are cut from main by .github/workflows/release.yml after CI
passes. PyPI, not the git tag, decides whether a version is released
(scripts/release_state.py, unit-tested in tests/unit/release/): the
workflow uploads the files PyPI does not list yet, with PEP 740 attestations
through trusted publishing, waits until PyPI lists every file, then pushes the
v<version> tag and publishes the release notes. Any run can be re-run, and a
new run finishes an interrupted one; a tag is never moved. To release a
version, bump it in pyproject.toml and add its changelog section. Pull
requests from this repository publish a pre-release to TestPyPI.
Guidelines¶
Keep imports and planning side-effect free: no clients, kubeconfig access or network calls at import time or in pure planning code.
Add tests with every change. Template changes need unit tests that check the generated manifest.
Code is formatted and linted with ruff, and public APIs are typed and checked with mypy.
make lintruns both.Use Conventional Commits for commit messages (
feat:,fix:,docs:…).Update the documentation and the changelog when behaviour changes.