From 4db8537780ea5878da76da9a24583e610b850006 Mon Sep 17 00:00:00 2001 From: energyscholar Date: Tue, 28 Jul 2026 16:09:14 -0700 Subject: [PATCH] Release hygiene for 2.1.3: date the notes, document the entropy fix, cite upstream Three things the release notes get wrong as they stand, none of them code. 1. The header says "unreleased". Tag it as-is and 2.1.3 ships announcing that 2.1.3 has not happened. 2. The compute_entropy / EntropyHub fix (88e7f38) is absent from the notes. It landed after they were written. It is exactly the fix a 2.1.3 user needs to read, because 2.1.3 is the release that lifts the numpy<2 ceiling -- which is what puts users on the stack where EntropyHub's np.NaN break appears. It was also a partial break (method='sample' fine, method='kolmogorov' raising), and partial breaks stay hidden until someone reaches for the failing path. 3. core.py said the EntropyHub bug was "(reported upstream)" with no reference. Checked: we filed nothing there. A report does exist -- EntropyHub#21, opened 2026-07-15 by a third party, still open, and EntropyHub's latest release is still 2.0 -- so the claim was true in substance and misleading in attribution. Now cited by number, so whoever removes the shim has a tracking link. The 30-vs-31 test count in the verification table is left as measured: those container runs predate the entropy regression test, and re-labelling numbers we did not re-measure would be worse than explaining them. A note explains them. Suite green at 31 passed, 1 skipped. Co-Authored-By: Claude Opus 5 (1M context) --- CHANGELOG.md | 18 +++++++++++++++++- ewstools/core.py | 3 ++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9389d29..a0d80d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to `ewstools` are documented here. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.1.3] — unreleased +## [2.1.3] — 2026-07-28 Maintenance release. **No API changes and no behavioural changes** — existing code and notebooks run unmodified. @@ -21,6 +21,18 @@ notebooks run unmodified. released install still carried the break. This release ships it. Reported in [#474](https://github.com/ThomasMBury/ewstools/issues/474). +- **`compute_entropy(method='kolmogorov')` now works on NumPy 2.** EntropyHub 2.0 — its + latest release — still uses `np.NaN`, which NumPy removed in 2.0, so `EH.K2En()` and + `EH.CoSiEn()` raised `AttributeError`. `ewstools`' own source was already clean; the + alias is restored immediately before the EntropyHub import, and `np.NaN` was only ever + a spelling of `np.nan`, so nothing changes numerically. This matters *because* of the + NumPy change below: lifting the `numpy<2` ceiling is what puts users on the stack where + the break appears, and it was a partial break — `method='sample'` worked while + `method='kolmogorov'` failed — which stays hidden until someone reaches for that method. + Verified on NumPy 2.4.6 / pandas 3.0.5 / SciPy 1.17.1: fails without the shim, passes + with it. Covered by a regression test. The shim can be dropped once EntropyHub ships a + NumPy 2 compatible release ([EntropyHub#21](https://github.com/MattWillFlood/EntropyHub/issues/21)). + ### Changed - **`numpy < 2.0` ceiling removed.** NumPy 2.x is supported and is now covered by CI. The @@ -49,3 +61,7 @@ The single skip is the TensorFlow deep-learning test, which guards itself with Against released 2.1.2 in the same container, all four spectral entry points fail; on this branch all four pass. + +These container runs predate the `compute_entropy` fix above, which adds a regression test — +hence 30 here and 31 in the suite as shipped. That fix was verified separately, on +NumPy 2.4.6 / pandas 3.0.5 / SciPy 1.17.1. diff --git a/ewstools/core.py b/ewstools/core.py index 84dd4df..84f9a69 100644 --- a/ewstools/core.py +++ b/ewstools/core.py @@ -58,7 +58,8 @@ # 2.0 — so EH.K2En() and EH.CoSiEn() raise AttributeError on a modern stack even # though ewstools itself is clean. Restore the alias before importing EntropyHub; # `np.NaN` was only ever a spelling of `np.nan`, so this is not a behaviour change. -# Remove once EntropyHub ships a NumPy 2 compatible release (reported upstream). +# Remove once EntropyHub ships a NumPy 2 compatible release; tracked upstream at +# https://github.com/MattWillFlood/EntropyHub/issues/21 (open, latest release is still 2.0). if not hasattr(np, "NaN"): # pragma: no cover - depends on installed NumPy np.NaN = np.nan