Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpin numpy #283

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,26 @@ jobs:
vcfpartition --help
python -m bio2zarr vcfpartition --help

test-numpy-version:
name: Test numpy versions
runs-on: ubuntu-latest
strategy:
matrix:
numpy: ["==1.26", ">=2"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install '.[dev]'
- name: Install numpy${{ matrix.numpy }}
run: |
python -m pip install 'numpy${{ matrix.numpy }}'
- name: Run tests
run: |
# We just run the CLI tests here because it doesn't require other upstream
# packages like sgkit (which are tangled up with the numpy 2 dependency)
python -m pytest tests/test_cli.py
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 0.1.2 2024-XX-XX

Breaking changes

- ICF metadata format version bumped to ensure long-term compatility between numpy 1.26.x
and numpy >= 2. Existing ICFs will need to be recreated.

# 0.1.1 2024-06-19

Maintenance release:
Expand Down
2 changes: 1 addition & 1 deletion bio2zarr/vcf2zarr/icf.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class VcfPartition:
num_records: int = -1


ICF_METADATA_FORMAT_VERSION = "0.3"
ICF_METADATA_FORMAT_VERSION = "0.4"
ICF_DEFAULT_COMPRESSOR = numcodecs.Blosc(
cname="zstd", clevel=7, shuffle=numcodecs.Blosc.NOSHUFFLE
)
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ authors = [
{name = "sgkit Developers", email = "[email protected]"},
]
dependencies = [
"numpy < 2",
# Pin numpy to >= 1.26 because this enables ICF files to be supported
# across numpy 1 and 2 (due to pickle format)
"numpy >= 1.26",
"zarr >= 2.17,< 3",
"click",
"tabulate",
Expand Down
Loading