Skip to content

v2.2.0 — Modernization release

Choose a tag to compare

@robinthibaut robinthibaut released this 25 Apr 17:49
· 25 commits to main since this release

Highlights

This release modernizes packaging and restores runtime compatibility against the current scientific Python stack. There are no scientific-API changes — BEL, TransportMap, and the inference modes behave identically; only the implementation has been updated to keep working under modern dependencies.

Packaging

  • Migrated to pyproject.toml (PEP 621) with the hatchling build backend.
  • Environment is uv-managed; uv.lock is committed.
  • Python floor moved 3.7 → 3.10 (3.7–3.9 are EOL).
  • Optional extras: [bnn] (TensorFlow + TensorFlow-Probability + tf-keras), [dev] (pytest, pytest-cov, ruff), [docs].
  • Removed: setup.py, requirements.txt, MANIFEST.in, pytest.ini, .travis.yml, docs/requirements.txt.

Runtime fixes

  • np.ndarray.ptp() → np.ptp() (NumPy 2.0).
  • scipy.integrate.simps → simpson (SciPy 1.14).
  • int(np.diff(arr)) → int(np.diff(arr).item()) (NumPy 2.0).
  • Regenerated test reference arrays for scikit-learn 1.8 CCA sign convention; new scripts/regenerate_test_references.py makes future drift a one-shot fix.
  • Optional bnn / nn_utilities / probabilities modules now work on TF 2.21 + TFP 0.25 + Keras 3 (switched to tf_keras since TFP layers require the Keras 2 API).
  • Fixed probabilistic_variational_model accepting int for n_hidden.
  • Fixed random_gaussian_initializer shape handling under TF ≥ 2.16.

Cleanup

  • Deleted dead skbel.preprocessing.Kernel (zero callers; used scipy.linalg.solve(sym_pos=True) removed in SciPy 1.11).
  • Applied ruff format and lint pass across the codebase.
  • Migrated example data from pickle (pandas <2 ABI) to .npy; demos no longer depend on pandas.
  • Replaced empty CI workflow with a real matrix: Python 3.10 – 3.13 on Linux, plus macOS and Windows smoke runs, plus lint.
  • __version__ now read from package metadata.

Verified

  • All 3 regression tests pass on Linux Python 3.10/3.11/3.12/3.13, macOS 3.12, Windows 3.12.
  • ruff check and ruff format --check both clean.
  • WHPA example runs end-to-end with mode="tm" and n_posts=400.
  • All four BNN model factories build under TF 2.21 + TFP 0.25.

Install

pip install skbel
# or
uv pip install skbel
# with optional Bayesian neural networks:
pip install "skbel[bnn]"

Full changelog: v2.1.0...v2.2.0