Skip to content

Commit 7da0d32

Browse files
committed
+ Merged upstream
2 parents 8f861c1 + 85eb7aa commit 7da0d32

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+349
-552
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
python-version: ["3.10", "3.11", "3.12"]
15+
python-version: ["3.10", "3.11", "3.12", "3.13.0"]
1616
# macos-12 is an intel runner, macos-14 is a arm64 runner
1717
platform: [ubuntu-latest, windows-latest, macos-12, macos-14]
1818

@@ -61,7 +61,15 @@ jobs:
6161
conda activate env
6262
export DISABLE_NUMCODECS_AVX2=""
6363
# TODO: put back zfpy import when it supports numpy 2.0
64-
python -m pip install -v -e .[test,test_extras,msgpack,pcodec]
64+
python -m pip install -v -e .[test,test_extras,msgpack]
65+
66+
- name: Install pcodec
67+
if: matrix.python-version != '3.13.0'
68+
shell: "bash -l {0}"
69+
run: |
70+
conda activate env
71+
python -m pip install -v pcodec
72+
6573
6674
# This is used to test with zfpy, which does not yet support numpy 2.0
6775
- name: Install older numpy and zfpy

.github/workflows/wheel.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
os: [ubuntu-latest, windows-latest, macos-12, macos-14]
1818
env:
1919
CIBW_TEST_COMMAND: python -c "import numcodecs"
20-
CIBW_BUILD: "cp310-* cp311-* cp312-*"
20+
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*"
2121
CIBW_SKIP: "pp* *-musllinux_* *win32 *_i686 *_s390x"
2222
# note: CIBW_ENVIRONMENT is now set in pyproject.toml
2323

@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
submodules: true
2828

29-
- uses: pypa/cibuildwheel@v2.20.0
29+
- uses: pypa/cibuildwheel@v2.21.3
3030

3131
- uses: actions/upload-artifact@v4
3232
with:
@@ -44,7 +44,7 @@ jobs:
4444
- uses: actions/setup-python@v5
4545
name: Install Python
4646
with:
47-
python-version: '3.10'
47+
python-version: "3.10"
4848

4949
- name: Build sdist
5050
run: pipx run build --sdist

.pre-commit-config.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
1+
exclude: ^fixture/ # files with trailing whitespaces on purpose
12
ci:
23
autoupdate_commit_msg: "chore: update pre-commit hooks"
34
autofix_commit_msg: "style: pre-commit fixes"
45
autofix_prs: false
5-
default_stages: [commit, push]
6+
default_stages: [pre-commit, pre-push]
67
default_language_version:
78
python: python3
89
repos:
10+
- repo: https://github.com/pre-commit/pre-commit-hooks
11+
rev: v5.0.0
12+
hooks:
13+
- id: trailing-whitespace
14+
- id: check-yaml
15+
- id: debug-statements
16+
917
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: 'v0.6.2'
18+
rev: v0.6.9
1119
hooks:
1220
- id: ruff
1321
args: ["--fix", "--show-fixes"]
1422
- id: ruff-format
23+
24+
- repo: https://github.com/scientific-python/cookie
25+
rev: 2024.08.19
26+
hooks:
27+
- id: sp-repo-review

.pyup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# autogenerated pyup.io config file
1+
# autogenerated pyup.io config file
22
# see https://pyup.io/docs/configuration/ for all available options
33

44
schedule: every month

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Numcodecs
22
=========
33

4-
Numcodecs is a Python package providing buffer compression and transformation
4+
Numcodecs is a Python package providing buffer compression and transformation
55
codecs for use in data storage and communication applications.
66

77
.. image:: https://readthedocs.org/projects/numcodecs/badge/?version=latest

adhoc/blosc_memleak_check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import sys
22

3-
import numcodecs
43
import numpy as np
54
from numpy.testing import assert_array_equal
65

6+
import numcodecs
77

88
codec = numcodecs.Blosc()
99
data = np.arange(int(sys.argv[1]))
10-
for i in range(int(sys.argv[2])):
10+
for _ in range(int(sys.argv[2])):
1111
enc = codec.encode(data)
1212
dec = codec.decode(enc)
1313
arr = np.frombuffer(dec, dtype=data.dtype)

