diff --git a/pyproject.toml b/pyproject.toml index 181d25a..e09fee5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "ml4t-coursework" -version = "0.2.0" +version = "0.3.0" description = "Project folder, component conformance checks and results log for the ML4T courses" readme = "README.md" requires-python = ">=3.10" diff --git a/src/ml4t_coursework/__init__.py b/src/ml4t_coursework/__init__.py index d509d7b..2fe5b65 100644 --- a/src/ml4t_coursework/__init__.py +++ b/src/ml4t_coursework/__init__.py @@ -11,7 +11,7 @@ rather than for a course, because more than one course installs it. """ -__version__ = "0.2.0" +__version__ = "0.3.0" from .components import catalog, load_component, save_component, source_of, status from .contracts import add_source diff --git a/tests/test_helper.py b/tests/test_helper.py index 95666e1..9d9419f 100644 --- a/tests/test_helper.py +++ b/tests/test_helper.py @@ -206,3 +206,16 @@ def test_the_fingerprint_check_reads_the_columns_the_fingerprint_has(): assert "checked 100 of 100" in text assert "Worth a look" in text, "400 random sessions should not look like the course's panel" assert set(reference.columns) >= {"sessions", "annualized_vol", "mean_abs_return"} + + +def test_the_declared_version_and_the_installed_version_agree(): + """`helper_version` on every run row comes from the module, the distribution metadata comes + from pyproject, and the release workflow checks the tag against the module only. Two static + strings that nothing compares will drift, and a student's recorded version would then name + something pip never installed. Reading the metadata rather than pyproject also catches a build + that is stale against the source tree.""" + from importlib.metadata import version + + import ml4t_coursework + + assert ml4t_coursework.__version__ == version("ml4t-coursework") diff --git a/uv.lock b/uv.lock index 67f3e35..dbb5402 100644 --- a/uv.lock +++ b/uv.lock @@ -715,7 +715,7 @@ wheels = [ [[package]] name = "ml4t-coursework" -version = "0.2.0" +version = "0.3.0" source = { editable = "." } dependencies = [ { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },