From cca311728e481fce75103b32ff790affed8c3d37 Mon Sep 17 00:00:00 2001 From: Marko Vejnovic Date: Wed, 3 Jun 2026 22:01:41 +0000 Subject: [PATCH 1/2] fix(py-dsl): satisfy ruff format + lint CI (hm run on Harmont cloud) flagged real failures in the harmont-py DSL: - ruff format: _bun.py and _toolchain.py had multi-line string concatenations that fit on one line; reformat them. - ruff check (E402): tests/test_bun.py imported pytest + harmont mid-file (after the first test batch). Hoist both to the module's import block. ruff format --check, ruff check, ty, and pytest (404 passed) all green. --- crates/hm-dsl-engine/harmont-py/harmont/_bun.py | 3 +-- crates/hm-dsl-engine/harmont-py/harmont/_toolchain.py | 5 +---- crates/hm-dsl-engine/harmont-py/tests/test_bun.py | 7 +++---- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/crates/hm-dsl-engine/harmont-py/harmont/_bun.py b/crates/hm-dsl-engine/harmont-py/harmont/_bun.py index b1b8ea0..56ab34a 100644 --- a/crates/hm-dsl-engine/harmont-py/harmont/_bun.py +++ b/crates/hm-dsl-engine/harmont-py/harmont/_bun.py @@ -62,8 +62,7 @@ def _make_bun( ) -> BunProject: if version is not None and not _VERSION_RE.match(version): msg = ( - f"hm.bun: invalid version {version!r}\n" - ' → use a semver version like "1.2.0" or "1.2"' + f'hm.bun: invalid version {version!r}\n → use a semver version like "1.2.0" or "1.2"' ) raise ValueError(msg) bun_installed = make_install_chain( diff --git a/crates/hm-dsl-engine/harmont-py/harmont/_toolchain.py b/crates/hm-dsl-engine/harmont-py/harmont/_toolchain.py index bf67e6f..bde77b4 100644 --- a/crates/hm-dsl-engine/harmont-py/harmont/_toolchain.py +++ b/crates/hm-dsl-engine/harmont-py/harmont/_toolchain.py @@ -49,10 +49,7 @@ def node_install_cmd(version: str) -> str: def bun_install_cmd(version: str | None = None) -> str: """Bun install command. Installs to /usr/local/bin for PATH availability.""" version_arg = f' -s "bun-v{version}"' if version is not None else "" - return ( - "curl -fsSL https://bun.sh/install | " - f"BUN_INSTALL=/usr/local bash{version_arg}" - ) + return f"curl -fsSL https://bun.sh/install | BUN_INSTALL=/usr/local bash{version_arg}" def make_install_chain( diff --git a/crates/hm-dsl-engine/harmont-py/tests/test_bun.py b/crates/hm-dsl-engine/harmont-py/tests/test_bun.py index cc0ac92..266adc8 100644 --- a/crates/hm-dsl-engine/harmont-py/tests/test_bun.py +++ b/crates/hm-dsl-engine/harmont-py/tests/test_bun.py @@ -2,6 +2,9 @@ from __future__ import annotations +import pytest + +import harmont as hm from harmont._toolchain import bun_install_cmd @@ -21,10 +24,6 @@ def test_bun_install_cmd_version(): # BunProject / _BunEntry integration tests # --------------------------------------------------------------------------- -import pytest - -import harmont as hm - def _cmds(p: dict) -> list[str]: return [n["step"]["cmd"] for n in p["graph"]["nodes"]] From 4cea9ede20766ea137fec57a3c5ae99db31ec5bc Mon Sep 17 00:00:00 2001 From: Marko Vejnovic Date: Wed, 3 Jun 2026 23:23:50 +0000 Subject: [PATCH 2/2] ci: add bun to the examples matrix examples/bun exists on disk but was missing from the example: matrix in examples.yml, so the validate-matrix guard failed. Add it. --- .github/workflows/examples.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 29bebf7..1472a19 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -77,6 +77,7 @@ jobs: fail-fast: false matrix: example: + - bun - c - cpp - csharp