diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 598e8ab..d07b3aa 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -27,7 +27,7 @@ Merge bottom up with merge commits; retarget the next PR to main before merging ## Verification -- [ ] `python scripts/check_docs.py` (and `python -m unittest discover -s scripts -p "test_*.py"` if scripts changed) +- [ ] `python scripts/check_docs.py` (and `python -m pytest scripts` if scripts changed) - [ ] `cd game && npm run typecheck && npm run build` (game changes) - [ ] Played on the Vercel preview (link): keyboard and gamepad - [ ] Art: Design review on the board says Approved before export diff --git a/.github/workflows/art-pipeline.yml b/.github/workflows/art-pipeline.yml index 661bd3f..8e240ce 100644 --- a/.github/workflows/art-pipeline.yml +++ b/.github/workflows/art-pipeline.yml @@ -6,9 +6,20 @@ on: - requirements-art.txt - .github/workflows/art-pipeline.yml - art/** + # main is checked again after every merge: a stack merged bottom-up can still break it + push: + branches: [main] + paths: + - scripts/** + - requirements-art.txt + - .github/workflows/art-pipeline.yml + - art/** workflow_dispatch: permissions: contents: read +concurrency: + group: art-pipeline-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: art-pipeline: runs-on: ubuntu-latest @@ -20,7 +31,8 @@ jobs: cache: pip cache-dependency-path: requirements-art.txt - run: python -m pip install -r requirements-art.txt - - run: python -m unittest discover -s scripts -p 'test_*.py' -v + # pytest runs both styles: unittest classes and plain test functions (unittest discover skipped the latter) + - run: python -m pytest scripts -v -p no:cacheprovider - run: python scripts/creek_layers.py - run: python scripts/split_layers.py --check - run: python scripts/collision_check.py diff --git a/AGENTS.md b/AGENTS.md index 018a5d6..d39ab33 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -45,7 +45,7 @@ Alexander, 24 Oct: everything is done the way the HUD and the pocket computer we - Work only from an issue you were given. Branch from `main` as `/-` (`feature/`, `fix/`, `docs/`, `art/`, `chore/`, `ci/`). One issue, one branch, one PR. Commit as `arudaev `, conventional subjects (plus `art:` for assets), no attribution trailers. - Open a **draft** PR with `Closes #` (never an epic) and fill in the template. A change bigger than ~400 lines of code is a **stack** of PRs: titles `[n/N] type: subject`, each based on the branch below, the stack listed in every body ([CONTRIBUTING.md](CONTRIBUTING.md#stacked-prs)). - Don't `/take` issues, set board fields or change Design review – the team does that. -- Before committing: `git diff --cached --check`, `python scripts/check_docs.py`, and `python -m unittest discover -s scripts -p "test_*.py"` if scripts changed. +- Before committing: `git diff --cached --check`, `python scripts/check_docs.py`, and `python -m pytest scripts` if scripts changed (pip install -r requirements-art.txt). - Agents don't merge, don't push to `main`, don't force-push, don't enable auto-merge, and never touch `.env` or keys. - This repo is a submodule of `dotPrivate`: commit here first; the parent gitlink is updated separately. Don't touch other gitlinks. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7de74b7..9d45787 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -131,7 +131,7 @@ Every committed image is produced by a script from a config with real references ```bash git diff --cached --check python scripts/check_docs.py -python -m unittest discover -s scripts -p "test_*.py" # if scripts changed +python -m pytest scripts # if scripts changed cd game && npm run typecheck && npm test && npm run build # game code python scripts/compare.py lineup hero-move:walk-03 … # on-screen changes: the comparison for the PR ``` diff --git a/requirements-art.txt b/requirements-art.txt index 4530f64..bd42f49 100644 --- a/requirements-art.txt +++ b/requirements-art.txt @@ -2,3 +2,6 @@ # belong to the installed imagegen CLI environment; no API key is needed here. Pillow>=11.0,<13 numpy>=2.0,<3 +scipy>=1.13,<2 +# tests (CI runs python -m pytest scripts) +pytest>=8,<9