Skip to content

Commit 46989fd

Browse files
authored
Merge branch 'main' into f-strings
2 parents a87025f + 720bea6 commit 46989fd

31 files changed

+710
-101
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ body:
2727
attributes:
2828
label: Python Version
2929
description: Version of Python interpreter
30-
placeholder: 3.8.5, 3.9, 3.10, etc.
30+
placeholder: 3.9, 3.10, 3.11, etc.
3131
validations:
3232
required: true
3333
- type: input

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
45+
uses: github/codeql-action/init@v3
4646
with:
4747
languages: ${{ matrix.language }}
4848
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
5656
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5757
# If this step fails, then you should remove it and run the build manually (see below)
5858
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v2
59+
uses: github/codeql-action/autobuild@v3
6060

6161
# ℹ️ Command-line programs to run using the OS shell.
6262
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -69,4 +69,4 @@ jobs:
6969
# ./location_of_script_within_repo/buildscript.sh
7070

7171
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v2
72+
uses: github/codeql-action/analyze@v3

.github/workflows/python-package.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: ['3.8', '3.9', '3.10', '3.11']
19-
numpy_version: ['>=1.22.0', '==1.20.*']
18+
python-version: ['3.9', '3.10', '3.11']
19+
numpy_version: ['>=1.22.0', '==1.21.*']
2020
exclude:
2121
- python-version: '3.10'
22-
numpy_version: '==1.20.*'
22+
numpy_version: '==1.21.*'
2323
- python-version: '3.11'
24-
numpy_version: '==1.20.*'
24+
numpy_version: '==1.21.*'
2525
services:
2626
redis:
2727
image: redis

.github/workflows/releases.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
submodules: true
1717
fetch-depth: 0
1818

19-
- uses: actions/setup-python@v4.7.1
19+
- uses: actions/setup-python@v5.0.0
2020
name: Install Python
2121
with:
22-
python-version: '3.8'
22+
python-version: '3.9'
2323

2424
- name: Install PyBuild
2525
run: |
@@ -36,7 +36,7 @@ jobs:
3636
else
3737
echo "All seem good"
3838
fi
39-
- uses: actions/upload-artifact@v3
39+
- uses: actions/upload-artifact@v4
4040
with:
4141
name: releases
4242
path: dist
@@ -45,7 +45,7 @@ jobs:
4545
needs: [build_artifacts]
4646
runs-on: ubuntu-latest
4747
steps:
48-
- uses: actions/download-artifact@v3
48+
- uses: actions/download-artifact@v4
4949
with:
5050
name: releases
5151
path: dist
@@ -60,7 +60,7 @@ jobs:
6060
runs-on: ubuntu-latest
6161
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
6262
steps:
63-
- uses: actions/download-artifact@v3
63+
- uses: actions/download-artifact@v4
6464
with:
6565
name: releases
6666
path: dist

.github/workflows/windows-testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: True
1818
matrix:
19-
python-version: ['3.8', '3.9', '3.10', '3.11']
19+
python-version: ['3.10', '3.11']
2020
steps:
2121
- uses: actions/checkout@v4
2222
with:

.pre-commit-config.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,25 @@ default_stages: [commit, push]
66
default_language_version:
77
python: python3
88
repos:
9-
- repo: https://github.com/charliermarsh/ruff-pre-commit
9+
- repo: https://github.com/astral-sh/ruff-pre-commit
1010
# Ruff version.
11-
rev: 'v0.0.224'
11+
rev: 'v0.2.1'
1212
hooks:
1313
- id: ruff
14-
# Respect `exclude` and `extend-exclude` settings.
15-
args: ["--force-exclude"]
1614
- repo: https://github.com/psf/black
17-
rev: 23.10.1
15+
rev: 24.2.0
1816
hooks:
1917
- id: black
2018
- repo: https://github.com/codespell-project/codespell
21-
rev: v2.2.5
19+
rev: v2.2.6
2220
hooks:
2321
- id: codespell
24-
args: ["-L", "ba,ihs,kake,nd,noe,nwo,te,fo,zar", "-S", "fixture"]
2522
- repo: https://github.com/pre-commit/pre-commit-hooks
26-
rev: v4.4.0
23+
rev: v4.5.0
2724
hooks:
2825
- id: check-yaml
2926
- repo: https://github.com/pre-commit/mirrors-mypy
30-
rev: v1.3.0
27+
rev: v1.8.0
3128
hooks:
3229
- id: mypy
3330
files: zarr

