Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
28 changes: 24 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,38 @@ Prerequisites:
pipeline step in a container, and the integration tests do too. On Linux,
the layer-caching snapshotter also needs FUSE's `user_allow_other` enabled
in `/etc/fuse.conf`.
- **Python 3.11+** and [uv](https://docs.astral.sh/uv/) — for the `harmont`
- **Python 3.12** and [uv](https://docs.astral.sh/uv/) — for the `harmont`
pipeline DSL that lives in `crates/hm-dsl-engine/harmont-py/`. Linting is
pinned to **ruff 0.15** in CI.
pinned to **ruff 0.15** in CI. See [Python setup](#python-setup) below.

Build everything from the workspace root:

```sh
cargo build
```

Run your freshly built CLI against a real project — the `examples/`
directory has fourteen runnable projects to try it on:
### Python setup

The `hm` CLI shells out to `python3` to evaluate `.hm/*.py` pipeline files.
If your system `python3` is older than 3.12, pipeline runs will fail. The
repo pins Python 3.12 in `.python-version`; the one-time setup is:

```sh
uv venv # creates .venv/ with Python 3.12 (downloads it if needed)
source .venv/bin/activate # puts the right python3 on PATH
```

After activating, `python3 --version` should report 3.12.x. You can add
`source /path/to/harmont-cli/.venv/bin/activate` to your shell profile or
use [direnv](https://direnv.net/) to activate automatically.

> **Why not the venv inside `harmont-py/`?** That venv is for developing the
> Python SDK itself (running pytest, ruff, ty). The top-level venv exists
> solely to put the right `python3` on your PATH — no packages need to be
> installed in it.

With the venv active, run your freshly built CLI against a real project —
the `examples/` directory has fourteen runnable projects to try it on:

```sh
cargo run -p harmont-cli -- run ci --backend docker --dir examples/rust
Expand Down
Loading