File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 11
11
name : Lint
12
12
uses : tskit-dev/.github/.github/workflows/lint.yml@v2
13
13
14
+ zarr-v3-compatibility :
15
+ name : Test zarr v3 error
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - name : Checkout
19
+
20
+ with :
21
+ submodules : true
22
+
23
+ - name : Install uv and set the python version
24
+ uses : astral-sh/setup-uv@v6
25
+ with :
26
+ python-version : " 3.12"
27
+ version : " 0.8.15"
28
+
29
+ - name : Setup venv
30
+ run : |
31
+ uv venv
32
+
33
+ - name : Install zarr v3 and tsinfer
34
+ run : |
35
+ uv pip install -e .
36
+ uv pip install --upgrade zarr
37
+
38
+ - name : Test zarr v3 error
39
+ run : |
40
+ uv run --no-sync python -c "import tsinfer" 2>&1 | grep -q "zarr version.*is not supported"
41
+
14
42
test :
15
43
name : Python
16
44
runs-on : ${{ matrix.os }}
Original file line number Diff line number Diff line change 34
34
if sys .version_info [0 ] < 3 :
35
35
raise Exception ("Python 3 only" )
36
36
37
+ try :
38
+ import zarr
39
+
40
+ if zarr .__version__ >= "3" :
41
+ raise RuntimeError (
42
+ f"zarr version { zarr .__version__ } is not supported. "
43
+ "tsinfer requires zarr < 3.0. Please install zarr < 3.0."
44
+ )
45
+ except ImportError :
46
+ pass
47
+
37
48
__version__ = "undefined"
38
49
try :
39
50
from . import _version
You can’t perform that action at this time.
0 commit comments