Skip to content

Commit 013687f

Browse files
authored
Merge pull request #283 from jeromekelleher/numpy2
Unpin numpy
2 parents d52069b + 4dd205e commit 013687f

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,26 @@ jobs:
109109
vcfpartition --help
110110
python -m bio2zarr vcfpartition --help
111111
112+
test-numpy-version:
113+
name: Test numpy versions
114+
runs-on: ubuntu-latest
115+
strategy:
116+
matrix:
117+
numpy: ["==1.26", ">=2"]
118+
steps:
119+
- uses: actions/checkout@v4
120+
- uses: actions/setup-python@v5
121+
with:
122+
python-version: '3.11'
123+
- name: Install dependencies
124+
run: |
125+
python -m pip install --upgrade pip
126+
python -m pip install '.[dev]'
127+
- name: Install numpy${{ matrix.numpy }}
128+
run: |
129+
python -m pip install 'numpy${{ matrix.numpy }}'
130+
- name: Run tests
131+
run: |
132+
# We just run the CLI tests here because it doesn't require other upstream
133+
# packages like sgkit (which are tangled up with the numpy 2 dependency)
134+
python -m pytest tests/test_cli.py

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 0.1.2 2024-XX-XX
2+
3+
Breaking changes
4+
5+
- ICF metadata format version bumped to ensure long-term compatility between numpy 1.26.x
6+
and numpy >= 2. Existing ICFs will need to be recreated.
7+
18
# 0.1.1 2024-06-19
29

310
Maintenance release:

bio2zarr/vcf2zarr/icf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class VcfPartition:
110110
num_records: int = -1
111111

112112

113-
ICF_METADATA_FORMAT_VERSION = "0.3"
113+
ICF_METADATA_FORMAT_VERSION = "0.4"
114114
ICF_DEFAULT_COMPRESSOR = numcodecs.Blosc(
115115
cname="zstd", clevel=7, shuffle=numcodecs.Blosc.NOSHUFFLE
116116
)

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ authors = [
1111
{name = "sgkit Developers", email = "[email protected]"},
1212
]
1313
dependencies = [
14-
"numpy < 2",
14+
# Pin numpy to >= 1.26 because this enables ICF files to be supported
15+
# across numpy 1 and 2 (due to pickle format)
16+
"numpy >= 1.26",
1517
"zarr >= 2.17,< 3",
1618
"click",
1719
"tabulate",

0 commit comments

Comments
 (0)