Skip to content

Commit 481d9e7

Browse files
committed
Use a portable relative default for the PeTTa checkout path
The PY_LIVE differential defaulted `PETTA_DIR` to a hardcoded home directory (`/home/user/Dev/PeTTa`), which leaked into the published README and only resolved on one machine. Default to `../PeTTa` instead: it resolves to the same place when PeTTa sits beside the repo and the suite is run from the root, and the differential still skips (not fails) when the checkout is absent.
1 parent 12a4dfe commit 481d9e7

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/py/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ startup and long Python calls can block rendering.
117117

118118
The unit and property tests run with no Python, against an in-process fake bridge. Two suites reach a real interpreter and are gated:
119119

120-
- `PY_LIVE=1 pnpm vitest run packages/py` runs the pythonia end-to-end tests and the byte-parity differential against a live PeTTa checkout (`PETTA_DIR`, default `/home/user/Dev/PeTTa`).
120+
- `PY_LIVE=1 pnpm vitest run packages/py` runs the pythonia end-to-end tests and the byte-parity differential against a live PeTTa checkout (`PETTA_DIR`, default `../PeTTa`).
121121
- `HYPERON_LIVE=1 pnpm vitest run packages/py` runs the differential against pip `hyperon`. Set one up with `uv venv --python 3.11 .venv-hyperon && uv pip install -p .venv-hyperon hyperon` (override the interpreter with `HYPERON_PY`).
122122
- `PYODIDE_LIVE=1 pnpm vitest run packages/py/src/pyodide.test.ts`
123123
starts real Pyodide and checks `.py` import plus `py-call`.

packages/py/src/py-differential.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Differential oracle: the same corpus through live PeTTa (SWI + janus) and through
66
// @metta-ts/py + pythonia, comparing the (RESULT ...) line sequences byte-for-byte on the parity
77
// surface, and asserting mutual failure on the error corpus. Gated on PY_LIVE=1; the PeTTa checkout
8-
// is PETTA_DIR (default /home/user/Dev/PeTTa). The helper defs (PY_METTA_SRC) are prepended to both
8+
// is PETTA_DIR (default ../PeTTa). The helper defs (PY_METTA_SRC) are prepended to both
99
// sides, so the corpus needs no library import.
1010
import { describe, it, expect, beforeAll, afterAll } from "vitest";
1111
import { execFileSync } from "node:child_process";
@@ -17,7 +17,7 @@ import { setOutputSink, runProgramAsync, format } from "@metta-ts/core";
1717
import { PY_METTA_SRC, pyCoreAsyncOps, type PyBridge } from "./index";
1818
import { makePythoniaBridge } from "./live-bridge";
1919

20-
const PETTA = process.env.PETTA_DIR ?? "/home/user/Dev/PeTTa";
20+
const PETTA = process.env.PETTA_DIR ?? "../PeTTa";
2121
const LIVE = process.env.PY_LIVE === "1" && existsSync(join(PETTA, "run.sh"));
2222
const d = LIVE ? describe : describe.skip;
2323

0 commit comments

Comments
 (0)