Skip to content

Commit 59eeb53

Browse files
authored
Merge branch 'main' into arrayapi
2 parents 1a4d82f + eec7a47 commit 59eeb53

12 files changed

Lines changed: 24 additions & 20 deletions

File tree

.github/workflows/wasm.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99

1010
env:
1111
CIBW_BUILD_VERBOSITY: 1
12-
# cibuildwheel cannot choose for a specified version of pyodide yet
13-
# PYODIDE_VERSION: 0.27.2
12+
# In case you want to specify a version of pyodide
13+
# PYODIDE_VERSION: 0.28.2
1414

1515
jobs:
1616
build_wheels_wasm:
@@ -25,8 +25,8 @@ jobs:
2525
strategy:
2626
matrix:
2727
os: [ubuntu-latest]
28-
cibw_build: ["cp3{11,12,13}-*"]
29-
p_ver: ["3.11-3.13"]
28+
cibw_build: ["cp3{12,13,14}-*"]
29+
p_ver: ["3.12-3.14"]
3030

3131
steps:
3232
- name: Checkout repo

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
- id: trailing-whitespace
1717

1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.12.11
19+
rev: v0.13.0
2020
hooks:
2121
- id: ruff-check
2222
args: ["--fix", "--show-fixes"]

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ In addition, other people have participated to the project in different
115115
aspects:
116116

117117
- Jan Sellner, contributed the mmap support for NDArray/SChunk objects.
118-
- Dimitri Papadopoulos, contributed a large bunch of improvements to the
119-
in many aspects of the project. His attention to detail is remarkable.
118+
- Dimitri Papadopoulos, contributed a large bunch of improvements to
119+
many aspects of the project. His attention to detail is remarkable.
120120
- And many others that have contributed with bug reports, suggestions and
121121
improvements.
122122

ROADMAP-TO-4.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ List of desired features for a 4.0 release
55

66
* Have a completely specified format for the `TreeStore` and `DictStore`. The format should allow to have containers either in memory or on disk. Also, it should allow a sparse or contiguous storage. The user will be able to specify these properties by following the same conventions than for NDArray objects (alas, `urlpath` and `contiguous` params).
77

8-
* New `.save()` and `.to_cframe()` methods should be implemented to convert from in-memory representations to on disk and viceversa.
8+
* New `.save()` and `.to_cframe()` methods should be implemented to convert from in-memory representations to on disk and vice-versa.
99
* The format for `TreeStore` and `DictStore` will initially be defined at Python level, and documented only in the Python-Blosc2 repository. An implementation in the C library is desirable, but not mandatory at this time.
1010

1111
* A new `Table` object should be implemented based on the `TreeStore` class (a subclass?), with a label ('table'?) in metalayers indicating that the contents of the tree can be interpreted as regular table. As `TreeStore` is hierarchical, a subtree can also be interpreted as a `Table` if there a label in the metalayer of the subtree (or group in HDF5 parlance); that can lead to tables than can have different subtables embedded. It is not clear yet if should impose the same number of rows for all the columns.

bench/ndarray/compute_dists.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@
3636
blosc2.storage_dflts["contiguous"] = storage.contiguous
3737
blosc2.storage_dflts["mode"] = storage.mode
3838

39-
urlpath = dict((aname, None) for aname in ("a", "b", "c"))
4039
if persistent:
41-
urlpath = dict((aname, f"{aname}.b2nd") for aname in ("a", "b", "c"))
40+
urlpath = {aname: f"{aname}.b2nd" for aname in ("a", "b", "c")}
41+
else:
42+
urlpath = {aname: None for aname in ("a", "b", "c")}
4243

4344
btimes = []
4445
bspeeds = []

doc/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def linkcode_resolve(domain, info):
8181

8282
import importlib
8383
import inspect
84-
import os
8584

8685
# Modify this to point to your package
8786
module_name = info["module"]

doc/getting_started/tutorials/08.schunk-slicing_and_beyond.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"source": [
77
"# Slicing, extending and serializing with SChunks\n",
88
"\n",
9-
"The usual way to store generic binary data in python-blosc2 is through a `SChunk` (super-chunk) object, where the data is split into chunks of the same size, which we studied in the last tutorial. We saw how to retrieve, update or append data in the form of chunks. In fact, one can work with the individual multi-byte items composing the data (and not the bytes directly), using native SChunk methods - such operations will be the subject of this tutorial. We will use NumPy arrays as data sources, but everything we're going to do woul work equally well with any Python object supporting the [Buffer Protocol](https://docs.python.org/3/c-api/buffer.html).\n",
9+
"The usual way to store generic binary data in python-blosc2 is through a `SChunk` (super-chunk) object, where the data is split into chunks of the same size, which we studied in the last tutorial. We saw how to retrieve, update or append data in the form of chunks. In fact, one can work with the individual multi-byte items composing the data (and not the bytes directly), using native SChunk methods - such operations will be the subject of this tutorial. We will use NumPy arrays as data sources, but everything we're going to do would work equally well with any Python object supporting the [Buffer Protocol](https://docs.python.org/3/c-api/buffer.html).\n",
1010
"\n",
1111
"First, we create our own `SChunk` instance; this time, let's fill it with data upon creation."
1212
]
@@ -93,7 +93,7 @@
9393
{
9494
"cell_type": "markdown",
9595
"metadata": {},
96-
"source": "As you can see, the data is returned as a bytes object. If we want to get a more meaningful container instead, we can use `get_slice`. This method requires an initailised buffer into which to load the bytes, and one may pass any Python object (supporting the Buffer Protocol) as the `out` param to fill it with the data. In this case we will use a NumPy array container."
96+
"source": "As you can see, the data is returned as a bytes object. If we want to get a more meaningful container instead, we can use `get_slice`. This method requires an initialised buffer into which to load the bytes, and one may pass any Python object (supporting the Buffer Protocol) as the `out` param to fill it with the data. In this case we will use a NumPy array container."
9797
},
9898
{
9999
"cell_type": "code",

doc/python-blosc2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<h3 style="margin-top: 10px; margin-bottom: 15px;">Hierarchical Structures</h3>
7373
</div>
7474

75-
Efficiently store data hierachically with the `TreeStore class <https://www.blosc.org/python-blosc2/reference/tree_store.html#blosc2.TreeStore>`_ for convenience and optimized `performance <https://www.blosc.org/posts/new-treestore-blosc2/>`_.
75+
Efficiently store data hierarchically with the `TreeStore class <https://www.blosc.org/python-blosc2/reference/tree_store.html#blosc2.TreeStore>`_ for convenience and optimized `performance <https://www.blosc.org/posts/new-treestore-blosc2/>`_.
7676

7777
.. grid-item-card::
7878
:class-card: intro-card text-center no-border

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ ignore = [
124124
"RET508",
125125
"RUF005",
126126
"RUF015",
127+
"RUF059",
127128
"SIM108",
128-
"UP038", # https://github.com/astral-sh/ruff/issues/7871
129129
]
130130

131131
[tool.ruff.lint.extend-per-file-ignores]

src/blosc2/dict_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def to_b2z(self, overwrite=False, filename=None) -> os.PathLike[Any] | str:
392392
filepaths.append(filepath)
393393

394394
# Sort filepaths by file size from largest to smallest
395-
filepaths.sort(key=lambda f: os.path.getsize(f), reverse=True)
395+
filepaths.sort(key=os.path.getsize, reverse=True)
396396

397397
with zipfile.ZipFile(self.b2z_path, "w", zipfile.ZIP_STORED) as zf:
398398
# Write all files (except estore_path) first (sorted by size)

0 commit comments

Comments
 (0)