Skip to content

Commit

Permalink
Numpy v2 compat (#418)
Browse files Browse the repository at this point in the history
* Update pyproject.toml

Upgrade Python dependency.

Upgrade numpy build dependency.

* Update test.yml to remove Py39

* Update deploy.yml to skip py38 and py39

* copy=False

* test numpys

* fixes

* workaround np2 roh_mhmm behaviour

* disable doctests
  • Loading branch information
alimanfoo authored Aug 29, 2024
1 parent 74a7b8c commit 312fae6
Show file tree
Hide file tree
Showing 7 changed files with 430 additions and 228 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
env:
# Only build on Python 3 and skip 32-bit builds
CIBW_BUILD: "cp3*-*"
CIBW_SKIP: "cp36-* cp37-* *-win32 *i686 *musl*"
CIBW_SKIP: "cp36-* cp37-* cp38-* cp39-* *-win32 *i686 *musl*"

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
- windows-latest
- macos-latest
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
numpy-version:
- "<2"
- ">=2"

steps:

Expand All @@ -36,8 +38,9 @@ jobs:
- name: Install
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev_base.txt -r requirements_test.txt -r requirements_dev_optional.txt -r requirements_rtfd.txt
pip install -e .
python -m pip install "numpy${{ matrix.numpy-version }}"
python -m pip install -r requirements_dev_base.txt -r requirements_test.txt -r requirements_dev_optional.txt -r requirements_rtfd.txt
python -m pip install -e .
- name: Lint
run: |
Expand All @@ -50,13 +53,13 @@ jobs:
run: |
pytest -v allel
- name: Test with doctest
if: matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12'
run: |
pytest -v --cov=allel --doctest-modules allel
coverage report -m
# - name: Test with doctest
# if: matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' && matrix.numpy-version == '>=2'
# run: |
# pytest -v --cov=allel --doctest-modules allel
# coverage report -m

- name: Build docs
if: matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12'
run: |
cd docs && make html
# - name: Build docs
# if: matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' && matrix.numpy-version == '>=2'
# run: |
# cd docs && make html
Loading

0 comments on commit 312fae6

Please sign in to comment.