From a48d2b47680589266e86fc92794d4e1c11c167a9 Mon Sep 17 00:00:00 2001 From: Florent Pollet Date: Tue, 24 Nov 2026 22:37:40 -0500 Subject: [PATCH] Prepare meds-algorithm-template 0.4.0a4 with meds-algorithm 0.4.0a7 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NJQdbHt5icm1CgFVHsHTNx --- README.md | 11 ++++++++--- RELEASING.md | 26 +++++++++++++------------- pyproject.toml | 4 ++-- template/pyproject.toml.jinja | 6 +++--- uv.lock | 10 +++++----- 5 files changed, 31 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 1691b5a..01a60d1 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ contract-first MEDS algorithm repositories. Shared contracts and the canonical specification live in [`meds-algorithm`](https://github.com/McDermottHealthAI/meds-algorithm). Generated repositories pin its PyPI release -`meds-algorithm==0.4.0a6` for reproducible installations. +`meds-algorithm==0.4.0a7` for reproducible installations. The core owns the reusable infrastructure and conformance helpers; generated repositories import it directly. The template fixes the external contract—MEDS input, six algorithm profiles and standard arguments, typed @@ -38,7 +38,7 @@ GitHub repository. It needs Git and network access; it does not bundle a second Install the pinned generator with: ```bash -uvx --from 'meds-algorithm-template==0.4.0a3' meds-algorithm-template ../my-meds-algorithm --trust +uvx --from 'meds-algorithm-template==0.4.0a4' meds-algorithm-template ../my-meds-algorithm --trust ``` Use `--defaults --data-file answers.yaml` for unattended generation. The answers file records the @@ -211,11 +211,16 @@ repositories. Files under `template/` are the generated payload; root tests validate that payload without imposing a algorithm implementation. Profile selection and the distinct version 4 step names are described in [profiles](https://meds-algorithm.readthedocs.io/en/latest/profiles/). -See the [software contract](https://github.com/McDermottHealthAI/meds-algorithm/blob/v0.4.0a6/src/meds_algorithm/CONTRACT.md), [migration guide](https://meds-algorithm.readthedocs.io/en/latest/migration-v4/), +See the [software contract](https://github.com/McDermottHealthAI/meds-algorithm/blob/v0.4.0a7/src/meds_algorithm/CONTRACT.md), [migration guide](https://meds-algorithm.readthedocs.io/en/latest/migration-v4/), and [shared-package assessment](https://meds-algorithm.readthedocs.io/en/latest/shared-package-assessment/). ## Changes +### 0.4.0a4 (2026-11-24) + +- Generate projects using `meds-algorithm==0.4.0a7`: `execution=slurm` also runs an algorithm installed from PyPI + (a released, non-editable distribution), not only a clean Git checkout. + ### 0.4.0a3 (2026-11-24) - Generate projects using `meds-algorithm==0.4.0a6`, the first release with the temporal-leakage conformance diff --git a/RELEASING.md b/RELEASING.md index 536c475..172cb88 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -19,16 +19,16 @@ and hosting are managed entirely by the core repository and Read the Docs. ## 1. Switch generated projects to the published shared package -The generator pins the published `meds-algorithm==0.4.0a6` release (`0.4.0a2` pinned `0.4.0a5`). For future updates, +The generator pins the published `meds-algorithm==0.4.0a7` release (`0.4.0a2` pinned `0.4.0a5`). For future updates, release the shared package first, then keep all dependency pins and install examples aligned: | File | Change | |---|---| -| `pyproject.toml`, development dependencies | Pin the shared conformance dependency to `meds-algorithm[conformance,orchestration]==0.4.0a6` | -| `template/pyproject.toml.jinja`, project dependencies | Use `meds-algorithm[data]==0.4.0a6` | -| `template/pyproject.toml.jinja`, test extra | Use `meds-algorithm[conformance]==0.4.0a6` | -| `template/pyproject.toml.jinja`, orchestration extra | Use `meds-algorithm[orchestration]==0.4.0a6` | -| `README.md` | Document the shared PyPI version and update the generator install example to `0.4.0a3` | +| `pyproject.toml`, development dependencies | Pin the shared conformance dependency to `meds-algorithm[conformance,orchestration]==0.4.0a7` | +| `template/pyproject.toml.jinja`, project dependencies | Use `meds-algorithm[data]==0.4.0a7` | +| `template/pyproject.toml.jinja`, test extra | Use `meds-algorithm[conformance]==0.4.0a7` | +| `template/pyproject.toml.jinja`, orchestration extra | Use `meds-algorithm[orchestration]==0.4.0a7` | +| `README.md` | Document the shared PyPI version and update the generator install example to `0.4.0a4` | | `uv.lock` | Regenerate with `uv lock` | | `template/pyproject.toml.jinja`, Hatch metadata | Remove `allow-direct-references` after replacing all Git requirements | @@ -61,15 +61,15 @@ update URL without creating a real release tag or fetching a nonexistent release ## 2. Tag and rehearse on TestPyPI -Candidate generator version: **0.4.0a3**. Once the release changes are merged and CI passes: +Candidate generator version: **0.4.0a4**. Once the release changes are merged and CI passes: ```bash git switch main git pull --ff-only -git tag v0.4.0a3 -git push origin v0.4.0a3 +git tag v0.4.0a4 +git push origin v0.4.0a4 gh workflow run publish.yml --repo McDermottHealthAI/MEDS_algorithm_template \ - --ref v0.4.0a3 -f index=testpypi + --ref v0.4.0a4 -f index=testpypi gh run list --repo McDermottHealthAI/MEDS_algorithm_template --workflow publish.yml --limit 5 gh run watch RUN_ID --repo McDermottHealthAI/MEDS_algorithm_template --exit-status ``` @@ -85,7 +85,7 @@ check_env=$(mktemp -d) uv venv "$check_env" uv pip install --python "$check_env/bin/python" 'copier>=9.17.1,<10' 'pyyaml>=6' uv pip install --python "$check_env/bin/python" --no-deps \ - --index-url https://test.pypi.org/simple/ 'meds-algorithm-template==0.4.0a3' + --index-url https://test.pypi.org/simple/ 'meds-algorithm-template==0.4.0a4' "$check_env/bin/meds-algorithm-template" --version "$check_env/bin/meds-algorithm-template" "$check_env/generated" --defaults --trust uv pip install --python "$check_env/bin/python" "$check_env/generated[test]" @@ -102,12 +102,12 @@ After the TestPyPI rehearsal succeeds: ```bash gh workflow run publish.yml --repo McDermottHealthAI/MEDS_algorithm_template \ - --ref v0.4.0a3 -f index=pypi + --ref v0.4.0a4 -f index=pypi # Find and watch the new run, then approve the pypi environment deployment. # After it succeeds, verify in another clean environment: pypi_env=$(mktemp -d) uv venv "$pypi_env" -uv pip install --python "$pypi_env/bin/python" 'meds-algorithm-template==0.4.0a3' +uv pip install --python "$pypi_env/bin/python" 'meds-algorithm-template==0.4.0a4' "$pypi_env/bin/meds-algorithm-template" "$pypi_env/generated" --defaults --trust uv pip install --python "$pypi_env/bin/python" "$pypi_env/generated[test]" "$pypi_env/bin/minimal-meds-algorithm" profiles diff --git a/pyproject.toml b/pyproject.toml index 0ed6550..04227d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "meds-algorithm-template" -version = "0.4.0a3" +version = "0.4.0a4" description = "A minimal, contract-first Copier template for MEDS algorithm repositories." readme = "README.md" license = "MIT" @@ -23,7 +23,7 @@ Documentation = "https://meds-algorithm.readthedocs.io/en/latest/" packages = ["src/meds_algorithm_template"] [dependency-groups] -dev = ["meds-algorithm[conformance,orchestration]==0.4.0a6", "polars>=1", "pyarrow>=15", "pytest>=8", "pyyaml>=6", "ruff"] +dev = ["meds-algorithm[conformance,orchestration]==0.4.0a7", "polars>=1", "pyarrow>=15", "pytest>=8", "pyyaml>=6", "ruff"] [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index 0d3fbf5..40b4482 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -12,12 +12,12 @@ authors = [{name = {{ author_name | tojson }}, email = {{ author_email | tojson license-files = ["LICENSE*"] {% endif %} requires-python = ">=3.11" -dependencies = ["pyyaml>=6", "meds-algorithm[data]==0.4.0a6"] +dependencies = ["pyyaml>=6", "meds-algorithm[data]==0.4.0a7"] [project.optional-dependencies] -orchestration = ["meds-algorithm[orchestration]==0.4.0a6"] +orchestration = ["meds-algorithm[orchestration]==0.4.0a7"] # meds-evaluation is pinned to the version MEDS-DEV evaluates predictions with. -test = ["meds-algorithm[conformance]==0.4.0a6"] +test = ["meds-algorithm[conformance]==0.4.0a7"] {% if repository_url %}[project.urls] Repository = {{ repository_url | tojson }} diff --git a/uv.lock b/uv.lock index 768dbb3..30828b9 100644 --- a/uv.lock +++ b/uv.lock @@ -233,14 +233,14 @@ wheels = [ [[package]] name = "meds-algorithm" -version = "0.4.0a6" +version = "0.4.0a7" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pyyaml" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/30/40/1891abff0bc6c15a5790742d817e4cdc06e9e9c30452e24a8fdb5fd65b3c/meds_algorithm-0.4.0a6.tar.gz", hash = "sha256:f401aea504a725c8d5ffbf3307ce63dfe8b93be5812faaa7636814d5c0493790", size = 199122, upload-time = "2026-11-24T14:27:35.135Z" } +sdist = { url = "https://files.pythonhosted.org/packages/32/7d/81c12e0dd6bb3a13abfc841375e7ce607e95787a10b52f006f697b4fd4c5/meds_algorithm-0.4.0a7.tar.gz", hash = "sha256:51fab108fabcc7cd304471db6e504d29e09f5685a0f93c58284111dea49f6650", size = 200608, upload-time = "2026-11-25T03:25:06.496Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/fe/60/f4b4bf074e693088c855eb350021572c8df7085a0d32821ee0a46389a179/meds_algorithm-0.4.0a6-py3-none-any.whl", hash = "sha256:541dd1437617e2ae2af67efff29483470241a986ef2438625f2338d6a5d89b61", size = 109827, upload-time = "2026-11-24T14:27:33.955Z" }, + { url = "https://files.pythonhosted.org/packages/46/42/c4816562c5f6730ca57752382bd1b16a7508166483382936a99e0a44fbca/meds_algorithm-0.4.0a7-py3-none-any.whl", hash = "sha256:033865a6b0c151de1d0d7554fec45349fbf6da9cbf9ba24b98e9c72a39d631ff", size = 110977, upload-time = "2026-11-25T03:25:05.066Z" }, ] [package.optional-dependencies] @@ -257,7 +257,7 @@ orchestration = [ [[package]] name = "meds-algorithm-template" -version = "0.4.0a3" +version = "0.4.0a4" source = { editable = "." } dependencies = [ { name = "copier" }, @@ -282,7 +282,7 @@ requires-dist = [ [package.metadata.requires-dev] dev = [ - { name = "meds-algorithm", extras = ["conformance", "orchestration"], specifier = "==0.4.0a6" }, + { name = "meds-algorithm", extras = ["conformance", "orchestration"], specifier = "==0.4.0a7" }, { name = "polars", specifier = ">=1" }, { name = "pyarrow", specifier = ">=15" }, { name = "pytest", specifier = ">=8" },