Skip to content

tea-tasting 2.0.0

Latest

Choose a tag to compare

@e10v e10v released this 07 Jun 11:07
· 35 commits to main since this release
4d958b8

Summary

tea-tasting 2.0 is here with:

  • Fewer default dependencies.
  • A more consistent and cleaner API.
  • Optional performance improvements for parallel simulations with batched execution.
  • Adoption of Scientific Python SPEC standards.

tea-tasting 2.0 shouldn't break most users' workflows. Read the breaking changes below if you:

  • Use deprecated RNG aliases such as seed or random_state.
  • Pass custom data generators or progress callbacks to Experiment.simulate.
  • Use Mean(value=...) by keyword.
  • Rely on Quantile's previous default NaN handling.
  • Pass Ibis tables without installing Ibis explicitly.
  • Use tea-tasting with Python <3.12, NumPy <2.1, SciPy <1.15, or PyArrow <17.

Breaking changes

  • Deprecated RNG aliases were removed. Use rng instead of seed in make_users_data, make_sessions_data, and Experiment.simulate. Data generator callables passed to Experiment.simulate must also accept rng, not seed. Use rng instead of random_state in Bootstrap and Quantile; the random_state attribute was removed. More details in SPEC 7.
  • Mean(value=...) was renamed to Mean(column=...). Positional calls such as Mean("orders") still work, but keyword usage must change from value= to column=, and the public attribute is now column instead of value.
  • nan_policy is now configurable globally with set_config() and config_context(). MannWhitneyU, Bootstrap, and Quantile now inherit nan_policy from global config when it is not passed explicitly. The default global policy is "propagate". This changes Quantile’s default behavior from "omit" to "propagate".
  • Experiment.simulate now runs simulations in batches. Use the new batch_size parameter to control how many simulations run per batch, including when using map_ or progress reporting. Custom progress callbacks must follow the new context-manager style: progress(total=n_simulations) must return a context manager whose __enter__() value has an update(n) method.
  • Ibis is now an optional dependency. Installing tea-tasting no longer installs ibis-framework; users who pass Ibis tables must install Ibis separately. For example, install the backend extra you need: uv add 'ibis-framework[duckdb]' or pip install 'ibis-framework[duckdb]'.
  • Minimum Narwhals dependency was raised to 2.8 to support direct DuckDB relation inputs without Ibis.
  • Python 3.12 or later is now required. Minimum dependencies were raised to NumPy 2.1, PyArrow 17, and SciPy 1.15. More details in SPEC 0.

All changes

  • docs: recommend uv add for installation commands by @e10v in #274
  • refactor: narrow variant key annotations to hashable by @e10v in #275
  • chore: migrate type checking from pyright to ty by @e10v in #276
  • refactor: support mapping metric results by @e10v in #277
  • build!: require Python 3.12 and raise dependency minimums by @e10v in #278
  • feat!: remove deprecated rng aliases by @e10v in #279
  • refactor: pass rng to scipy bootstrap by @e10v in #280
  • feat!: make Ibis an optional dependency by @e10v in #281
  • feat!: add global nan_policy config by @e10v in #282
  • feat!: batch experiment simulations by @e10v in #283
  • docs: clarify Ibis installation examples by @e10v in #284
  • feat!: rename Mean value parameter to column by @e10v in #285
  • build!: require Narwhals 2.8 for direct DuckDB support by @e10v in #286
  • docs: add DuckDB relation data backend example by @e10v in #287
  • chore: pin workflow action versions by @e10v in #288
  • chore: ignore Marimo local files by @e10v in #289
  • docs: clarify multiprocessing limits in simulation guide by @e10v in #290

Full Changelog: v1.14.0...v2.0.0