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

Test on Python 3.12 #1263

Merged
merged 2 commits into from
Oct 11, 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
8 changes: 4 additions & 4 deletions .github/workflows/build-numpy-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
Expand All @@ -22,11 +22,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
pip install -r requirements-numpy2.txt -r requirements-numpy2-dev.txt
# update bio2zarr for NumPy 2, see https://github.com/sgkit-dev/bio2zarr/issues/256
pip install -U 'numpy<2.1' -U git+https://github.com/sgkit-dev/bio2zarr.git
- name: Run pre-commit
uses: pre-commit/[email protected]
# - name: Run pre-commit
# uses: pre-commit/[email protected]
- name: Test with pytest (numba jit disabled)
env:
NUMBA_DISABLE_JIT: 1
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
- id: black
language_version: python3
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
language_version: python3
23 changes: 23 additions & 0 deletions requirements-numpy2-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
callee
pre-commit
pytest
pytest-cov
pytest-datadir
pytest-mock
hypothesis
scikit-allel
statsmodels
msprime>=1.0
scikit-learn
partd
bed-reader
rechunker
cbgen > 1.0.5; platform_system != "Windows"
cbgen == 1.0.1; platform_system == "Windows"
yarl
matplotlib
asv
networkx
aiohttp
requests
graphviz
12 changes: 12 additions & 0 deletions requirements-numpy2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
numpy < 2.1
xarray
dask[array] >= 2023.01.0, <= 2024.8.0
distributed >= 2023.01.0, <= 2024.8.0
dask-ml
scipy
typing-extensions
numba
zarr >= 2.10.0, != 2.11.0, != 2.11.1, != 2.11.2, < 3
fsspec != 2021.6.*
scikit-learn
pandas
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Scientific/Engineering

[options]
Expand Down
6 changes: 3 additions & 3 deletions sgkit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pkg_resources import DistributionNotFound, get_distribution # type: ignore[import]
from importlib.metadata import PackageNotFoundError, version # type: ignore[import]

from .display import display_genotypes, display_pedigree
from .distance.api import pairwise_distance
Expand Down Expand Up @@ -68,8 +68,8 @@
)

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound: # pragma: no cover
__version__ = version(__name__)
except PackageNotFoundError: # pragma: no cover
__version__ = "unknown"

__all__ = [
Expand Down
2 changes: 1 addition & 1 deletion sgkit/tests/test_stats_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def sample_dataset(draw):
# Split first dimension assignment into two groups and assign second
# dimension with unique names since n cols will differ
dims = [
(f"dim-0-{i%2}",) if i < n_1d else (f"dim-0-{i%2}", f"dim-1-{i}")
(f"dim-0-{i % 2}",) if i < n_1d else (f"dim-0-{i % 2}", f"dim-1-{i}")
for i in range(n_arrs)
]

Expand Down
4 changes: 2 additions & 2 deletions validation/gwas/method/regenie/hail_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def get_plink_sim_dataset(n_variants=16, n_samples=4, n_contigs=2, seed=0):
for s in range(n_samples):
data.append(
{
"v": f"{c+1}:{v+1}:A:C",
"s": f"S{s+1:07d}",
"v": f"{c + 1}:{v + 1}:A:C",
"s": f"S{s + 1:07d}",
"cm": 0.1,
"GT": hl.Call([rs.randint(0, 2), rs.randint(0, 2)]),
}
Expand Down
Loading