|
3 | 3 | This checklist is the local gate before telling strangers to download and try |
4 | 4 | intentprobe. |
5 | 5 |
|
| 6 | +## CI package smoke |
| 7 | + |
| 8 | +The GitHub workflow `.github/workflows/package-smoke.yml` must pass on `main`. |
| 9 | +It builds/checks the Python wheel/sdist from a clean checkout and dry-runs the |
| 10 | +npm launcher package. |
| 11 | + |
6 | 12 | ## Clean checkout |
7 | 13 |
|
8 | 14 | ```bash |
9 | 15 | git status --short --branch |
10 | | -python -m pip install -e . |
| 16 | +python3 -m venv /tmp/intentprobe-editable-smoke |
| 17 | +/tmp/intentprobe-editable-smoke/bin/python -m pip install --upgrade pip |
| 18 | +/tmp/intentprobe-editable-smoke/bin/python -m pip install -e . |
11 | 19 | ``` |
12 | 20 |
|
13 | 21 | ## CLI smoke tests |
@@ -53,14 +61,37 @@ python -m research.activation_scanner_regression \ |
53 | 61 | ## Package build |
54 | 62 |
|
55 | 63 | ```bash |
56 | | -python -m pip install build |
57 | | -python -m build --sdist --wheel |
58 | | -python -m zipfile -l dist/intentprobe-0.1.0-py3-none-any.whl | \ |
| 64 | +python3 -m venv /tmp/intentprobe-release-tools |
| 65 | +/tmp/intentprobe-release-tools/bin/python -m pip install --upgrade pip |
| 66 | +/tmp/intentprobe-release-tools/bin/python -m pip install build twine check-wheel-contents |
| 67 | + |
| 68 | +repo=/path/to/IntentProbe |
| 69 | +sdist_dist=$(mktemp -d /tmp/intentprobe-sdist-dist.XXXXXX) |
| 70 | +sdist_src=$(mktemp -d /tmp/intentprobe-sdist-src.XXXXXX) |
| 71 | +wheel_dist=$(mktemp -d /tmp/intentprobe-wheel-dist.XXXXXX) |
| 72 | + |
| 73 | +cd /tmp |
| 74 | +/tmp/intentprobe-release-tools/bin/python -m build --sdist \ |
| 75 | + --outdir "$sdist_dist" "$repo" |
| 76 | +tar -xzf "$sdist_dist"/intentprobe-0.1.0.tar.gz -C "$sdist_src" |
| 77 | +cd "$sdist_src"/intentprobe-0.1.0 |
| 78 | +/tmp/intentprobe-release-tools/bin/python -m build --wheel --outdir "$wheel_dist" |
| 79 | + |
| 80 | +/tmp/intentprobe-release-tools/bin/python -m twine check \ |
| 81 | + "$sdist_dist"/intentprobe-0.1.0.tar.gz \ |
| 82 | + "$wheel_dist"/intentprobe-0.1.0-py3-none-any.whl |
| 83 | +/tmp/intentprobe-release-tools/bin/check-wheel-contents \ |
| 84 | + "$wheel_dist"/intentprobe-0.1.0-py3-none-any.whl |
| 85 | +python3 -m zipfile -l "$wheel_dist"/intentprobe-0.1.0-py3-none-any.whl | \ |
59 | 86 | rg 'probe_weights|metadata.json|targets.py|entry_points' |
60 | | -python -m tarfile -l dist/intentprobe-0.1.0.tar.gz | \ |
| 87 | +python3 -m tarfile -l "$sdist_dist"/intentprobe-0.1.0.tar.gz | \ |
61 | 88 | rg 'probe_weights|metadata.json|targets.py|SECURITY.md|SAMPLE_REPORTING|RELEASE_CHECKLIST|RUNTIME_HOOKS|runtime_toy_agent' |
62 | 89 | ``` |
63 | 90 |
|
| 91 | +Build the release wheel from the freshly extracted sdist. The repo can have an |
| 92 | +ignored `build/` directory from setuptools, and direct local wheel builds may |
| 93 | +reuse stale `build/lib` contents. |
| 94 | + |
64 | 95 | ## Hygiene |
65 | 96 |
|
66 | 97 | ```bash |
|
0 commit comments