|
| 1 | +# Changelog |
| 2 | + |
| 3 | +## 1.0.0 — 2026-04-15 |
| 4 | + |
| 5 | +Complete rewrite of the dice-plot engine and public API, plus a full domino |
| 6 | +API refactor to match the new 1.0 conventions. |
| 7 | + |
| 8 | +### Breaking changes |
| 9 | + |
| 10 | +- **`dots` renamed to `pips`** throughout. The `dots` parameter, `dot_colors`, |
| 11 | + and related names are gone. Use `pips`, `pip_colors`, `pip_scale`, |
| 12 | + `pips_label`, `pips_order`, `max_pips` instead. ("Pip" is the correct term |
| 13 | + for the marks on a die face.) |
| 14 | +- **Seaborn-style function signature.** `dice_plot(data, x, y, pips, ...)` |
| 15 | + now takes positional `data`, `x`, `y`, `pips` followed by keyword-only |
| 16 | + options. The old dict-based / mixed-positional calling convention is removed. |
| 17 | +- **Native return types.** matplotlib: `(Figure, Axes)` when creating a new |
| 18 | + figure, just `Axes` when the caller supplies `ax=`. plotly: `go.Figure`. |
| 19 | + The old wrapper return types are gone. |
| 20 | +- **`domino_plot` rewritten around a column-first API.** The old |
| 21 | + `gene_list`/`var_id`/`logfc_col`/`pval_col`-style entry point is replaced by |
| 22 | + `domino_plot(data, feature, celltype, contrast, *, fill=..., size=..., ...)` |
| 23 | + with native backend returns, explicit contrast ordering, and backend-specific |
| 24 | + `ax=` / `fig=` composition hooks. |
| 25 | +- **`n=6` uses traditional die-face layout** (two vertical columns) instead |
| 26 | + of the transposed two-row layout from earlier versions. This is an |
| 27 | + intentional divergence from `ggdiceplot::make_offsets`. |
| 28 | + |
| 29 | +### New features |
| 30 | + |
| 31 | +- **Up to 9 pips.** The 3×3 sub-grid now supports `max_pips=9` with |
| 32 | + traditional die-face lookup for every value 1–9. |
| 33 | +- **Grid geometry ported from kuva.** `_layout.py` replaces the old ad-hoc |
| 34 | + positioning code with a direct port of `kuva/src/plot/diceplot.rs`, ensuring |
| 35 | + matplotlib and plotly produce identical pip positions and tile sizes. |
| 36 | +- **Per-pip continuous fill and size.** Pass `fill="col"` and/or `size="col"` |
| 37 | + for numeric columns — each pip gets its own colour (colorbar) and radius |
| 38 | + (size legend). Works with both backends. |
| 39 | +- **Per-pip discrete fill.** Pass `fill="col"` + `fill_palette={val: hex}` |
| 40 | + for discrete colour encoding per pip slot. |
| 41 | +- **Legend stack.** A right-side legend panel stacks position legend, colorbar, |
| 42 | + and size legend, matching `ggdiceplot::draw_key` semantics. Skipped when |
| 43 | + the caller provides `ax=` / `fig=`. |
| 44 | +- **`ax=` / `fig=` composability.** Draw into an existing matplotlib `Axes` |
| 45 | + or plotly `Figure` to build multi-panel layouts. |
| 46 | +- **Domino preprocessing rewrite.** Domino plots now validate their structural |
| 47 | + columns up front, enforce exactly two contrast slots, compute shared backend |
| 48 | + geometry once, and use the same color/size range semantics as `dice_plot`. |
| 49 | +- **Tile geometry controls.** `tile_size`, `pip_scale`, `grid_lines` parameters. |
| 50 | +- **Label controls.** `fill_label`, `size_label`, `pips_label` set legend |
| 51 | + titles; `xlabel`, `ylabel`, `title` set axis / figure titles. |
| 52 | +- **pixi environment.** `pixi.toml` with `test`, `example`, `build`, `check` |
| 53 | + tasks. The package is installed as an editable pypi dependency. |
| 54 | + |
| 55 | +### Example scripts |
| 56 | + |
| 57 | +- 1-to-1 ports of ggdiceplot demo plots: `oral_microbiome.py`, |
| 58 | + `oral_microbiome_fill_only.py`, `mirna_direction.py`, `zebra_domino.py`. |
| 59 | +- Standalone `example_domino.py`: demonstrates the refactored domino API. |
| 60 | +- Creative `pathways_nine.py`: nine signaling pathways on a 3×3 die face. |
| 61 | +- Showcase `example.py`: generates all `images/dice_*.png` gallery images. |
| 62 | + |
| 63 | +### Tests |
| 64 | + |
| 65 | +- `test_dice_plot.py`: smoke tests covering all three modes (categorical, |
| 66 | + continuous, discrete fill), both backends, return types, and preprocessing. |
| 67 | +- `test_domino_plot.py`: preprocessing, switch-axis, composition, validation, |
| 68 | + and backend smoke tests for the refactored domino API. |
| 69 | +- `test_layout.py`: geometry unit tests for pip positions and tile sizing. |
| 70 | + |
| 71 | +## 0.0.2 — 2025 |
| 72 | + |
| 73 | +Initial PyPI release with basic dice and domino plot support. |
0 commit comments