From 0db69c630d79f7876acaf458498cb769fed73717 Mon Sep 17 00:00:00 2001 From: "Erick C. Jones Jr." <44578073+yamierick@users.noreply.github.com> Date: Tue, 27 Oct 2026 09:34:49 -0500 Subject: [PATCH] Release 1.0.0: make the package version match the tag the notebooks clone pyproject still said 0.1.0 while paths.TAG and every setup cell say v1.0.0. A test now holds the two together; it was watched to fail at 0.1.0. Co-Authored-By: Claude Opus 5.5 --- README.md | 4 ++-- pyproject.toml | 2 +- tests/test_paths.py | 13 +++++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d251e5f..049d056 100644 --- a/README.md +++ b/README.md @@ -200,9 +200,9 @@ To re-execute a notebook: `jupyter nbconvert --to notebook --execute --inplace < A notebook handed to students must not change under them, so on Colab each one clones a release tag, not `main`, and the package fetches tables from the same tag. To cut the next one: -1. Set `TAG` in `src/orteach/paths.py` and `REF` in every setup cell (the eleven seeds and the six +1. Set `TAG` in `src/orteach/paths.py`, `version` in `pyproject.toml`, and `REF` in every setup cell (the eleven seeds and the six notebooks edited in place) to the new tag. `check_notebooks.py` refuses any setup cell that - disagrees with `TAG`. + disagrees with `TAG`, and `tests/test_paths.py` refuses a package version that does. 2. Re-execute, merge through a pull request with CI green. 3. Tag the merge commit, annotated, and check it peels to that commit: `git tag -a vX.Y.Z -m "..."`, `git push origin vX.Y.Z`, diff --git a/pyproject.toml b/pyproject.toml index 46c48f7..ae128f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "orteach" -version = "0.1.0" +version = "1.0.0" description = "Teaching models for IE 3315, IE 5301 and REE 4301 — the package half of the notebook/package split" requires-python = ">=3.10,<3.14" diff --git a/tests/test_paths.py b/tests/test_paths.py index fae782d..cb0e7a5 100644 --- a/tests/test_paths.py +++ b/tests/test_paths.py @@ -9,6 +9,11 @@ import pytest +if sys.version_info >= (3, 11): + import tomllib +else: # declared in dev for 3.10; never skipped + import tomli as tomllib + sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname( os.path.abspath(__file__))), "src")) @@ -71,3 +76,11 @@ def fake_retrieve(url, dest): def test_the_url_names_the_release_tag_not_a_branch(): assert "/%s/data/raw/" % paths.TAG in paths.RAW_URL assert "/main/" not in paths.RAW_URL and paths.TAG.startswith("v") + + +def test_the_package_version_is_the_tag_the_notebooks_clone(): + """A release is one number: the version pip reports and the tag Colab clones must agree.""" + root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + with open(os.path.join(root, "pyproject.toml"), "rb") as f: + version = tomllib.load(f)["project"]["version"] + assert "v" + version == paths.TAG, (version, paths.TAG)