File tree Expand file tree Collapse file tree 2 files changed +17
-18
lines changed Expand file tree Collapse file tree 2 files changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -71,16 +71,19 @@ jobs:
71
71
with :
72
72
# See https://github.com/zarr-developers/numcodecs/pull/529
73
73
repository : agriyakhetarpal/numcodecs
74
- ref : setup-emscripten-ci
74
+ # ref: setup-emscripten-ci
75
75
path : numcodecs-wasm
76
76
submodules : recursive
77
77
fetch-depth : 0
78
78
fetch-tags : true
79
79
80
80
# For some reason fetch-depth: 0 and fetch-tags: true aren't working...
81
- - name : Manually fetch tags for numcodecs
82
- working-directory : numcodecs-wasm
83
- run : git fetch --tags
81
+ - name : Manually switch branch for numcodecs
82
+ run : |
83
+ cd numcodecs-wasm
84
+ git checkout setup-emscripten-ci
85
+ git fetch --unshallow || git fetch --all
86
+ git fetch --tags
84
87
85
88
- name : Build numcodecs for WASM
86
89
run : pyodide build
@@ -100,13 +103,7 @@ jobs:
100
103
# Install numcodecs
101
104
pip install $(ls numcodecs-wasm/dist/*.whl)"[crc32c]"
102
105
103
- # Install Zarr without dependencies until we can figure out the
104
- # numcodecs wheel versioning issue
105
- pip install dist/*.whl --no-deps
106
- pip install "packaging>=22.0" "numpy>=1.25" "typing_extensions>=4.9" "donfig>=0.8"
107
-
108
- # Install test dependencies
109
- pip install "coverage" "pytest" "pytest-asyncio" "pytest-cov" "pytest-accept" "rich" "mypy" "hypothesis"
106
+ # Install Zarr and test dependencies
107
+ pip install $(ls dist/*.whl)"[test]"
110
108
111
109
python -m pytest tests -v --cov=zarr --cov-config=pyproject.toml
112
-
Original file line number Diff line number Diff line change 5
5
from functools import cached_property
6
6
from typing import TYPE_CHECKING
7
7
8
+ import numcodecs
8
9
from numcodecs .zstd import Zstd
10
+ from packaging .version import Version
9
11
10
12
from zarr .abc .codec import BytesBytesCodec
11
13
from zarr .core .buffer .cpu import as_numpy_array_wrapper
@@ -42,12 +44,12 @@ class ZstdCodec(BytesBytesCodec):
42
44
43
45
def __init__ (self , * , level : int = 0 , checksum : bool = False ) -> None :
44
46
# numcodecs 0.13.0 introduces the checksum attribute for the zstd codec
45
- # _numcodecs_version = Version(numcodecs.__version__)
46
- # if _numcodecs_version < Version("0.13.0"):
47
- # raise RuntimeError(
48
- # "numcodecs version >= 0.13.0 is required to use the zstd codec. "
49
- # f"Version {_numcodecs_version} is currently installed."
50
- # )
47
+ _numcodecs_version = Version (numcodecs .__version__ )
48
+ if _numcodecs_version < Version ("0.13.0" ):
49
+ raise RuntimeError (
50
+ "numcodecs version >= 0.13.0 is required to use the zstd codec. "
51
+ f"Version { _numcodecs_version } is currently installed."
52
+ )
51
53
52
54
level_parsed = parse_zstd_level (level )
53
55
checksum_parsed = parse_checksum (checksum )
You can’t perform that action at this time.
0 commit comments