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
7 changes: 5 additions & 2 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,14 @@ jobs:
# in seconds instead of in the next nightly. Workspaces without a
# release profile (user workspaces, HowTo*) are skipped.
run: |
if [ -f workspace/config/build/env_vars_release.yaml ]; then
# Fire if the workspace carries a release profile under either name:
# canonical profile_release.yaml (PyAutoHands#161/#181 step 6 rename)
# or legacy env_vars_release.yaml. The validator resolves both names.
if [ -f workspace/config/build/profile_release.yaml ] || [ -f workspace/config/build/env_vars_release.yaml ]; then
python PyAutoHands/autohands/validate_env_profiles.py workspace \
--strict-derivation --strict-markers
else
echo "No config/build/env_vars_release.yaml — profile validation skipped."
echo "No config/build/profile_release.yaml — profile validation skipped."
fi

- name: Run smoke tests
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/workspace-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ name: Workspace Validation
# mode=smoke (default — schedule / bare workflow_dispatch / workflow_call)
# Runs every workspace's scripts AND generated notebooks against the
# CURRENT source `main` of the 5 libraries (source-shadowed via PYTHONPATH,
# under the `smoke` env profile — config/build/env_vars.yaml). Unchanged by
# under the `smoke` env profile — config/build/profile_smoke.yaml, legacy
# env_vars.yaml accepted during migration). Unchanged by
# M3 — this remains the continuous readiness signal / weekly sweep, and
# `test_run`/`readiness` keep reading its conclusion the same way.
#
Expand All @@ -19,7 +20,8 @@ name: Workspace Validation
# still run FROM WITHIN each workspace checkout so autonerves resolves the
# workspace's own config/ + dataset/, not the wheel's packaged defaults
# (closes Gap 4). Uses the `release` env profile — each workspace/
# workspace_test repo's config/build/env_vars_release.yaml — which is
# workspace_test repo's config/build/profile_release.yaml (legacy
# env_vars_release.yaml accepted during migration) — which is
# PYAUTO_TEST_MODE=1 (reduced, real sampler) + SMALL_DATASETS=1 +
# FAST_PLOTS=1 for user workspaces, PYAUTO_TEST_MODE=0 (real searches,
# each script's own n_like_max caps) + full-res + real plots for
Expand Down Expand Up @@ -80,7 +82,8 @@ env:
# Workspace pins lag the libraries' source __version__ between releases;
# without this every script fails fast with WorkspaceVersionMismatchError.
# Same bypass run_scripts uses in release.yml. mode=release also carries this
# in env_vars_release.yaml (the TestPyPI dev version never matches the
# in profile_release.yaml (legacy env_vars_release.yaml accepted during
# migration; the TestPyPI dev version never matches the
# workspace pin either) — belt and braces.
PYAUTO_SKIP_WORKSPACE_VERSION_CHECK: "1"

Expand Down Expand Up @@ -124,7 +127,7 @@ jobs:
MODE: ${{ steps.mode.outputs.mode }}
run: |
# mode=release scopes to workspace + workspace_test only (per the M3
# spec) — HowTo* are tutorial repos with no env_vars_release.yaml and
# spec) — HowTo* are tutorial repos with no profile_release.yaml and
# aren't part of the release-fidelity surface. mode=smoke keeps the
# full 9-project sweep, unchanged.
if [ "$MODE" = "release" ]; then
Expand Down Expand Up @@ -314,9 +317,15 @@ jobs:
# the wheel's packaged defaults (closes Gap 4).
set -e
pushd workspace
ENV_CONFIG="config/build/env_vars_release.yaml"
if [ ! -f "$ENV_CONFIG" ]; then
echo "::error::$ENV_CONFIG missing — no release profile defined for this workspace"
# Prefer the canonical profile_release.yaml (PyAutoHands#161/#181 step
# 6 rename); fall back to the legacy env_vars_release.yaml so this
# workflow accepts both names during the migration window.
if [ -f "config/build/profile_release.yaml" ]; then
ENV_CONFIG="config/build/profile_release.yaml"
elif [ -f "config/build/env_vars_release.yaml" ]; then
ENV_CONFIG="config/build/env_vars_release.yaml"
else
echo "::error::config/build/profile_release.yaml missing (legacy env_vars_release.yaml also accepted) — no release profile defined for this workspace"
exit 1
fi
python3 "$(pwd)/../PyAutoHands/autohands/run_python.py" \
Expand Down
9 changes: 5 additions & 4 deletions docs/release_validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ readiness hard gate. **M3 wires the acceptance criteria below into
untouched, default `mode: smoke` per-PR path):

