forked from zarr-developers/zarr-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v3' of https://github.com/zarr-developers/zarr-python i…
…nto elevate_codec_pipeline
- Loading branch information
Showing
58 changed files
with
6,419 additions
and
690 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Monthly issue metrics | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '3 2 1 * *' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: issue metrics | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: read | ||
steps: | ||
- name: Get dates for last month | ||
shell: bash | ||
run: | | ||
# Calculate the first day of the previous month | ||
first_day=$(date -d "last month" +%Y-%m-01) | ||
# Calculate the last day of the previous month | ||
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) | ||
#Set an environment variable with the date range | ||
echo "$first_day..$last_day" | ||
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" | ||
- name: Run issue-metrics tool | ||
uses: github/issue-metrics@v3 | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SEARCH_QUERY: 'repo:zarr-developers/zarr-python is:issue created:${{ env.last_month }} -reason:"not planned"' | ||
|
||
- name: Create issue | ||
uses: peter-evans/create-issue-from-file@v5 | ||
with: | ||
title: Monthly issue metrics report | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
content-filepath: ./issue_metrics.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-20.04 | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.10" | ||
commands: | ||
- pip install hatch | ||
- hatch run docs:rtd | ||
|
||
sphinx: | ||
configuration: docs/conf.py | ||
fail_on_warning: true | ||
|
||
formats: all | ||
|
||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,68 @@ | ||
from __future__ import annotations | ||
|
||
import zarr.codecs # noqa: F401 | ||
from zarr._version import version as __version__ | ||
from zarr.api.synchronous import ( | ||
array, | ||
consolidate_metadata, | ||
copy, | ||
copy_all, | ||
copy_store, | ||
create, | ||
empty, | ||
empty_like, | ||
full, | ||
full_like, | ||
group, | ||
load, | ||
ones, | ||
ones_like, | ||
open, | ||
open_array, | ||
open_consolidated, | ||
open_group, | ||
open_like, | ||
save, | ||
save_array, | ||
save_group, | ||
tree, | ||
zeros, | ||
zeros_like, | ||
) | ||
from zarr.array import Array, AsyncArray | ||
from zarr.config import config # noqa: F401 | ||
from zarr.config import config | ||
from zarr.group import AsyncGroup, Group | ||
from zarr.store import ( | ||
StoreLike, | ||
make_store_path, | ||
) | ||
from zarr.sync import sync as _sync | ||
|
||
# in case setuptools scm screw up and find version to be 0.0.0 | ||
assert not __version__.startswith("0.0.0") | ||
|
||
|
||
async def open_auto_async(store: StoreLike) -> AsyncArray | AsyncGroup: | ||
store_path = make_store_path(store) | ||
try: | ||
return await AsyncArray.open(store_path) | ||
except KeyError: | ||
return await AsyncGroup.open(store_path) | ||
|
||
|
||
def open_auto(store: StoreLike) -> Array | Group: | ||
object = _sync( | ||
open_auto_async(store), | ||
) | ||
if isinstance(object, AsyncArray): | ||
return Array(object) | ||
if isinstance(object, AsyncGroup): | ||
return Group(object) | ||
raise TypeError(f"Unexpected object type. Got {type(object)}.") | ||
__all__ = [ | ||
"__version__", | ||
"config", | ||
"Array", | ||
"AsyncArray", | ||
"Group", | ||
"AsyncGroup", | ||
"tree", | ||
"array", | ||
"consolidate_metadata", | ||
"copy", | ||
"copy_all", | ||
"copy_store", | ||
"create", | ||
"empty", | ||
"empty_like", | ||
"full", | ||
"full_like", | ||
"group", | ||
"load", | ||
"ones", | ||
"ones_like", | ||
"open", | ||
"open_array", | ||
"open_consolidated", | ||
"open_group", | ||
"open_like", | ||
"save", | ||
"save_array", | ||
"save_group", | ||
"zeros", | ||
"zeros_like", | ||
] |
Oops, something went wrong.