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
4 changes: 2 additions & 2 deletions docs/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ Each workspace repo (`autofit_workspace`, `autogalaxy_workspace`, `autolens_work
| Folder / file | autofit | autogalaxy | autolens | Notes |
|---|---|---|---|---|
| `config/` | yes | yes | yes | PyAutoConf config files |
| `dataset/` | yes | yes | yes | Input data; force-added with `git add -f` |
| `dataset/` | yes | yes | yes | Allowlisted real observational data only; simulated datasets are never committed (#126/#150) |
| `notebooks/` | yes | yes | yes | Generated from `scripts/` by `generate.py` |
| `scripts/` | yes | yes | yes | Source Python scripts |
| `slam_pipeline/` | no | no | yes | autolens only |
| `output/` | — | — | — | **Always empty** — kept under git with a `.gitignore` only |
| Root-level files | yes | yes | yes | `README.md`, `setup.py`, `pyproject.toml`, `requirements.txt`, `*.cfg`, `*.ini`, `*.yml`, `*.yaml`, `LICENSE*` |
| Root-level files | yes | yes | yes | `README.md`, `llms-full.txt`, `workspace_index.json`, `requirements.txt`, `LICENSE*` — committed by `release.yml` on the runner, not by `pre_build.sh` (#156) |

### Paths that must NEVER be committed

Expand Down
49 changes: 23 additions & 26 deletions pre_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ run_workspace() {
local project="$2"
local generate="${3:-true}"
local slam="${4:-false}"
local readme_pkg="${5:-}"
local dir="$PYAUTOBASE/$repo"

echo ""
Expand All @@ -49,12 +48,6 @@ run_workspace() {
echo " Running black..."
black .

if [ -n "$readme_pkg" ]; then
echo " Bumping README version → $readme_pkg v$VERSION..."
sed -i "s/$readme_pkg v[0-9]\{4\}\.[0-9]*\.[0-9]*\.[0-9]*/$readme_pkg v$VERSION/g" \
README.rst README.md 2>/dev/null || true
fi

if [ "$generate" = "true" ]; then
echo " Running generate.py ($project)..."
PYTHONPATH="$PYTHONPATH_EXTRA" python "$AUTOBUILD/generate.py" "$project"
Expand Down Expand Up @@ -84,8 +77,10 @@ run_workspace() {
if [ "$slam" = "true" ] && [ -d "slam_pipeline" ]; then
git add slam_pipeline/
fi
# Stage root-level recognised files only (no output/, output_model/, or stray .fits)
git add -- *.py *.md *.txt *.cfg *.ini *.toml *.yml *.yaml LICENSE* requirements* setup* 2>/dev/null || true
# Root-level artifacts (llms-full.txt, workspace_index.json, README Colab
# URLs) are produced and committed by release.yml's release_workspaces job
# on the runner — pre_build deliberately does not stage root files. The
# former glob line here was a measured no-op in all 13 repos (#156).

echo " Committing and pushing..."
if git diff --cached --quiet; then
Expand All @@ -96,27 +91,29 @@ run_workspace() {
fi
}

# Positional args: repo project [generate=true] [slam=false] [readme_pkg=""]
# readme_pkg: when non-empty, the README's "<pkg> vYYYY.M.D.B" pin is bumped to
# the new VERSION. Empty for workspaces with no README version pin.
# Positional args: repo project [generate=true] [slam=false]
# The repo names are checked against PyAutoMind/repos.yaml (the body map) by
# `repos_sync.py --check`; the flags are Build policy and live only here.
run_workspace "autofit_workspace" "autofit" true false PyAutoFit
run_workspace "autogalaxy_workspace" "autogalaxy" true false PyAutoGalaxy
run_workspace "autolens_workspace" "autolens" true true PyAutoLens
run_workspace "autofit_workspace_test" "autofit" false false PyAutoFit
run_workspace "autogalaxy_workspace_test" "autogalaxy" false false PyAutoGalaxy
run_workspace "autolens_workspace_test" "autolens" false false PyAutoLens
run_workspace "euclid_strong_lens_modeling_pipeline" "" false false ""
run_workspace "HowToGalaxy" "howtogalaxy" true false PyAutoGalaxy
run_workspace "HowToLens" "howtolens" true false PyAutoLens
run_workspace "HowToFit" "howtofit" true false PyAutoFit
run_workspace "autofit_workspace_developer" "" false false ""
run_workspace "autolens_workspace_developer" "" false false ""
# The AI assistant repo. No notebook generation or README pin; release.yml's
# (The former readme_pkg arg / README version bump was deleted per the audit in
# docs/pre_build_failure_audit.md: its sed edit was never staged, the runner
# side was removed under #120, and the pins it targeted are owned by Phase 4 of
# the build-chain campaign — PyAutoBuild#155/#156.)
run_workspace "autofit_workspace" "autofit" true false
run_workspace "autogalaxy_workspace" "autogalaxy" true false
run_workspace "autolens_workspace" "autolens" true true
run_workspace "autofit_workspace_test" "autofit" false false
run_workspace "autogalaxy_workspace_test" "autogalaxy" false false
run_workspace "autolens_workspace_test" "autolens" false false
run_workspace "euclid_strong_lens_modeling_pipeline" "" false false
run_workspace "HowToGalaxy" "howtogalaxy" true false
run_workspace "HowToLens" "howtolens" true false
run_workspace "HowToFit" "howtofit" true false
run_workspace "autofit_workspace_developer" "" false false
run_workspace "autolens_workspace_developer" "" false false
# The AI assistant repo. No notebook generation; release.yml's
# release_workspaces job stamps its workspace version and regenerates
# wiki/core/api_audit_baseline.json against the released wheels.
run_workspace "autolens_assistant" "autolens" false false ""
run_workspace "autolens_assistant" "autolens" false false

# Commit and push PyAutoBuild itself
echo ""
Expand Down
4 changes: 2 additions & 2 deletions skills/pre_build/pre_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bash $HOME/Code/PyAutoLabs/PyAutoBuild/bin/autobuild pre_build <minor_version>
The script handles every mechanical step of the pre-build flow:

1. Ensures the canonical `pending-release` label exists on each release-window repo.
2. For every workspace, runs `black .`, bumps the README version pin (`<Package> vYYYY.M.D.<minor>`) where applicable, runs `generate.py` for projects with a notebook target, and stages only the safe directories (`config/`, `notebooks/`, `scripts/`, `dataset/`, plus `slam_pipeline/` for `autolens_workspace`).
2. For every workspace, runs `black .`, runs `generate.py` for projects with a notebook target, and stages only the safe directories (`config/`, `notebooks/`, `scripts/`, `dataset/`, plus `slam_pipeline/` for `autolens_workspace`). Root-level artifacts and README Colab URLs are committed by `release.yml` on the runner, not here.
3. Commits and pushes each workspace (skipping if no changes are staged).
4. Commits and pushes PyAutoBuild itself.
5. Dispatches `gh workflow run release.yml --repo PyAutoLabs/PyAutoBuild --field minor_version=<N>`.
Expand Down Expand Up @@ -89,4 +89,4 @@ The release workflow is now running. Use the `review-release` skill
## Notes

- The same operation is callable from the shell as `autobuild pre_build <minor>` (or `autobuild-help pre_build` for documentation). Use this skill when you want the agent validation and summary wrapper; use the bash CLI when you just want to fire off the build.
- README version-bump is now handled inside `pre_build.sh` (it used to live only in this skill).
- There is no README version-bump step: the audit (`docs/pre_build_failure_audit.md`, #156) found the old local sed's output was never staged and the runner-side step was removed under #120 — README pin ownership is a Phase 4 decision of the build-chain campaign (#155).