Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
sudo apt update -y
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.11"]

steps:
- uses: actions/checkout@v4
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/build-numpy-1.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.11"]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10", "3.11"]
python-version: ["3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
# checkout repo to subdirectory to get access to scripts
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
needs: ['build']
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.11"]
steps:
# checkout repo to subdirectory to get access to scripts
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.11"]

steps:
- uses: actions/checkout@v4
Expand All @@ -30,8 +30,8 @@ jobs:
shell: bash -l {0}
# conda can't install all dev tools, so we need to split it between conda and pip
run: |
conda install --file requirements.txt msprime
pip install -r requirements-dev.txt
conda install msprime
pip install -r requirements.txt -r requirements-dev.txt
- name: Test with pytest
# activate conda
shell: bash -l {0}
Expand Down
8 changes: 4 additions & 4 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ queue_rules:
- name: default
conditions:
- base=main
- status-success=build (3.10)
- status-success=build (3.11)
- status-success=win_build (3.10)
- status-success=build (3.12)
- status-success=win_build (3.11)
- approved-reviews-by=@sgkit-dev/committers
- "#approved-reviews-by>=1"
- label=auto-merge
Expand All @@ -13,9 +13,9 @@ pull_request_rules:
- name: automatic merge
conditions:
- base=main
- status-success=build (3.10)
- status-success=build (3.11)
- status-success=win_build (3.10)
- status-success=build (3.12)
- status-success=win_build (3.11)
- approved-reviews-by=@sgkit-dev/committers
- "#approved-reviews-by>=1"
- label=auto-merge
Expand Down
9 changes: 8 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,19 @@
*[p.stem for p in (HERE / "extensions").glob("*.py")],
]

# Prefer PEP 604 union syntax (X | Y) to avoid unresolved typing.Union references.
always_use_bars_union = True

# Enable math notation in mystnb
myst_enable_extensions = [
"amsmath",
"dollarmath",
]

# Temporary disable notebook execution during docs build (see issue #1332):
# https://github.com/sgkit-dev/sgkit/issues/1332
nb_execution_mode = "off"

extlinks = {
"issue": ("https://github.com/sgkit-dev/sgkit/issues/%s", "GH %s"),
"pr": ("https://github.com/sgkit-dev/sgkit/pull/%s", "PR %s"),
Expand Down Expand Up @@ -123,7 +130,7 @@ def filter(self, record: pylogging.LogRecord) -> bool:

intersphinx_mapping = dict(
dask=("https://docs.dask.org/en/stable/", None),
xarray=("https://xarray.pydata.org/en/stable/", None),
xarray=("https://docs.xarray.dev/en/stable/", None),
zarr=("https://zarr.readthedocs.io/en/stable", None),
numpy=("https://numpy.org/doc/stable/", None),
python=("https://docs.python.org/3", None),
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Getting Started
Installation
------------

You can install sgkit with pip. Python 3.10, 3.11, or 3.12 is required::
You can install sgkit with pip. Python 3.11 or 3.12 is required::

$ pip install sgkit

Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ classifiers = [
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
]
urls = { Homepage = "https://github.com/sgkit-dev/sgkit" }
requires-python = ">=3.10"
requires-python = ">=3.11"
dependencies = [
"numpy < 2.2",
"numpy >= 2.3.5; sys_platform == \"darwin\"", # Apple ARM chip error
"numpy >= 2.0; sys_platform != \"darwin\"",
"xarray < 2025.03.1",
"dask[array,dataframe] >= 2022.01.0, <= 2024.8.0",
"scipy < 1.16",
"zarr >= 2.10.0, != 2.11.0, != 2.11.1, != 2.11.2, < 3",
"numba",
"fsspec != 2021.6.*",
"scikit-learn",
"pandas",
"pandas < 3.0",
"setuptools >= 41.2", # For pkg_resources
]
dynamic = ["version"]
Expand Down Expand Up @@ -69,7 +69,7 @@ fail_under = 100

[tool.pytest.ini_options]
addopts = "--doctest-modules --ignore=validation --cov-fail-under=100"
norecursedirs = [".eggs", "build", "docs"]
norecursedirs = [".eggs", "build", "docs", ".hypothesis"]
filterwarnings = ["error", "ignore::DeprecationWarning"]


Expand Down
4 changes: 2 additions & 2 deletions requirements-doc.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
myst_nb
pydata-sphinx-theme
sphinx==6.2.1
sphinx_autodoc_typehints>=1.14.0
sphinx < 9.0.0
sphinx_autodoc_typehints
sphinx-copybutton
scanpydoc
ipython
Expand Down
23 changes: 0 additions & 23 deletions requirements-numpy1-dev.txt

This file was deleted.

9 changes: 0 additions & 9 deletions requirements-numpy1.txt

This file was deleted.

5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
numpy < 2.2
numpy >= 2.3.5; sys_platform == "darwin"
numpy >= 2.0; sys_platform != "darwin"
xarray < 2025.03.1
dask[array,dataframe] >= 2023.01.0, <= 2024.8.0
scipy < 1.16
numba
zarr >= 2.10.0, != 2.11.0, != 2.11.1, != 2.11.2, < 3
fsspec != 2021.6.*
scikit-learn
pandas
pandas < 3.0
2 changes: 1 addition & 1 deletion sgkit/tests/io/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_save_unequal_chunks_error():
# Normal zarr errors shouldn't be caught
with pytest.raises(
(FileExistsError, ValueError),
match="(path '' contains an array|is not empty)",
match="(path '' contains an array|is not empty|contains data)",
):
save_dataset(ds, {".zarray": ""})

Expand Down
6 changes: 5 additions & 1 deletion sgkit/tests/test_association.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ def run(traits: Sequence[str]) -> Dataset:

traits = [f"trait_{i}" for i in range(ds.attrs["n_trait"])]
# Run regressions on individual traits and concatenate resulting statistics
dfr_single = xr.concat([run([t]) for t in traits], dim="traits").to_dataframe()
dfr_single = xr.concat(
[run([t]) for t in traits],
dim="traits",
data_vars="all",
).to_dataframe()
# Run regressions on all traits simulatenously
dfr_multi: DataFrame = run(traits).to_dataframe()
pd.testing.assert_frame_equal(dfr_single, dfr_multi)
Expand Down
3 changes: 3 additions & 0 deletions sgkit/tests/test_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ def test_distance_ndarray() -> None:
pytest.param("correlation", correlation, "i8", "gpu", marks=pytest.mark.gpu),
],
)
@pytest.mark.filterwarnings(
"ignore:invalid value encountered in correlation_reduce_cpu:RuntimeWarning"
)
def test_missing_values(
metric: MetricTypes,
metric_func: typing.Callable[[ArrayLike, ArrayLike], np.float64],
Expand Down
3 changes: 3 additions & 0 deletions sgkit/tests/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
@pytest.mark.filterwarnings(
"ignore::UserWarning"
) # codec `vlen-utf8` not in Zarr v3 spec`
@pytest.mark.filterwarnings(
"ignore:The data type .* does not have a Zarr V3 specification.*"
)
def test_simulate_genotype_call_dataset__zarr(tmp_path):
path = str(tmp_path / "ds.zarr")
ds = simulate_genotype_call_dataset(n_variant=10, n_sample=10)
Expand Down
Loading