Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
523b5e4
Preliminary plotting capability for b2view
FrancescAlted Jun 13, 2026
9c2d32f
Acceleration path for NDArray getitem when strides are large
FrancescAlted Jun 13, 2026
02ad87e
Acceleration path for Column getitem when logical positions equal phy…
FrancescAlted Jun 13, 2026
f3f5d7f
Fix negative step in Column getitem that was returning []
FrancescAlted Jun 13, 2026
eba181d
Produce envelope (peak-preserving) plots by default
FrancescAlted Jun 13, 2026
cb051d2
Fix sidecar-handle cache collision for compact-store columns
FrancescAlted Jun 13, 2026
aa28c29
Enable cross-column index pruning in compact CTable queries
FrancescAlted Jun 13, 2026
a2feb12
Add notes on when summary indexes are not created automatically
FrancescAlted Jun 13, 2026
fd70fae
Stream exact plot envelopes for large series in b2view
FrancescAlted Jun 13, 2026
52d7703
Row paging re-aligns to the page grid after dim-mode single-row scrolls
FrancescAlted Jun 13, 2026
4a904c1
Add row-range zoom to the b2view plot modal
FrancescAlted Jun 13, 2026
435cf68
Updated commit message (the test path reference changed):
FrancescAlted Jun 14, 2026
cf1be1b
b2view: 'v' locks the data grid to the plotted row range
FrancescAlted Jun 14, 2026
fedfb1e
b2view: 'h' opens a high-res matplotlib view of the plotted range
FrancescAlted Jun 14, 2026
679dde9
CTable: full-table to_string(), table-valued repr, display options
FrancescAlted Jun 15, 2026
bd3a83a
CTable.to_csv(): return the CSV string when no path is given
FrancescAlted Jun 15, 2026
3502292
b2view: 'enter' decodes a skipped CTable cell on demand
FrancescAlted Jun 15, 2026
ceae844
b2view: SChunk preview as a paged hex dump
FrancescAlted Jun 15, 2026
39d94cf
Rename the b2view high-res extra: plot -> hires
FrancescAlted Jun 15, 2026
fa0276d
b2view: brand the status chips yellow (was white reverse video)
FrancescAlted Jun 15, 2026
ac34848
b2view: fix data panel not focused with --path + --panel data
FrancescAlted Jun 15, 2026
0cdd259
Start building wasm wheels for PyPI
FrancescAlted Jun 15, 2026
955abe8
WASM build for cp313 pinned to Pyodided 0.29.3: fixes a regression us…
FrancescAlted Jun 15, 2026
dc71431
Now, plot_series gives a locked row window precedence over the row fi…
FrancescAlted Jun 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 55 additions & 1 deletion .github/workflows/cibuildwheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,62 @@ jobs:
./wheelhouse/*.tar.gz


build_wheels_wasm:
name: Build WASM/Pyodide wheels for ${{ matrix.p_ver }}
runs-on: ubuntu-latest
env:
CIBW_BUILD: ${{ matrix.cibw_build }}
# WASM/Pyodide has no SIMD/runtime CPU detection; disable optimised paths
CMAKE_ARGS: "-DWITH_ZLIB_OPTIM=OFF -DWITH_OPTIM=OFF -DWITH_RUNTIME_CPU_DETECTION=OFF"
CIBW_TEST_COMMAND: "pytest {project}/tests"
# Pin the Pyodide version explicitly per target for reproducible builds.
# cp313 stays on 0.29.3 (the version wasm.yml proves good): 0.29.4, the
# cibuildwheel 4.1 default, regresses SChunk get_slice on WASM.
CIBW_PYODIDE_VERSION: ${{ matrix.pyodide_version }}
strategy:
fail-fast: false
matrix:
include:
# Python 3.13 -> pyemscripten_2025_0
- p_ver: "3.13"
cibw_build: "cp313-*"
pyodide_version: "0.29.3"
artifact_name: "wasm-pyodide-cp313"
# Python 3.14 -> pyemscripten_2026_0
- p_ver: "3.14"
cibw_build: "cp314-*"
pyodide_version: "314.0.0"
artifact_name: "wasm-pyodide-cp314"
steps:
- name: Checkout repo
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake

- name: Install cibuildwheel
run: pip install "cibuildwheel==4.1.*"

- name: Build wheels
# Testing is performed automatically by cibuildwheel (via node).
# platform=pyodide can only be set via the CLI flag, not an env var.
run: cibuildwheel --platform pyodide

- uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact_name }}
path: ./wheelhouse/*.whl


upload_pypi:
needs: [ build_wheels]
needs: [ build_wheels, build_wheels_wasm ]
runs-on: ubuntu-latest
# Only upload wheels when tagging (typically a release)
if: startsWith(github.event.ref, 'refs/tags')
Expand Down
28 changes: 28 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,34 @@

XXX version-specific blurb XXX

### CTable display

- **`CTable.to_string()` now renders the whole table by default** (every row and
every column), like `pandas`' `DataFrame.to_string()`. New `max_rows` and
`max_width` parameters truncate on demand. *Behaviour change*: previously
`to_string()` returned the truncated view; code that relied on that should
pass `max_rows=`/`max_width=` (or use `str()`).
- **The `[N rows x M columns]` dimensions footer now follows pandas**: omitted by
`to_string()` (pass `show_dimensions=True` to force it), and shown by
`str`/`repr`/`print` only when the view is actually truncated. Previously it
was always appended.
- **`repr(ctable)` now shows the same truncated table as `str(ctable)`**
(pandas/polars convention), instead of the one-line `CTable<…>` summary. The
compact summary remains available via `ctable.info`.
- **New display options** in `set_printoptions`: `display_width` controls the
column-fitting width budget (`None` = auto-detect terminal, `-1` = show all
columns, positive int = fixed budget), and `display_rows` now accepts `-1` to
show all rows (`0` still shows none).
- **New `blosc2.printoptions(...)` context manager** temporarily sets the display
options and restores them on exit, e.g.
`with blosc2.printoptions(display_rows=-1, display_width=-1): print(t)`.

### CTable I/O

- **`CTable.to_csv()` now accepts no path**, returning the CSV as a string like
`pandas`' `DataFrame.to_csv()`. Passing a path still writes the file (and
returns `None`); the returned string is byte-for-byte the same as the file.

## Changes from 4.4.3 to 4.4.5

Note: 4.4.4 was skipped due to a failure during the release process.
Expand Down
5 changes: 4 additions & 1 deletion doc/getting_started/b2view.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ metadata and vlmeta of the selected node, and a paged view of the data
itself — NDArrays of any dimensionality as well as CTables.

``b2view`` is installed with python-blosc2; no extra dependencies are
needed.
needed, including the in-terminal braille plot (the ``p`` key). Only the
high-resolution image view (the ``h`` key) needs the ``hires`` extra —
``pip install "blosc2[hires]"``. See :doc:`installation` for the list of
extras.

Step 1 — Create a sample store
------------------------------
Expand Down
32 changes: 32 additions & 0 deletions doc/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,38 @@ Conda

conda install -c conda-forge python-blosc2

Optional features (extras)
++++++++++++++++++++++++++

The base install already includes everything needed for compression, the
array machinery, and the :doc:`b2view <b2view>` terminal browser. A few
heavier, feature-specific dependencies are kept out of it and grouped
into *extras* that you opt into with the ``blosc2[extra]`` syntax:

.. list-table::
:header-rows: 1
:widths: 18 82

* - Extra
- Adds
* - ``hires``
- The high-resolution image view in b2view (the ``h`` key), which
renders a real ``matplotlib`` image in the terminal
(``textual-image``, ``matplotlib``). The lightweight braille plot
(the ``p`` key) is built in and needs no extra.
* - ``parquet``
- The ``parquet-to-blosc2`` converter (``pyarrow``); see
:doc:`parquet_to_blosc2`.

Install one or more extras by listing them in brackets (quote the
argument in shells like ``zsh`` that treat brackets specially):

.. code-block:: console

pip install "blosc2[hires]" # b2view high-res view (h key)
pip install "blosc2[parquet]" # the Parquet converter
pip install "blosc2[hires,parquet]" # both at once

Source code
+++++++++++

Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ dependencies = [
"requests",
"rich",
"textual",
"textual-plotext",
"threadpoolctl; platform_machine != 'wasm32'",
]
version = "4.4.6.dev0"
Expand All @@ -52,6 +53,11 @@ documentation = "https://www.blosc.org/python-blosc2/python-blosc2.html"

[project.optional-dependencies]
parquet = ["pyarrow"]
# The b2view TUI and its in-terminal braille plot (the 'p' key) are core deps,
# so they work out of the box. This extra only adds the high-res 'h' view,
# which renders a real matplotlib image (kitty/iTerm2/sixel, or half-cells
# elsewhere) — matplotlib is the heavy part, hence the opt-in.
hires = ["textual-image", "matplotlib"]

[project.scripts]
parquet-to-blosc2 = "blosc2.cli.parquet_to_blosc2:main"
Expand Down
2 changes: 2 additions & 0 deletions src/blosc2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ def _raise(exc):
get_null_policy,
get_printoptions,
null_policy,
printoptions,
set_printoptions,
)
from .groupby import CTableGroupBy, group_reduce
Expand Down Expand Up @@ -1075,5 +1076,6 @@ def _raise(exc):
"get_null_policy",
"get_printoptions",
"null_policy",
"printoptions",
"set_printoptions",
]
Loading
Loading