c-blosc

Submodule c-blosc updated 368 files

docs/Makefile

Lines changed: 13 additions & 226 deletions
Original file line numberDiff line numberDiff line change
@@ -1,233 +1,20 @@
1-
# Makefile for Sphinx documentation
1+
# Minimal makefile for Sphinx documentation
22
#
33

4-
# You can set these variables from the command line.
5-
SPHINXOPTS =
6-
SPHINXBUILD = sphinx-build
7-
PAPER =
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
89
BUILDDIR = _build
910

10-
.PHONY: sphinx
11-
sphinx:
12-
# User-friendly check for sphinx-build
13-
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
14-
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don\'t have Sphinx installed, grab it from http://sphinx-doc.org/)
15-
endif
16-
17-
# Internal variables.
18-
PAPEROPT_a4 = -D latex_paper_size=a4
19-
PAPEROPT_letter = -D latex_paper_size=letter
20-
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
21-
# the i18n builder cannot share the environment and doctrees with the others
22-
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
23-
24-
.PHONY: help
11+
# Put it first so that "make" without argument is like "make help".
2512
help:
26-
@echo "Please use \`make <target>' where <target> is one of"
27-
@echo " html to make standalone HTML files"
28-
@echo " dirhtml to make HTML files named index.html in directories"
29-
@echo " singlehtml to make a single large HTML file"
30-
@echo " pickle to make pickle files"
31-
@echo " json to make JSON files"
32-
@echo " htmlhelp to make HTML files and a HTML help project"
33-
@echo " qthelp to make HTML files and a qthelp project"
34-
@echo " applehelp to make an Apple Help Book"
35-
@echo " devhelp to make HTML files and a Devhelp project"
36-
@echo " epub to make an epub"
37-
@echo " epub3 to make an epub3"
38-
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
39-
@echo " latexpdf to make LaTeX files and run them through pdflatex"
40-
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
41-
@echo " text to make text files"
42-
@echo " man to make manual pages"
43-
@echo " texinfo to make Texinfo files"
44-
@echo " info to make Texinfo files and run them through makeinfo"
45-
@echo " gettext to make PO message catalogs"
46-
@echo " changes to make an overview of all changed/added/deprecated items"
47-
@echo " xml to make Docutils-native XML files"
48-
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
49-
@echo " linkcheck to check all external links for integrity"
50-
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
51-
@echo " coverage to run coverage check of the documentation (if enabled)"
52-
@echo " dummy to check syntax errors of document sources"
53-
54-
.PHONY: clean
55-
clean:
56-
rm -rf $(BUILDDIR)/*
57-
58-
.PHONY: html
59-
html: sphinx
60-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
61-
@echo
62-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
63-
64-
.PHONY: dirhtml
65-
dirhtml: sphinx
66-
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
67-
@echo
68-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
69-
70-
.PHONY: singlehtml
71-
singlehtml: sphinx
72-
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
73-
@echo
74-
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
75-
76-
.PHONY: pickle
77-
pickle: sphinx
78-
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
79-
@echo
80-
@echo "Build finished; now you can process the pickle files."
81-
82-
.PHONY: json
83-
json: sphinx
84-
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
85-
@echo
86-
@echo "Build finished; now you can process the JSON files."
87-
88-
.PHONY: htmlhelp
89-
htmlhelp: sphinx
90-
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
91-
@echo
92-
@echo "Build finished; now you can run HTML Help Workshop with the" \
93-
".hhp project file in $(BUILDDIR)/htmlhelp."
94-
95-
.PHONY: qthelp
96-
qthelp: sphinx
97-
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
98-
@echo
99-
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
100-
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
101-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/zarr.qhcp"
102-
@echo "To view the help file:"
103-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/zarr.qhc"
104-
105-
.PHONY: applehelp
106-
applehelp: sphinx
107-
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
108-
@echo
109-
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
110-
@echo "N.B. You won't be able to view it unless you put it in" \
111-
"~/Library/Documentation/Help or install it in your application" \
112-
"bundle."
113-
114-
.PHONY: devhelp
115-
devhelp: sphinx
116-
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
117-
@echo
118-
@echo "Build finished."
119-
@echo "To view the help file:"
120-
@echo "# mkdir -p $$HOME/.local/share/devhelp/zarr"
121-
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/zarr"
122-
@echo "# devhelp"
123-
124-
.PHONY: epub
125-
epub: sphinx
126-
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
127-
@echo
128-
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
129-
130-
.PHONY: epub3
131-
epub3: sphinx
132-
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
133-
@echo
134-
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
135-
136-
.PHONY: latex
137-
latex: sphinx
138-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
139-
@echo
140-
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
141-
@echo "Run \`make' in that directory to run these through (pdf)latex" \
142-
"(use \`make latexpdf' here to do that automatically)."
143-
144-
.PHONY: latexpdf
145-
latexpdf: sphinx
146-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
147-
@echo "Running LaTeX files through pdflatex..."
148-
$(MAKE) -C $(BUILDDIR)/latex all-pdf
149-
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
150-
151-
.PHONY: latexpdfja
152-
latexpdfja: sphinx
153-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
154-
@echo "Running LaTeX files through platex and dvipdfmx..."
155-
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
156-
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
157-
158-
.PHONY: text
159-
text: sphinx
160-
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
161-
@echo
162-
@echo "Build finished. The text files are in $(BUILDDIR)/text."
163-
164-
.PHONY: man
165-
man: sphinx
166-
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
167-
@echo
168-
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
169-
170-
.PHONY: texinfo
171-
texinfo: sphinx
172-
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
173-
@echo
174-
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
175-
@echo "Run \`make' in that directory to run these through makeinfo" \
176-
"(use \`make info' here to do that automatically)."
177-
178-
.PHONY: info
179-
info: sphinx
180-
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
181-
@echo "Running Texinfo files through makeinfo..."
182-
make -C $(BUILDDIR)/texinfo info
183-
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
184-
185-
.PHONY: gettext
186-
gettext: sphinx
187-
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
188-
@echo
189-
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
190-
191-
.PHONY: changes
192-
changes: sphinx
193-
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
194-
@echo
195-
@echo "The overview file is in $(BUILDDIR)/changes."
196-
197-
.PHONY: linkcheck
198-
linkcheck: sphinx
199-
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
200-
@echo
201-
@echo "Link check complete; look for any errors in the above output " \
202-
"or in $(BUILDDIR)/linkcheck/output.txt."
203-
204-
.PHONY: doctest
205-
doctest: sphinx
206-
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
207-
@echo "Testing of doctests in the sources finished, look at the " \
208-
"results in $(BUILDDIR)/doctest/output.txt."
209-
210-
.PHONY: coverage
211-
coverage: sphinx
212-
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
213-
@echo "Testing of coverage in the sources finished, look at the " \
214-
"results in $(BUILDDIR)/coverage/python.txt."
215-
216-
.PHONY: xml
217-
xml: sphinx
218-
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
219-
@echo
220-
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
221-
222-
.PHONY: pseudoxml
223-
pseudoxml: sphinx
224-
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
225-
@echo
226-
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
22714

228-
.PHONY: dummy
229-
dummy: sphinx
230-
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
231-
@echo
232-
@echo "Build finished. Dummy builder generates no files."
15+
.PHONY: help Makefile
23316

17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/api.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
API reference
2+
=============
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
compression/index
8+
filter/index
9+
other/index
10+
checksum32
11+
abc
12+
registry

docs/checksum32.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
32-bit checksums
2-
================
1+
Checksum codecs
2+
===============
33
.. automodule:: numcodecs.checksum32
44

55
CRC32
@@ -37,7 +37,7 @@ JenkinsLookup3
3737
--------------
3838

3939
.. autoclass:: JenkinsLookup3
40-
40+
4141
.. autoattribute:: codec_id
4242
.. autoattribute:: initval
4343
.. autoattribute:: prefix

0 commit comments

Comments
 (0)