TEAM.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Active core-developers
2+
- @joshmoore (Josh Moore)
3+
- @jni (Juan Nunez-Iglesias)
4+
- @rabernat (Ryan Abernathey)
5+
- @jhamman (Joe Hamman)
6+
- @d-v-b (Davis Bennett)
7+
- @jakirkham (jakirkham)
8+
- @martindurant (Martin Durant)
9+
- @normanrz (Norman Rzepka)
10+
11+
## Emeritus core-developers
12+
- @alimanfoo (Alistair Miles)
13+
- @shoyer (Stephan Hoyer)
14+
- @ryan-williams (Ryan Williams)
15+
- @jrbourbeau (James Bourbeau)
16+
- @mzjp2 (Zain Patel)
17+
- @grlee77 (Gregory Lee)
18+
19+
## Former core-developers
20+
- @jeromekelleher (Jerome Kelleher)
21+
- @tjcrone (Tim Crone)
22+
- @funkey (Jan Funke)
23+
- @shikharsg
24+
- @Carreau (Matthias Bussonnier)
25+
- @dazzag24
26+
- @WardF (Ward Fisher)

docs/release.rst

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@ Release notes
1818
Unreleased
1919
----------
2020

21+
* Change occurrences of % and format() to f-strings.
22+
By :user:`Dimitri Papadopoulos Orfanos <DimitriPapadopoulos>` :issue:`1423`.
23+
24+
.. _release_2.17.0:
25+
26+
2.17.0
27+
------
28+
29+
Enhancements
30+
~~~~~~~~~~~~
31+
32+
* Added type hints to ``zarr.creation.create()``.
33+
By :user:`David Stansby <dstansby>` :issue:`1536`.
34+
35+
* Pyodide support: Don't require fasteners on Emscripten.
36+
By :user:`Hood Chatham <hoodmane>` :issue:`1663`.
37+
2138
Docs
2239
~~~~
2340

@@ -39,10 +56,27 @@ Docs
3956
* Minor tweak to advanced indexing tutorial examples.
4057
By :user:`Ross Barnowski <rossbar>` :issue:`1550`.
4158

59+
* Automatically document array members using sphinx-automodapi.
60+
By :user:`David Stansby <dstansby>` :issue:`1547`.
61+
62+
* Add a markdown file documenting the current and former core-developer team.
63+
By :user:`Joe Hamman <jhamman>` :issue:`1628`.
64+
65+
* Add Norman Rzepka to core-dev team.
66+
By :user:`Joe Hamman <jhamman>` :issue:`1630`.
67+
68+
* Added section about accessing zip files that are on s3.
69+
By :user:`Jeff Peck <jeffpeck10x>` :issue:`1613`.
70+
71+
* Add V3 roadmap and design document.
72+
By :user:`Joe Hamman <jhamman>` :issue:`1583`.
4273

4374
Maintenance
4475
~~~~~~~~~~~
4576

77+
* Drop Python 3.8 and NumPy 1.20
78+
By :user:`Josh Moore <joshmoore>`; :issue:`1557`.
79+
4680
* Cache result of ``FSStore._fsspec_installed()``.
4781
By :user:`Janick Martinez Esturo <ph03>` :issue:`1581`.
4882

@@ -64,8 +98,26 @@ Maintenance
6498
* Remove ``sphinx-rtd-theme`` dependency from ``pyproject.toml``.
6599
By :user:`Sanket Verma <MSanKeys963>` :issue:`1563`.
66100

67-
* Change occurrences of % and format() to f-strings.
68-
By :user:`Dimitri Papadopoulos Orfanos <DimitriPapadopoulos>` :issue:`1423`.
101+
* Remove ``CODE_OF_CONDUCT.md`` file from the Zarr-Python repository.
102+
By :user:`Sanket Verma <MSanKeys963>` :issue:`1572`.
103+
104+
* Bump version of black in pre-commit.
105+
By :user:`David Stansby <dtstansby>` :issue:`1559`.
106+
107+
* Use list comprehension where applicable.
108+
By :user:`Dimitri Papadopoulos Orfanos <DimitriPapadopoulos>` :issue:`1555`.
109+
110+
* Use format specification mini-language to format string.
111+
By :user:`Dimitri Papadopoulos Orfanos <DimitriPapadopoulos>` :issue:`1558`.
112+
113+
* Single startswith() call instead of multiple ones.
114+
By :user:`Dimitri Papadopoulos Orfanos <DimitriPapadopoulos>` :issue:`1556`.
115+
116+
* Move codespell options around.
117+
By :user:`Dimitri Papadopoulos Orfanos <DimitriPapadopoulos>` :issue:`1196`.
118+
119+
* Remove unused mypy ignore comments.
120+
By :user:`David Stansby <dtstansby>` :issue:`1602`.
69121

70122
.. _release_2.16.1:
71123

docs/tutorial.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,31 @@ separately from Zarr.
10001000

10011001
.. _tutorial_copy:
10021002

