Skip to content

Commit a6c1fe8

Browse files
committed
Getting ready for release 4.6.0
1 parent 77edc2a commit a6c1fe8

4 files changed

Lines changed: 104 additions & 35 deletions

File tree

ANNOUNCE.rst

Lines changed: 39 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,49 @@
1-
Announcing Python-Blosc2 4.5.1
1+
Announcing Python-Blosc2 4.6.0
22
==============================
33

4-
We are happy to announce this release, which builds the ``b2view`` terminal
5-
data viewer into a richer **data-exploration** tool, upgrades the bundled
6-
**C-Blosc2 to 3.1.4**, and promotes **WASM/Pyodide to a fully supported
7-
platform**.
4+
We are happy to announce this release, which sharpens the **columnar / query
5+
side** of blosc2: zero-copy sorted views, queries over string (dictionary)
6+
columns, a more flexible and faster ``group_by``, and an ``b2view`` terminal
7+
browser that can now group, sort, and plot interactively.
88

99
The main highlights are:
1010

11-
- **Scatter plots in b2view**: from a column plot, press ``s`` to scatter the
12-
current column against another column you pick from a list — column-vs-column
13-
over the current (zoomed) row range — and ``h`` for a high-resolution
14-
``matplotlib`` scatter. The high-res view of a 1-D series is now a min/max
15-
envelope too, with a new ``r`` key to toggle the raw values.
16-
17-
- **Searchable pickers**: the ``c`` go-to-column key now opens a searchable,
18-
selectable column list (type to filter, arrows, Enter) for CTables, and ``/``
19-
opens a searchable multi-select to choose which columns are shown.
20-
21-
- **One-shot demo download**: ``b2view --download`` fetches a demo bundle
22-
(``chicago-taxi-flat.b2z`` by default) into the current directory if it is not
23-
already there, then opens it — a zero-setup way to try the viewer.
24-
25-
- **Interaction fixes**: go-to-row/column pre-fills are now pre-selected (the
26-
first keystroke replaces them), and ``escape`` keeps its documented layered
27-
exit even while a panel is maximized (use ``r`` to restore). Plus a refreshed
28-
header, a filename label in the title, and ``CTable.info`` now showing
29-
per-column compressed sizes.
30-
31-
A quick taste — grab the demo and start exploring::
32-
33-
$ pip install blosc2 --upgrade
11+
- **Zero-copy sorted views**: ``CTable.sort_by(..., view=True)`` returns a
12+
lightweight sorted view that shares the parent's column data and gathers rows
13+
on demand — no whole-table copy. Sorting on a fully indexed column streams
14+
straight from the index, so reading a sorted slice of a huge (on-disk) table
15+
is as easy as ``t.sort_by("col", view=True)[:10]``.
16+
17+
- **Queries over string columns**: ``where`` expressions now work on
18+
dictionary-encoded (string) columns, including membership tests such as
19+
``'"Acme" in company'``, filtering categorical text without decoding the whole
20+
column.
21+
22+
- **Smarter, faster group_by**: ``group_by(...).agg()`` accepts flexible
23+
aggregation specs and explicit output names (pandas-style), a new tri-state
24+
``sort=`` (``None``/``True``/``False``) sorts only when cheap, the last
25+
grouping is memoized, and ``min``/``max``/``argmin``/``argmax`` are
26+
accelerated from per-block index summaries instead of decompressing data.
27+
28+
- **b2view grows up**: interactive **group-by** (``G``, including float keys),
29+
**sort-by-column** (``S``, zero-copy via the index), and much **better plots**
30+
— bars for categorical keys, lines/stems for numeric keys, hi-res variants for
31+
every plot type, and ``--max`` to maximize a panel. ``b2view`` is now an
32+
**opt-in extra** (``pip install "blosc2[tui]"``), so a plain
33+
``pip install blosc2`` stays lean.
34+
35+
- **Fixes & maintenance**: the bundled **C-Blosc2 is upgraded to 3.1.5**, the
36+
open-file cache now validates cached handles against the file's fingerprint (so
37+
a file changed underneath an open handle is never served stale), plus
38+
compatibility with **NumPy 2.5**.
39+
40+
A quick taste — grab a table and explore it::
41+
42+
$ pip install "blosc2[tui]" --upgrade
3443
$ b2view --download --panel data
3544

36-
Press ``p`` to plot a column, ``s`` to scatter it against another, and ``h``
37-
for a high-resolution view — all without decompressing anything you do not look
38-
at.
45+
Press ``G`` to group, ``S`` to sort, and ``p`` to plot a column — all without
46+
decompressing anything you do not look at.
3947

4048
Install it with::
4149

