Skip to content

Commit 43320dc

Browse files
authored
Merge branch 'main' into fix/shard-iteration-redux
2 parents f2c4fac + ee9c182 commit 43320dc

File tree

8 files changed

+29
-15
lines changed

8 files changed

+29
-15
lines changed

.github/workflows/check_changelogs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
12+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1313

1414
- name: Install uv
15-
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
15+
uses: astral-sh/setup-uv@557e51de59eb14aaaba2ed9621916900a91d50c6 # v6.6.1
1616

1717
- name: Check changelog entries
1818
run: uv run --no-sync python ci/check_changelog_entries.py

.github/workflows/gpu_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
dependency-set: ["minimal"]
3030

3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v5
3333
# - name: cuda-toolkit
3434
# uses: Jimver/cuda-toolkit@v0.2.16
3535
# id: cuda-toolkit
@@ -49,7 +49,7 @@ jobs:
4949
echo $LD_LIBRARY_PATH
5050
nvcc -V
5151
- name: Set up Python
52-
uses: actions/setup-python@v5
52+
uses: actions/setup-python@v6
5353
with:
5454
python-version: ${{ matrix.python-version }}
5555
cache: 'pip'

.github/workflows/hypothesis.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
dependency-set: ["optional"]
2929

3030
steps:
31-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@v5
3232
- name: Set HYPOTHESIS_PROFILE based on trigger
3333
run: |
3434
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
@@ -37,7 +37,7 @@ jobs:
3737
echo "HYPOTHESIS_PROFILE=ci" >> $GITHUB_ENV
3838
fi
3939
- name: Set up Python
40-
uses: actions/setup-python@v5
40+
uses: actions/setup-python@v6
4141
with:
4242
python-version: ${{ matrix.python-version }}
4343
cache: 'pip'

.github/workflows/needs_release_notes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
pull-requests: write
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
14+
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
1515
with:
1616
repo-token: ${{ secrets.GITHUB_TOKEN }}
1717
sync-labels: true

.github/workflows/releases.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
fail-fast: false
1212

1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515
with:
1616
submodules: true
1717
fetch-depth: 0
1818

19-
- uses: actions/setup-python@v5.2.0
19+
- uses: actions/setup-python@v6
2020
name: Install Python
2121
with:
2222
python-version: '3.11'

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ jobs:
4444
runs-on: ${{ matrix.os }}
4545

4646
steps:
47-
- uses: actions/checkout@v4
47+
- uses: actions/checkout@v5
4848
with:
4949
fetch-depth: 0 # grab all branches and tags
5050
- name: Set up Python
51-
uses: actions/setup-python@v5
51+
uses: actions/setup-python@v6
5252
with:
5353
python-version: ${{ matrix.python-version }}
5454
cache: 'pip'
@@ -86,11 +86,11 @@ jobs:
8686
- python-version: "3.11"
8787
dependency-set: upstream
8888
steps:
89-
- uses: actions/checkout@v4
89+
- uses: actions/checkout@v5
9090
with:
9191
fetch-depth: 0
9292
- name: Set up Python
93-
uses: actions/setup-python@v5
93+
uses: actions/setup-python@v6
9494
with:
9595
python-version: ${{ matrix.python-version }}
9696
cache: 'pip'
@@ -115,11 +115,11 @@ jobs:
115115
name: doctests
116116
runs-on: ubuntu-latest
117117
steps:
118-
- uses: actions/checkout@v4
118+
- uses: actions/checkout@v5
119119
with:
120120
fetch-depth: 0 # required for hatch version discovery, which is needed for numcodecs.zarr3
121121
- name: Set up Python
122-
uses: actions/setup-python@v5
122+
uses: actions/setup-python@v6
123123
with:
124124
python-version: '3.13'
125125
cache: 'pip'

changes/3310.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add obstore implementation of delete_dir.

src/zarr/storage/_obstore.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
Store,
1414
SuffixByteRequest,
1515
)
16+
from zarr.core.common import concurrent_map
1617
from zarr.core.config import config
1718

1819
if TYPE_CHECKING:
@@ -195,6 +196,18 @@ async def delete(self, key: str) -> None:
195196
with contextlib.suppress(FileNotFoundError):
196197
await obs.delete_async(self.store, key)
197198

199+
async def delete_dir(self, prefix: str) -> None:
200+
# docstring inherited
201+
import obstore as obs
202+
203+
self._check_writable()
204+
if prefix != "" and not prefix.endswith("/"):
205+
prefix += "/"
206+
207+
metas = await obs.list(self.store, prefix).collect_async()
208+
keys = [(m["path"],) for m in metas]
209+
await concurrent_map(keys, self.delete, limit=config.get("async.concurrency"))
210+
198211
@property
199212
def supports_listing(self) -> bool:
200213
# docstring inherited

0 commit comments

Comments
 (0)