Files
hermes-agent/scripts/hermes-python
alt-glitch 722bb88ece ci: lint, tests and js-tests run their commands through just
setup-pm installs the just pm/lock.json pins (python, node and all
toolchains) and forwards just-version and just-path. Three workflows then call
recipes instead of spelling the command out:

- lint.yml: each guard step runs `just check --only <name>`, so the guard list
  lives once, in scripts/check. Adding a guard there and forgetting lint.yml
  no longer leaves CI running a different set. The ratchet step is
  `just check --only health --base HEAD^1`.
- tests.yml: the sliced full-suite step is `just test-all`.
- js-tests.yml: the parallel workspace checks are `just check-js-ci`.

Python recipes run through scripts/hermes-python: on a runner it uses the
interpreter setup-pm exported as HERMES_PYTHON (as run_tests.sh does), so a
recipe never re-runs setup in CI. Elsewhere it goes through run-in-hermes-env.
2026-11-09 16:34:49 +05:30

14 lines
606 B
Bash
Executable File

#!/usr/bin/env bash
# Run Python in this checkout's environment: `scripts/hermes-python ARGS...`.
#
# A CI job runs the interpreter setup-pm exported as HERMES_PYTHON, as
# scripts/run_tests.sh does, so a recipe never re-runs setup on a runner.
# Anywhere else scripts/run-in-hermes-env applies (and if stale, syncs) the
# environment `source ./activate` gives a shell.
set -euo pipefail
if [ -z "${__HERMES_ACTIVATED:-}" ] && [ -n "${HERMES_PYTHON:-}" ] && [ -x "$HERMES_PYTHON" ]; then
exec "$HERMES_PYTHON" "$@"
fi
exec "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/run-in-hermes-env" python "$@"