Skip to content

Commit

Permalink
Merge branch 'support/v2' into recursive-getsize
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Oct 18, 2024
2 parents 86d737f + ed94877 commit cadae2e
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ body:
attributes:
label: Python Version
description: Version of Python interpreter
placeholder: 3.10, 3.11, 3.12 etc.
placeholder: 3.11, 3.12, 3.13 etc.
validations:
required: true
- type: input
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: Minimal installation

on:
push:
branches: [ main ]
branches: [ support/v2 ]
pull_request:
branches: [ main ]
branches: [ support/v2 ]

jobs:
minimum_build:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@ name: Linux Testing

on:
push:
branches: [ main ]
branches: [ support/v2]
pull_request:
branches: [ main ]
branches: [ support/v2]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.11', '3.12', '3.13']
numpy_version: ['>=2.1', '==1.24.*']
exclude:
- python-version: '3.12'
numpy_version: '==1.24.*'
- python-version: '3.13'
numpy_version: '==1.24.*'
services:
redis:
image: redis
Expand Down Expand Up @@ -50,7 +52,7 @@ jobs:
- name: Create Conda environment with the rights deps
shell: "bash -l {0}"
run: |
conda create -n zarr-env python==${{matrix.python-version}} bsddb3 pip nodejs
conda create -n zarr-env python==${{matrix.python-version}} pip nodejs
conda activate zarr-env
npm install -g azurite
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
with:
name: releases
path: dist
- uses: pypa/[email protected].1
- uses: pypa/[email protected].3
with:
user: __token__
password: ${{ secrets.pypi_password }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Python package

on:
push:
branches: [ main ]
branches: [ support/v2 ]
pull_request:
branches: [ main ]
branches: [ support/v2 ]

jobs:
windows:
Expand All @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: True
matrix:
python-version: ['3.10', '3.11']
python-version: ['3.11', '3.12']
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions TEAM.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- @martindurant (Martin Durant)
- @normanrz (Norman Rzepka)
- @dstansby (David Stansby)
- @dcherian (Deepak Cherian)
- @TomAugspurger (Tom Augspurger)

## Emeritus core-developers
- @alimanfoo (Alistair Miles)
Expand Down
2 changes: 0 additions & 2 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ Nat Methods 8, 441 (2011). https://doi.org/10.1038/nmeth.1618
.sd-card .sd-card-header {
border: none;
background-color: white;
color: #150458 !important;
font-size: var(--pst-font-size-h5);
font-weight: bold;
padding: 2.5rem 0rem 0.5rem 0rem;
Expand Down Expand Up @@ -107,7 +106,6 @@ html[data-theme=dark] .sd-shadow-sm {

html[data-theme=dark] .sd-card .sd-card-header {
background-color:var(--pst-color-background);
color: #150458 !important;
}

html[data-theme=dark] .sd-card .sd-card-footer {
Expand Down
12 changes: 10 additions & 2 deletions docs/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,19 @@ Release notes

Enhancements
~~~~~~~~~~~~
* Added testing on Python 3.13.

Maintenance
~~~~~~~~~~~
* ``getsize`` now returns the total size of all nested arrays.
* ``getsize`` now returns the total size of all nested arrays.
By :user:`Ben Jeffery <benjeffery>` :issue:`253`.
* Dropped support for Python 3.10.
By :user:`David Stansby <dstansby>` (:issue:`2344`).
* Removed testing for compatibility with the ``bsddb3`` package.
``bsddb3`` was last released four years ago, and should still work with
``zarr-python`` if you can install it, but to reduce our maintenance
burden we will no longer run our compatibility tests for it.
By :user:`David Stansby <dstansby>` (:issue:`2344`).

Deprecations
~~~~~~~~~~~~
Expand All @@ -43,7 +51,7 @@ Enhancements
~~~~~~~~~~~~
* Added support for creating a copy of data when converting a `zarr.Array`
to a numpy array.
By :user:`David Stansby <dstansby>` (:issue:`2106`) and
By :user:`David Stansby <dstansby>` (:issue:`2106`) and
:user:`Joe Hamman <jhamman>` (:issue:`2123`).

Maintenance
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,8 @@ storing an array or group. Here is an example using a Berkeley DB B-tree
database for storage (requires `bsddb3
<https://www.jcea.es/programacion/pybsddb.htm>`_ to be installed)::

.. doctest-requires:: bsddb3

>>> import bsddb3
>>> store = zarr.DBMStore('data/example.bdb', open=bsddb3.btopen)
>>> root = zarr.group(store=store, overwrite=True)
Expand Down Expand Up @@ -1009,12 +1011,12 @@ class from ``fsspec``. The following example demonstrates how to access
a ZIP-archived Zarr group on s3 using `s3fs <https://s3fs.readthedocs.io/en/latest/>`_ and ``ZipFileSystem``:

>>> s3_path = "s3://path/to/my.zarr.zip"
>>>
>>>
>>> s3 = s3fs.S3FileSystem()
>>> f = s3.open(s3_path)
>>> fs = ZipFileSystem(f, mode="r")
>>> store = FSMap("", fs, check=False)
>>>
>>>
>>> # caching may improve performance when repeatedly reading the same data
>>> cache = zarr.storage.LRUStoreCache(store, max_size=2**28)
>>> z = zarr.group(store=cache)
Expand Down
41 changes: 13 additions & 28 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@ build-backend = "setuptools.build_meta"
name = "zarr"
description = "An implementation of chunked, compressed, N-dimensional arrays for Python"
readme = { file = "README.md", content-type = "text/markdown" }
maintainers = [
{ name = "Alistair Miles", email = "[email protected]" }
]
requires-python = ">=3.10"
maintainers = [{ name = "Alistair Miles", email = "[email protected]" }]
requires-python = ">=3.11"
dependencies = [
'asciitree',
'numpy>=1.24',
'fasteners; sys_platform != "emscripten"',
'numcodecs>=0.10.0',
]
dynamic = [
"version",
]
dynamic = ["version"]
classifiers = [
'Development Status :: 6 - Mature',
'Intended Audience :: Developers',
Expand All @@ -30,18 +26,14 @@ classifiers = [
'Topic :: Software Development :: Libraries :: Python Modules',
'Operating System :: Unix',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
]
license = { text = "MIT" }

[project.optional-dependencies]
jupyter = [
'notebook',
'ipytree>=0.2.2',
'ipywidgets>=8.0.0',
]
jupyter = ['notebook', 'ipytree>=0.2.2', 'ipywidgets>=8.0.0']
docs = [
'sphinx',
'sphinx-automodapi',
Expand All @@ -64,14 +56,11 @@ Homepage = "https://github.com/zarr-developers/zarr-python"
exclude_lines = [
"pragma: no cover",
"pragma: ${PY_MAJOR_VERSION} no cover",
'.*\.\.\.' # Ignore "..." lines
'.*\.\.\.', # Ignore "..." lines
]

[tool.coverage.run]
omit = [
"zarr/meta_v1.py",
"bench/compress_normal.py",
]
omit = ["zarr/meta_v1.py", "bench/compress_normal.py"]

[tool.setuptools]
packages = ["zarr", "zarr._storage", "zarr.tests"]
Expand Down Expand Up @@ -100,14 +89,12 @@ exclude = [
"build",
"dist",
"venv",
"docs"
"docs",
]

[tool.ruff.lint]
extend-select = [
"B"
]
ignore = ["B905"] # zip-without-explicit-strict
extend-select = ["B"]
ignore = ["B905"] # zip-without-explicit-strict

[tool.black]
line-length = 100
Expand Down Expand Up @@ -136,19 +123,17 @@ doctest_optionflags = [
"ELLIPSIS",
"IGNORE_EXCEPTION_DETAIL",
]
addopts = [
"--durations=10",
]
addopts = ["--durations=10"]
filterwarnings = [
"error:::zarr.*",
"ignore:PY_SSIZE_T_CLEAN will be required.*:DeprecationWarning",
"ignore:The loop argument is deprecated since Python 3.8.*:DeprecationWarning",
"ignore:The .* is deprecated and will be removed in a Zarr-Python version 3*:FutureWarning",
"ignore:The experimental Zarr V3 implementation in this version .*:FutureWarning",
]
doctest_subpackage_requires =[
doctest_subpackage_requires = [
"zarr/core.py = numpy>=2",
"zarr/creation.py = numpy>=2"
"zarr/creation.py = numpy>=2",
]


Expand Down
2 changes: 1 addition & 1 deletion requirements_dev_minimal.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# library requirements
asciitree==0.3.3
fasteners==0.19
numcodecs==0.13.0
numcodecs==0.13.1
msgpack-python==0.5.6
setuptools-scm==8.1.0
# test requirements
Expand Down
2 changes: 1 addition & 1 deletion requirements_dev_numpy.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Break this out into a separate file to allow testing against
# different versions of numpy. This file should pin to the latest
# numpy version.
numpy==2.1.1
numpy==2.1.2
6 changes: 3 additions & 3 deletions requirements_dev_optional.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ ipywidgets==8.1.5
# don't let pyup change pinning for azure-storage-blob, need to pin to older
# version to get compatibility with azure storage emulator on appveyor (FIXME)
azure-storage-blob==12.21.0 # pyup: ignore
redis==5.0.8
redis==5.1.1
types-redis
types-setuptools
pymongo==4.8.0
pymongo==4.10.1
# optional test requirements
coverage
pytest-cov==5.0.0
pytest-doctestplus==1.2.1
pytest-timeout==2.3.1
h5py==3.11.0
h5py==3.12.1
fsspec==2023.12.2
s3fs==2023.12.2
moto[server]>=5.0.1
3 changes: 2 additions & 1 deletion zarr/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,6 @@ class NestedDirectoryStore(DirectoryStore):
def __init__(
self, path, normalize_keys=False, dimension_separator: Optional[DIMENSION_SEPARATOR] = "/"
):

warnings.warn(
V3_DEPRECATION_MESSAGE.format(store=self.__class__.__name__),
FutureWarning,
Expand Down Expand Up @@ -2073,6 +2072,8 @@ class DBMStore(Store):
<https://www.jcea.es/programacion/pybsddb.htm>`_ package is installed, a
Berkeley DB database can be used::
.. doctest-requires:: bsddb3
>>> import bsddb3
>>> store = zarr.DBMStore('data/array.bdb', open=bsddb3.btopen)
>>> z = zarr.zeros((10, 10), chunks=(5, 5), store=store, overwrite=True)
Expand Down

0 comments on commit cadae2e

Please sign in to comment.