1003+
Accessing Zip Files on S3
1004+
~~~~~~~~~~~~~~~~~~~~~~~~~
1005+
1006+
The built-in `ZipStore` will only work with paths on the local file-system, however
1007+
it is also possible to access ``.zarr.zip`` data on the cloud. Here is an example of
1008+
accessing a zipped Zarr file on s3:
1009+
1010+
>>> s3_path = "s3://path/to/my.zarr.zip"
1011+
>>>
1012+
>>> s3 = s3fs.S3FileSystem()
1013+
>>> f = s3.open(s3_path)
1014+
>>> fs = ZipFileSystem(f, mode="r")
1015+
>>> store = FSMap("", fs, check=False)
1016+
>>>
1017+
>>> # cache is optional, but may be a good idea depending on the situation
1018+
>>> cache = zarr.storage.LRUStoreCache(store, max_size=2**28)
1019+
>>> z = zarr.group(store=cache)
1020+
1021+
This store can also be generated with ``fsspec``'s handler chaining, like so:
1022+
1023+
>>> store = zarr.storage.FSStore(url=f"zip::{s3_path}", mode="r")
1024+
1025+
This can be especially useful if you have a very large ``.zarr.zip`` file on s3
1026+
and only need to access a small portion of it.
1027+
10031028
Consolidating metadata
10041029
~~~~~~~~~~~~~~~~~~~~~~
10051030

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
dependencies:
55
- wheel
66
- numcodecs >= 0.6.4
7-
- numpy >= 1.20
7+
- numpy >= 1.21
88
- pip
99
- pip:
1010
- asciitree

pyproject.toml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ readme = { file = "README.md", content-type = "text/markdown" }
1010
maintainers = [
1111
{ name = "Alistair Miles", email = "[email protected]" }
1212
]
13-
requires-python = ">=3.8"
13+
requires-python = ">=3.9"
1414
dependencies = [
1515
'asciitree',
16-
'numpy>=1.20,!=1.21.0',
17-
'fasteners',
16+
'numpy>=1.21.1',
17+
'fasteners; sys_platform != "emscripten"',
1818
'numcodecs>=0.10.0',
1919
]
2020
dynamic = [
@@ -30,7 +30,6 @@ classifiers = [
3030
'Topic :: Software Development :: Libraries :: Python Modules',
3131
'Operating System :: Unix',
3232
'Programming Language :: Python :: 3',
33-
'Programming Language :: Python :: 3.8',
3433
'Programming Language :: Python :: 3.9',
3534
'Programming Language :: Python :: 3.10',
3635
'Programming Language :: Python :: 3.11',
@@ -65,6 +64,7 @@ Homepage = "https://github.com/zarr-developers/zarr-python"
6564
exclude_lines = [
6665
"pragma: no cover",
6766
"pragma: ${PY_MAJOR_VERSION} no cover",
67+
'.*\.\.\.' # Ignore "..." lines
6868
]
6969

7070
[tool.coverage.run]
@@ -119,9 +119,10 @@ exclude = '''
119119
'''
120120

121121
[tool.mypy]
122-
python_version = "3.8"
123122
ignore_missing_imports = true
124-
follow_imports = "silent"
123+
warn_unused_configs = true
124+
warn_redundant_casts = true
125+
warn_unused_ignores = true
125126

126127
[tool.pytest.ini_options]
127128
doctest_optionflags = [
@@ -137,3 +138,8 @@ filterwarnings = [
137138
"ignore:PY_SSIZE_T_CLEAN will be required.*:DeprecationWarning",
138139
"ignore:The loop argument is deprecated since Python 3.8.*:DeprecationWarning",
139140
]
141+
142+
143+
[tool.codespell]
144+
ignore-words-list = "ba,ihs,kake,nd,noe,nwo,te,fo,zar"
145+
skip = 'fixture,.git'

requirements_dev_minimal.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ numcodecs==0.12.1
55
msgpack-python==0.5.6
66
setuptools-scm==8.0.4
77
# test requirements
8-
pytest==7.4.3
8+
pytest==7.4.4

requirements_dev_numpy.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Break this out into a separate file to allow testing against
22
# different versions of numpy. This file should pin to the latest
33
# numpy version.
4-
numpy==1.24.3
4+
numpy==1.26.1

requirements_dev_optional.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
lmdb==1.4.1; sys_platform != 'win32'
44
# optional library requirements for Jupyter
55
ipytree==0.2.2
6-
ipywidgets==8.1.0
6+
ipywidgets==8.1.1
77
# optional library requirements for services
88
# don't let pyup change pinning for azure-storage-blob, need to pin to older
99
# version to get compatibility with azure storage emulator on appveyor (FIXME)
@@ -15,9 +15,9 @@ pymongo==4.6.1
1515
# optional test requirements
1616
coverage
1717
pytest-cov==4.1.0
18-
pytest-doctestplus==1.0.0
18+
pytest-doctestplus==1.1.0
1919
pytest-timeout==2.2.0
2020
h5py==3.10.0
21-
fsspec==2023.10.0
22-
s3fs==2023.10.0
23-
moto[server]>=4.0.8
21+
fsspec==2023.12.2
22+
s3fs==2023.12.2
23+
moto[server]>=5.0.1

0 commit comments

Comments
 (0)