- The `release` env profile lives in each workspace/`*_workspace_test` repo as
`config/build/env_vars_release.yaml` — a self-contained sibling of
`env_vars.yaml` (the `smoke` profile), passed to Build's `run_python.py`
`config/build/profile_release.yaml` (legacy `env_vars_release.yaml` is still
accepted during the migration window) — a self-contained sibling of
`profile_smoke.yaml` (the `smoke` profile), passed to Build's `run_python.py`
unmodified via its existing `--env-config` flag. No changes were needed in
PyAutoHands's executor primitives to support this — `--env-config` already
accepted an arbitrary path.
Expand All @@ -39,7 +40,7 @@ untouched, default `mode: smoke` per-PR path):

`mode: release` is scoped to the `autofit`/`autogalaxy`/`autolens` workspaces
and their `*_workspace_test` siblings only — the HowTo* tutorial repos have no
`env_vars_release.yaml` and stay out of the release-fidelity script matrix
`profile_release.yaml` and stay out of the release-fidelity script matrix
(they are still exercised under `mode: smoke`, unchanged).

## Why a distinct profile
Expand All @@ -51,7 +52,7 @@ The per-PR smoke gate and the release gate are different jobs:
- **release** — *does the exact source about to ship, installed from the built
wheel, pass at release fidelity?* Slow, runs only for a release rehearsal.

Both tiers' `config/build/env_vars.yaml` today default to smoke values
Both tiers' `config/build/profile_smoke.yaml` today default to smoke values
(`PYAUTO_TEST_MODE=2`, `PYAUTO_SMALL_DATASETS=1`, `PYAUTO_DISABLE_JAX=1`,
`PYAUTO_FAST_PLOTS=1`). That is correct for a per-PR smoke and wrong for a
release gate. The two must be **named, distinct profiles** so a release run
Expand Down
5 changes: 3 additions & 2 deletions skills/smoke_test/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ the user explicitly passes workspace names.

### 2. Load env config + wipe stale output

For each workspace, read `config/build/env_vars.yaml` to build the per-script env
For each workspace, read `config/build/profile_smoke.yaml` (legacy
`env_vars.yaml` is still accepted during the migration window) to build the per-script env
prefix (`defaults` minus matching `overrides` `unset`s, plus optional
`args_default`). Before launching, wipe `<workspace_root>/output/*` (glob — keep
the tracked `output/` dir). Detail: [`reference.md`](reference.md) →
Expand Down Expand Up @@ -85,7 +86,7 @@ cache dir can't be created.
## Notes

- Env vars, their exceptions, and `args_default` live in each workspace's
`config/build/env_vars.yaml`; the skip list in `config/build/no_run.yaml`. Edit
`config/build/profile_smoke.yaml`; the skip list in `config/build/no_run.yaml`. Edit
those files — don't hardcode env vars here.
- `smoke_tests.txt` files live in each workspace root.
- Toggling `PYAUTO_SMALL_DATASETS` requires deleting `<workspace>/dataset/` (auto-
Expand Down
3 changes: 2 additions & 1 deletion skills/smoke_test/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ notebook.

## Environment config

Each workspace's `config/build/env_vars.yaml` has:
Each workspace's `config/build/profile_smoke.yaml` (legacy `env_vars.yaml` is
still accepted during the migration window) has:

- `defaults` — env vars applied to every script (`PYAUTO_TEST_MODE`,
`PYAUTO_SMALL_DATASETS`, …).
Expand Down
Loading