mirror of
https://github.com/ruvnet/RuView
synced 2026-06-25 12:53:19 +00:00
feat(adr-117/p5+p-tomb): pip-release workflow + v1.99.0 tombstone wheel
P5 — `.github/workflows/pip-release.yml`: - cibuildwheel matrix per ADR §5.4: manylinux x86_64 + aarch64, macos x86_64 + arm64, win amd64 (5 wheels via abi3-py310 stable ABI — one binary per OS/arch covers Python 3.10–3.13) - Linux aarch64 cross-builds via QEMU; rustup 1.82 pinned in CIBW_BEFORE_ALL_LINUX for reproducibility - Per-wheel smoke test: import wifi_densepose, assert hello()=="ok" - sdist via `maturin sdist` - Trigger: workflow_dispatch + push to `v*-pip` tags ONLY (never on regular commits — won't accidentally publish) - TestPyPI dry-run gate via `repository-url: https://test.pypi.org/legacy/` - Production PyPI publish via Trusted Publisher OIDC (no API tokens in GH secrets per ADR §9). Requires one-time PyPI Trusted Publisher registration before the first publish can fire. - Q3 (witness hash v2 — ADR-117 §11.3) flagged in workflow comments as a hard gate before the first tag. P-tomb — `python/tombstone/`: - Separate `wifi-densepose==1.99.0` sdist+wheel using setuptools backend (NOT maturin — tombstone is pure Python, no Rust). - `src/wifi_densepose/__init__.py` raises ImportError with the migration URL on import. Verified locally: 2.7 KB wheel, `pip install` then `import wifi_densepose` raises ImportError with `pip install wifi-densepose==2.0.0` hint + repo URL. - 5 unit tests (`tests/test_tombstone.py`) lock the file content down: must `raise ImportError`, must contain v2 install hint and migration URL, must NOT contain any `def`/`class`/`import` beyond the bare `raise` — so a well-intentioned refactor can't accidentally bloat the tombstone into a real module that loads partway before failing. Both wheels are published by the same pip-release.yml workflow: - `v1.99.0-pip` tag → publishes tombstone (or via workflow_dispatch with `target: v1-99-tombstone`) - `v2.X.Y-pip` tag → publishes the v2 wheel matrix Per ADR-117 §7.3: tag and publish 1.99.0-pip FIRST so the tombstone claims the "current" slot in pip's resolver, THEN publish 2.0.0-pip. Test count unchanged in main python/ suite (156/156). Tombstone sub-suite: 5 passing. Refs: docs/adr/ADR-117-pip-wifi-densepose-modernization.md §5.4, §7 Refs: #785 Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
+17
-4
@@ -68,10 +68,23 @@ python/
|
||||
discovery payload parser), `SemanticPrimitiveListener` (typed router
|
||||
for the 10 HA-MIND primitives from ADR-115 §3.12). 63 tests including
|
||||
end-to-end against an in-process `websockets.serve` fixture.
|
||||
- ⏳ **P5 — cibuildwheel + PyPI publish**: Linux/macOS/Windows × abi3-py310.
|
||||
- ⏳ **P-tomb — v1.99.0 tombstone wheel**: pure-Python ImportError
|
||||
with migration URL, published to PyPI to soft-fence v1.x users
|
||||
before v2.0 ships.
|
||||
- ⏳ **P5 — cibuildwheel + PyPI publish (workflow shipped)**: GH Actions
|
||||
workflow `.github/workflows/pip-release.yml` ships the 5-wheel
|
||||
matrix (manylinux x86_64+aarch64, macosx x86_64+arm64, win amd64)
|
||||
plus sdist via `cibuildwheel@2.21`. Publish via PyPI Trusted
|
||||
Publisher (OIDC) on `v2.X.Y-pip` tags or manual dispatch.
|
||||
**One-time PyPI Trusted Publisher registration required before the
|
||||
first publish can fire.** Q3 (witness hash v2 — ADR-117 §11.3)
|
||||
remains the hard gate before tagging.
|
||||
- ✅ **P-tomb — v1.99.0 tombstone wheel**: pure-Python wheel
|
||||
(`python/tombstone/`) whose `wifi_densepose/__init__.py` raises
|
||||
ImportError with the migration URL on import. Verified locally
|
||||
(2.7 KB wheel) — `pip install wifi_densepose-1.99.0-py3-none-any.whl`
|
||||
then `python -c "import wifi_densepose"` raises ImportError as
|
||||
expected. Same `pip-release.yml` workflow publishes the tombstone
|
||||
on `v1.99.0-pip` tag. Per ADR-117 §7.3, publish the tombstone
|
||||
BEFORE the first v2.0.0 publish to claim the "current" slot in
|
||||
pip's resolver.
|
||||
|
||||
Each phase ends with a checkbox PR. Tests are additive — every phase's
|
||||
smoke tests must still pass after later phases land.
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
dist/
|
||||
build/
|
||||
*.egg-info/
|
||||
@@ -0,0 +1,38 @@
|
||||
# wifi-densepose 1.99.0 — tombstone release
|
||||
|
||||
This sub-directory builds the **tombstone wheel** described in
|
||||
[ADR-117 §7.2](../../docs/adr/ADR-117-pip-wifi-densepose-modernization.md).
|
||||
|
||||
`wifi-densepose==1.1.0` was published on 2025-06-07 as a pure-Python
|
||||
FastAPI + PyTorch server. v2.0+ is a hard rewrite around the Rust
|
||||
crates in [`v2/crates/`](../../v2/crates/) exposed via PyO3.
|
||||
|
||||
`wifi-densepose==1.99.0` ships **no real code** — its `__init__.py`
|
||||
raises `ImportError` with a migration URL. The point is that any
|
||||
project pinned to `wifi-densepose>=1,<2` that runs `pip install -U
|
||||
wifi-densepose` gets a clear, actionable error instead of a silent
|
||||
import of a broken legacy server.
|
||||
|
||||
## Build locally
|
||||
|
||||
```bash
|
||||
cd python/tombstone
|
||||
python -m build
|
||||
```
|
||||
|
||||
Result: `dist/wifi_densepose-1.99.0-py3-none-any.whl` and the matching sdist.
|
||||
|
||||
## Smoke-test
|
||||
|
||||
```bash
|
||||
pip install dist/wifi_densepose-1.99.0-py3-none-any.whl
|
||||
python -c "import wifi_densepose"
|
||||
# Expected: ImportError with the migration URL.
|
||||
```
|
||||
|
||||
## Publish
|
||||
|
||||
Publishing is done by the `pip-release.yml` GH Actions workflow, gated
|
||||
on a `v1.99.0-pip` tag OR an explicit `workflow_dispatch` with
|
||||
`target: v1-99-tombstone`. Per ADR-117 §7.3 this should publish
|
||||
*before* `v2.0.0` to claim the "current" slot in pip's resolver.
|
||||
@@ -0,0 +1,53 @@
|
||||
# ADR-117 §7.2 / §7.4 — v1.99.0 tombstone release.
|
||||
#
|
||||
# This sub-directory builds a SEPARATE PyPI artifact from the v2.0+
|
||||
# PyO3 wheel in ../. The two share the PyPI project name
|
||||
# `wifi-densepose` but represent different versions:
|
||||
#
|
||||
# 1.0.0–1.1.0 legacy pure-Python server (archive/v1/)
|
||||
# 1.99.0 THIS PACKAGE — pure-Python wheel whose only behaviour
|
||||
# is to raise ImportError with the migration URL on
|
||||
# first import. Acts as a soft-fence for users pinned
|
||||
# to wifi-densepose>=1,<2.
|
||||
# 2.0.0+ PyO3 + maturin Rust core (../pyproject.toml)
|
||||
#
|
||||
# Build:
|
||||
# cd python/tombstone
|
||||
# python -m build
|
||||
#
|
||||
# Result: a SINGLE `py3-none-any` wheel plus an sdist. Nothing
|
||||
# compiled, no platform-specific tags.
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools>=68"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "wifi-densepose"
|
||||
version = "1.99.0"
|
||||
description = "Tombstone release. wifi-densepose v1.x is superseded by v2.0+ (PyO3 bindings to the Rust core). Install wifi-densepose==2.0.0 — see https://github.com/ruvnet/RuView/blob/main/docs/pip-migration.md"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.8"
|
||||
license = { text = "MIT" }
|
||||
authors = [
|
||||
{ name = "rUv", email = "ruv@ruv.net" },
|
||||
]
|
||||
keywords = ["wifi", "csi", "pose-estimation", "deprecated", "migration"]
|
||||
classifiers = [
|
||||
"Development Status :: 7 - Inactive",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python :: 3",
|
||||
]
|
||||
# No runtime dependencies — the import raises before any code runs.
|
||||
dependencies = []
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/ruvnet/RuView"
|
||||
"Migration guide" = "https://github.com/ruvnet/RuView/blob/main/docs/pip-migration.md"
|
||||
"ADR-117 (modernization plan)" = "https://github.com/ruvnet/RuView/blob/main/docs/adr/ADR-117-pip-wifi-densepose-modernization.md"
|
||||
|
||||
[tool.setuptools]
|
||||
packages = ["wifi_densepose"]
|
||||
package-dir = { "" = "src" }
|
||||
@@ -0,0 +1,18 @@
|
||||
# ADR-117 §7.2 — v1.99.0 tombstone.
|
||||
#
|
||||
# This module is part of the `wifi-densepose==1.99.0` PyPI release.
|
||||
# Its ONLY job is to raise ImportError on import so any project that
|
||||
# upgraded from the legacy 1.x line gets a clear migration error
|
||||
# rather than a silent broken import.
|
||||
#
|
||||
# The real package lives at `wifi-densepose>=2.0.0` (built by the
|
||||
# PyO3+maturin pipeline in `python/`).
|
||||
raise ImportError(
|
||||
"wifi-densepose 1.x has been superseded by v2.0.0 which wraps the Rust-based stack.\n"
|
||||
"\n"
|
||||
" pip install wifi-densepose==2.0.0\n"
|
||||
"\n"
|
||||
"Migration guide: https://github.com/ruvnet/RuView/blob/main/docs/pip-migration.md\n"
|
||||
"Modernization rationale: https://github.com/ruvnet/RuView/blob/main/docs/adr/ADR-117-pip-wifi-densepose-modernization.md\n"
|
||||
"Legacy v1 source (archived): https://github.com/ruvnet/RuView/tree/main/archive/v1\n"
|
||||
)
|
||||
@@ -0,0 +1,50 @@
|
||||
"""ADR-117 §7.2 — Unit test for the v1.99.0 tombstone wheel.
|
||||
|
||||
Verifies the *file content* of the tombstone module without actually
|
||||
importing it (importing it would raise ImportError, which is the
|
||||
behaviour under test). The CI workflow `pip-release.yml` runs the
|
||||
real end-to-end install + import test inside an ephemeral venv.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import pathlib
|
||||
|
||||
|
||||
TOMBSTONE = pathlib.Path(__file__).parent.parent / "src" / "wifi_densepose" / "__init__.py"
|
||||
|
||||
|
||||
def test_tombstone_file_exists() -> None:
|
||||
assert TOMBSTONE.is_file(), f"tombstone module missing: {TOMBSTONE}"
|
||||
|
||||
|
||||
def test_tombstone_raises_import_error() -> None:
|
||||
"""The source must call `raise ImportError(...)`. We grep rather
|
||||
than exec because actually running it would terminate the test."""
|
||||
src = TOMBSTONE.read_text(encoding="utf-8")
|
||||
assert "raise ImportError(" in src, "tombstone does not raise ImportError"
|
||||
|
||||
|
||||
def test_tombstone_contains_v2_install_hint() -> None:
|
||||
src = TOMBSTONE.read_text(encoding="utf-8")
|
||||
assert "pip install wifi-densepose==2.0.0" in src, (
|
||||
"tombstone ImportError message must include the v2 pip install hint"
|
||||
)
|
||||
|
||||
|
||||
def test_tombstone_contains_migration_url() -> None:
|
||||
src = TOMBSTONE.read_text(encoding="utf-8")
|
||||
assert "docs/pip-migration.md" in src, (
|
||||
"tombstone must point users at the migration guide"
|
||||
)
|
||||
|
||||
|
||||
def test_tombstone_is_minimal() -> None:
|
||||
"""The whole point of the tombstone is that it's MINIMAL — no
|
||||
imports, no helper functions, no class definitions. Lock that
|
||||
down so a well-intentioned refactor doesn't accidentally bloat it
|
||||
into a real module that loads partway before failing."""
|
||||
src = TOMBSTONE.read_text(encoding="utf-8")
|
||||
forbidden = ("def ", "class ", "import wifi_densepose", "import os", "import sys")
|
||||
for f in forbidden:
|
||||
assert f not in src, f"tombstone must not contain {f!r} — it should ONLY raise"
|
||||
Reference in New Issue
Block a user