|
| 1 | +--- |
| 2 | +name: check-release |
| 3 | +description: Verifies that a TorchJD release was published correctly by checking the docs site, installing from PyPI, and smoke-testing newly added classes. Use after a release has been merged and published. |
| 4 | +--- |
| 5 | + |
| 6 | +# Check TorchJD Release |
| 7 | + |
| 8 | +This skill verifies that a release is live and correct after it has been published. |
| 9 | + |
| 10 | +**For agents:** invoke as `/check-release X.Y.Z` (e.g. `/check-release 0.16.0`). |
| 11 | +If no version is provided, read the current version from `pyproject.toml`. |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## Instructions |
| 16 | + |
| 17 | +### Step 1: Determine the version |
| 18 | + |
| 19 | +Read `pyproject.toml` to find the `version` field under `[project]`. Use the version provided as |
| 20 | +an argument, or the one from `pyproject.toml` if none is given. |
| 21 | + |
| 22 | +### Step 2: Identify newly added classes |
| 23 | + |
| 24 | +Read `CHANGELOG.md` and find the `## [X.Y.Z]` section. Extract the names of any newly added |
| 25 | +public classes, functions, or methods listed under `### Added`. You will use these in later steps. |
| 26 | + |
| 27 | +### Step 3: Check the docs site |
| 28 | + |
| 29 | +Fetch `https://torchjd.org`. |
| 30 | + |
| 31 | +- Verify that the versions dropdown (or switcher) includes `vX.Y.Z` as an entry. |
| 32 | +- Verify that the `stable` entry is present. |
| 33 | + |
| 34 | +If the version entry is missing, report it and stop — the rest of the checks depend on the docs |
| 35 | +being live. |
| 36 | + |
| 37 | +### Step 4: Verify the new-version docs contain the newly added classes |
| 38 | + |
| 39 | +For each newly added class or function identified in Step 2, fetch its expected docs page under |
| 40 | +`https://torchjd.org/vX.Y.Z/`. Use the URL patterns from similar existing classes found in |
| 41 | +`README.md` or by browsing the stable docs (`https://torchjd.org/stable/`) to infer the correct |
| 42 | +path (e.g. `https://torchjd.org/vX.Y.Z/docs/aggregation`, |
| 43 | +`https://torchjd.org/vX.Y.Z/docs/scalarization`, etc.). |
| 44 | + |
| 45 | +Confirm that each new class/function name appears on the fetched page. |
| 46 | + |
| 47 | +### Step 5: Verify the stable docs also reflect the new version |
| 48 | + |
| 49 | +Fetch the same doc pages under `https://torchjd.org/stable/` and confirm the newly added |
| 50 | +classes/functions appear there too (i.e. `stable` points to the new release). |
| 51 | + |
| 52 | +### Step 6: Install torchjd from PyPI in a temp environment |
| 53 | + |
| 54 | +Run the following commands to create an isolated install: |
| 55 | + |
| 56 | +```bash |
| 57 | +cd /tmp && mkdir -p test_torchjd_install && cd test_torchjd_install |
| 58 | +uv venv && uv pip install torchjd |
| 59 | +``` |
| 60 | + |
| 61 | +Verify the installed version matches X.Y.Z: |
| 62 | + |
| 63 | +```bash |
| 64 | +cd /tmp/test_torchjd_install && uv pip show torchjd |
| 65 | +``` |
| 66 | + |
| 67 | +If the version is wrong, you may need to install with `--no-cache`. |
| 68 | + |
| 69 | +### Step 7: Smoke-test the newly added classes |
| 70 | + |
| 71 | +Write a minimal Python script `/tmp/test_torchjd_install/smoke_test.py` that: |
| 72 | + |
| 73 | +- Imports each newly added class or function by its fully-qualified name from `torchjd`. |
| 74 | +- Instantiates or calls each one with a minimal valid input (e.g. a small `torch.Tensor`, a dummy |
| 75 | + preference vector, or no arguments if the class takes none). |
| 76 | +- Does NOT assert correctness of values — only that the code runs without raising an exception. |
| 77 | + |
| 78 | +Use the existing test suite under `tests/` or the docs pages fetched in Step 4 as a reference for |
| 79 | +correct import paths and minimal usage patterns. |
| 80 | + |
| 81 | +Run the script: |
| 82 | + |
| 83 | +```bash |
| 84 | +cd /tmp/test_torchjd_install && uv run python smoke_test.py |
| 85 | +``` |
| 86 | + |
| 87 | +Report the result. If it crashes, show the traceback. |
| 88 | + |
| 89 | +### Step 8: Clean up |
| 90 | + |
| 91 | +```bash |
| 92 | +rm -rf /tmp/test_torchjd_install |
| 93 | +``` |
| 94 | + |
| 95 | +### Step 9: Report |
| 96 | + |
| 97 | +Summarize what was verified: |
| 98 | +- Docs site: version dropdown ✓/✗, new-version page ✓/✗, stable page ✓/✗ |
| 99 | +- PyPI install: version matches ✓/✗ |
| 100 | +- Smoke test: each newly added class ✓/✗ (list them) |
| 101 | + |
| 102 | +If everything passes, the release is confirmed good. If anything failed, describe what needs |
| 103 | +attention. |
0 commit comments