RELEASE_NOTES.md

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
11
# Release notes
22

3-
## Changes from 4.5.1 to 4.5.2
3+
## Changes from 4.5.1 to 4.6.0
44

5-
XXX version-specific blurb XXX
5+
### `CTable.sort_by(view=True)`: zero-copy sorted views
6+
7+
- `CTable.sort_by()` now accepts **`view=True`**, returning a lightweight
8+
**sorted view** that shares the parent's column data and gathers rows on
9+
demand in sorted order — no whole-table copy. This is ideal for reading a
10+
sorted slice of a large (possibly on-disk) table::
11+
12+
t.sort_by("col", view=True)[:10] # top-10 without materialising
13+
14+
Sorting on a **fully indexed** column streams directly from the index, so the
15+
table is never materialised. Multi-column sorts and dotted (nested) leaf
16+
names are supported (e.g. `t.sort_by(["trip.begin.lon", "payment.fare"],
17+
ascending=[True, False])`).
18+
19+
### `where` on dictionary (string) columns
20+
21+
- `where` expressions now work over **dictionary-encoded (string) columns**,
22+
including membership tests such as `'"Acme" in company'`, so categorical
23+
text columns can be filtered without decoding the whole column.
624

725
### `b2view` is now an opt-in extra
826

@@ -64,6 +82,49 @@ XXX version-specific blurb XXX
6482
keys were already ascending; the generic Python fallback stays unsorted.
6583
Pass `sort=False` to opt out.
6684

85+
### Accelerated reductions from index summaries
86+
87+
- `min`/`max` on indexed `Column`s, and `argmin`/`argmax` inside `group_by`, are
88+
now **accelerated using the index's per-block min/max summaries**: when an
89+
index is available these reductions run from the precomputed summaries instead
90+
of decompressing the underlying data, which is dramatically faster on large
91+
columns. A fast path also builds **min/max envelope plots** from any index.
92+
- The **last `group_by` operation is memoized** and reused when the same
93+
grouping is requested again, avoiding recomputation in interactive / repeated
94+
workflows (e.g. `b2view`).
95+
96+
### b2view: group-by, sort, and richer plots
97+
98+
- **Interactive group-by (`G`)**: group a `CTable` by a column (integer, string,
99+
or now **float** keys) directly in the viewer, with a three-list / two-column
100+
menu; while grouped, `S`/`R` operate on the grouped result and the data
101+
panel's subtitle shows a `G(roup)` chip. The last grouping is memoized for
102+
instant reuse.
103+
- **Sort by column (`S`)**: sort a `CTable` by a **fully indexed** column via a
104+
dropdown (`R` toggles reverse) as a zero-copy `sort_by(view=True)` that streams
105+
from the index — the table is never materialised, `Esc` restores the original
106+
order, and a `SORTED` chip shows in the status bar. Non-indexed columns can
107+
now be sorted too. Sort and filter are mutually exclusive; a row window
108+
composes over a sort, and an `f`ilter is preserved across `S`ort / `G`roup.
109+
- **Better plots of grouped/sorted views**: a grouped view plots **bars for a
110+
categorical key** and **lines for a numeric key**; numeric-key group plots
111+
render as **stem/impulse charts** rather than misleading connected lines. Bar
112+
plots gain an `h`i-res counterpart mirroring the line/scatter plots, and `+`/`-`
113+
zoom about the view's left edge.
114+
- **`--max`** maximizes the current panel, and `escape` is now the single,
115+
consistent way to back out of every modal.
116+
117+
### Other / bug fixes
118+
119+
- **C-Blosc2 upgraded to 3.1.5.**
120+
- **Open-file cache correctness**: cached open handles are now validated against
121+
the file's fingerprint (`st_mtime_ns`, `st_size`) and cached index handles are
122+
released when a table closes, so a file changed underneath an open handle is no
123+
longer served stale.
124+
- **NumPy 2.5 compatibility**: adjusted for deprecations in NumPy 2.5.
125+
- Substantially **reduced test-suite runtime**, and emscripten builds no longer
126+
attempt to spawn subprocesses (unsupported there).
127+
67128
## Changes from 4.5.0 to 4.5.1
68129

69130
This follow-up release builds the `b2view` terminal viewer into a richer

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dependencies = [
4141
"rich",
4242
"threadpoolctl; platform_machine != 'wasm32'",
4343
]
44-
version = "4.5.2.dev0"
44+
version = "4.6.0"
4545
[project.entry-points."array_api"]
4646
blosc2 = "blosc2"
4747

src/blosc2/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "4.5.2.dev0"
1+
__version__ = "4.6.0"
22
__array_api_version__ = "2024.12"

0 commit comments

Comments
 (0)