From 74fdbcab91f9410b816016ce5a5d35e2024ed411 Mon Sep 17 00:00:00 2001 From: gabewillen Date: Thu, 6 Aug 2026 23:14:57 -0500 Subject: [PATCH] chore: prepare cortext.py v1.3.0 release --- .github/workflows/ci.yml | 5 ++--- .github/workflows/release-wheels.yml | 2 +- README.md | 24 ++++++++++++------------ cortext/assets-manifest.json | 4 ++-- cortext/models/manifest.json | 2 +- cortext/release.py | 4 ++-- pyproject.toml | 2 +- scripts/build_wheels.py | 2 +- scripts/install.sh | 4 ++-- scripts/install_from_release.sh | 4 ++-- scripts/vendor_release_assets.py | 2 +- scripts/write_wheel_index.py | 6 +++--- uv.lock | 15 ++++++++++++++- 13 files changed, 44 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 335e2a5..697fbbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,9 +37,8 @@ jobs: run: | set -euo pipefail VER="$(python -c "import re,pathlib; t=pathlib.Path('pyproject.toml').read_text(); m=re.search(r'version\\s*=\\s*\\\"([^\\\"]+)\\\"', t); print(m.group(1))")" - # Prefer matching engine tag; fall back to v1.2.4 if pin differs - python scripts/vendor_release_assets.py --from-release "v${VER}" --force \ - || python scripts/vendor_release_assets.py --from-release v1.2.4 --force + # Release metadata and shipped assets must track the matching engine tag. + python scripts/vendor_release_assets.py --from-release "v${VER}" --force test -f cortext/models/manifest.json python - <<'PY' from cortext.assets import package_assets_ready, platform_tag, host_library_path, PACKAGE_DIR diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index 780aae5..6107bc1 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -12,7 +12,7 @@ on: workflow_dispatch: inputs: tag: - description: "Release tag to build/publish (e.g. v1.2.4). Empty = package version from pyproject." + description: "Release tag to build/publish (e.g. v1.3.0). Empty = package version from pyproject." required: false default: "" cortext_assets_tag: diff --git a/README.md b/README.md index e3250a0..9d5181f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ AIST model chunks — install is offline after the wheel download. ```bash # Replace version as needed -export CORTEXT_VERSION=1.2.4 +export CORTEXT_VERSION=1.3.0 export CORTEXT_INDEX="https://github.com/augmem/cortext.py/releases/download/v${CORTEXT_VERSION}/index.html" pip install "cortext==${CORTEXT_VERSION}" --find-links "${CORTEXT_INDEX}" @@ -34,14 +34,14 @@ internal index: ```bash tar -xzf simple-index.tar.gz # serve the extracted simple/ directory, then: -pip install cortext==1.2.4 --index-url https://your-mirror.example/simple/ +pip install cortext==1.3.0 --index-url https://your-mirror.example/simple/ ``` ### Local wheelhouse / editable checkout ```bash # After scripts/build_wheels.py -pip install cortext==1.2.4 --find-links dist/wheels --no-index +pip install cortext==1.3.0 --find-links dist/wheels --no-index # Dev monorepo (all six natives in-tree) uv sync @@ -62,7 +62,7 @@ with cortext.Cortext(":memory:") as memory: For binary attachments, pass `Media(data, mimetype)` or raw bytes with `media_mimetype` to `process_text_with_media`. -Python 3.10+. Binding **1.2.4** tracks engine **v1.2.4**. +Python 3.10+. Binding **1.3.0** tracks engine **v1.3.0**. ## Why not pypi.org? @@ -80,7 +80,7 @@ same way. Local full tree after clone: ```bash -python3 scripts/vendor_release_assets.py --from-release v1.2.4 --force +python3 scripts/vendor_release_assets.py --from-release v1.3.0 --force uv sync && uv run pytest -q ``` @@ -125,25 +125,25 @@ No sibling checkouts and no runtime GitHub download on the happy path. ```bash # 1) Vendor engine assets (or rely on CI to fetch augmem/cortext release) -python3 scripts/vendor_release_assets.py --from-release v1.2.4 --force +python3 scripts/vendor_release_assets.py --from-release v1.3.0 --force # 2) Build platform wheels + local indexes python3 scripts/build_wheels.py # 3) Tag + push — CI (.github/workflows/release-wheels.yml) builds, writes # absolute-URL indexes, and uploads everything to the GitHub Release -git tag v1.2.4 -git push origin v1.2.4 +git tag v1.3.0 +git push origin v1.3.0 ``` Manual publish of an existing wheelhouse: ```bash -BASE="https://github.com/augmem/cortext.py/releases/download/v1.2.4" -python3 scripts/write_wheel_index.py dist/wheels --version 1.2.4 --base-url "$BASE" -gh release create v1.2.4 dist/wheels/*.whl dist/wheels/index.html \ +BASE="https://github.com/augmem/cortext.py/releases/download/v1.3.0" +python3 scripts/write_wheel_index.py dist/wheels --version 1.3.0 --base-url "$BASE" +gh release create v1.3.0 dist/wheels/*.whl dist/wheels/index.html \ dist/wheels/install.sh dist/wheels/INSTALL.md \ - --title "cortext.py 1.2.4" --notes-file dist/wheels/INSTALL.md + --title "cortext.py 1.3.0" --notes-file dist/wheels/INSTALL.md ``` ## API diff --git a/cortext/assets-manifest.json b/cortext/assets-manifest.json index 35f55af..ef508a1 100644 --- a/cortext/assets-manifest.json +++ b/cortext/assets-manifest.json @@ -1,6 +1,6 @@ { "schema": "augmem.cortext.release_assets.v1", - "cortext_version": "1.2.4", + "cortext_version": "1.3.0", "optimize": "ReleaseSmall", "layout": { "native": "native/", @@ -56,7 +56,7 @@ }, "models": { "schema": "augmem.cortext.models.v1", - "cortext_version": "1.2.4", + "cortext_version": "1.3.0", "note": "AIST model is Git-chunked under 100 MiB so it can live in ordinary Git without LFS. Language bindings reassemble and checksum on first use; do not re-shard in binding repos \u2014 copy this tree from cortext.", "assets": [ { diff --git a/cortext/models/manifest.json b/cortext/models/manifest.json index 0598354..3eb0114 100644 --- a/cortext/models/manifest.json +++ b/cortext/models/manifest.json @@ -1,6 +1,6 @@ { "schema": "augmem.cortext.models.v1", - "cortext_version": "1.2.4", + "cortext_version": "1.3.0", "note": "AIST model is Git-chunked under 100 MiB so it can live in ordinary Git without LFS. Language bindings reassemble and checksum on first use; do not re-shard in binding repos \u2014 copy this tree from cortext.", "assets": [ { diff --git a/cortext/release.py b/cortext/release.py index 5759adf..7bc4e75 100644 --- a/cortext/release.py +++ b/cortext/release.py @@ -18,7 +18,7 @@ from .assets import PACKAGE_DIR, host_native_present, platform_tag -DEFAULT_RELEASE_TAG = os.environ.get("CORTEXT_RELEASE_TAG", "v1.2.4") +DEFAULT_RELEASE_TAG = os.environ.get("CORTEXT_RELEASE_TAG", "v1.3.0") DEFAULT_RELEASE_REPO = os.environ.get("CORTEXT_RELEASE_REPO", "augmem/cortext.cpp") @@ -53,7 +53,7 @@ def _download(url: str, dest: Path) -> None: def _normalize_tag(tag: str | None) -> tuple[str, str]: raw = tag or DEFAULT_RELEASE_TAG if raw.upper() == "LATEST": - raise RuntimeError("pin an exact release tag (e.g. v1.2.4); latest is not allowed") + raise RuntimeError("pin an exact release tag (e.g. v1.3.0); latest is not allowed") t = raw if raw.startswith("v") else f"v{raw}" return t, t.lstrip("v") diff --git a/pyproject.toml b/pyproject.toml index 6ad01cc..92e53b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "cortext" -version = "1.2.4" +version = "1.3.0" description = "Turnkey Python bindings for Cortext — ships multi-arch natives and AIST model chunks" readme = "README.md" requires-python = ">=3.10" diff --git a/scripts/build_wheels.py b/scripts/build_wheels.py index e66a4fe..50886b9 100755 --- a/scripts/build_wheels.py +++ b/scripts/build_wheels.py @@ -82,7 +82,7 @@ def require_native(tag: str, artifact: str) -> Path: if not path.is_file(): raise SystemExit( f"missing native for {tag}: {path}\n" - "Run: python3 scripts/vendor_release_assets.py --from-release v1.2.4" + "Run: python3 scripts/vendor_release_assets.py --from-release v1.3.0" ) return path diff --git a/scripts/install.sh b/scripts/install.sh index bc3e5fa..35dbb95 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash # Curl-friendly entrypoint for release installs (uploaded as a release asset). -# Usage: curl -fsSL …/install.sh | bash -s -- v1.2.4 +# Usage: curl -fsSL …/install.sh | bash -s -- v1.3.0 set -euo pipefail -TAG="${1:-v1.2.4}" +TAG="${1:-v1.3.0}" REPO="${CORTEXT_PY_REPO:-augmem/cortext.py}" VERSION="${TAG#v}" BASE="https://github.com/${REPO}/releases/download/${TAG}" diff --git a/scripts/install_from_release.sh b/scripts/install_from_release.sh index 94a004c..e6a2878 100755 --- a/scripts/install_from_release.sh +++ b/scripts/install_from_release.sh @@ -3,8 +3,8 @@ # # Usage: # ./scripts/install_from_release.sh # version from pyproject / latest tag -# ./scripts/install_from_release.sh v1.2.4 -# CORTEXT_PY_REPO=augmem/cortext.py ./scripts/install_from_release.sh v1.2.4 +# ./scripts/install_from_release.sh v1.3.0 +# CORTEXT_PY_REPO=augmem/cortext.py ./scripts/install_from_release.sh v1.3.0 # # Env: # CORTEXT_PY_REPO GitHub owner/repo (default: augmem/cortext.py) diff --git a/scripts/vendor_release_assets.py b/scripts/vendor_release_assets.py index 8c2bce9..793137e 100644 --- a/scripts/vendor_release_assets.py +++ b/scripts/vendor_release_assets.py @@ -6,7 +6,7 @@ Examples: python3 scripts/vendor_release_assets.py - python3 scripts/vendor_release_assets.py --from-release v1.2.4 --force + python3 scripts/vendor_release_assets.py --from-release v1.3.0 --force """ from __future__ import annotations diff --git a/scripts/write_wheel_index.py b/scripts/write_wheel_index.py index 3c11d19..e1023d2 100755 --- a/scripts/write_wheel_index.py +++ b/scripts/write_wheel_index.py @@ -10,10 +10,10 @@ assets, since the index is itself a release asset). Examples: - python3 scripts/write_wheel_index.py dist/wheels --version 1.2.4 + python3 scripts/write_wheel_index.py dist/wheels --version 1.3.0 python3 scripts/write_wheel_index.py dist/wheels \\ - --version 1.2.4 \\ - --base-url https://github.com/augmem/cortext.py/releases/download/v1.2.4 + --version 1.3.0 \\ + --base-url https://github.com/augmem/cortext.py/releases/download/v1.3.0 """ from __future__ import annotations diff --git a/uv.lock b/uv.lock index e42a162..daa2f34 100644 --- a/uv.lock +++ b/uv.lock @@ -29,9 +29,16 @@ wheels = [ [[package]] name = "cortext" -version = "1.2.4" +version = "1.3.0" source = { editable = "." } +[package.optional-dependencies] +dev = [ + { name = "build" }, + { name = "pytest" }, + { name = "wheel" }, +] + [package.dev-dependencies] dev = [ { name = "build" }, @@ -40,6 +47,12 @@ dev = [ ] [package.metadata] +requires-dist = [ + { name = "build", marker = "extra == 'dev'", specifier = ">=1.2" }, + { name = "pytest", marker = "extra == 'dev'", specifier = ">=8" }, + { name = "wheel", marker = "extra == 'dev'", specifier = ">=0.43" }, +] +provides-extras = ["dev"] [package.metadata.requires-dev] dev = [