Skip to content
Draft
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
60 changes: 0 additions & 60 deletions .github/scripts/upstream_install.py

This file was deleted.

9 changes: 8 additions & 1 deletion .github/workflows/build-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ jobs:
python-version: ${{ matrix.python-version }}
miniconda-version: "latest"

- name: Set up uv
uses: astral-sh/setup-uv@v10.0.1
with:
version: "0.12.10"
enable-cache: true

- name: Conda info
run: |
conda info
Expand All @@ -42,7 +48,8 @@ jobs:
- name: Installing cudatoolkit and dependencies
run: |
conda install -c nvidia cudatoolkit
pip install -r requirements.txt -r requirements-dev.txt
# Avoid building SciPy from source in CI.
uv pip install --only-binary scipy --python "$CONDA_PREFIX/bin/python" -e ".[bgen,plink]" --group test

- name: Numba Information
run: |
Expand Down
28 changes: 19 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,20 @@ jobs:
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v10.0.1
with:
version: "0.12.10"
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
uv sync --locked --all-extras --group test --group lint --no-default-groups --python "${{ matrix.python-version }}"
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
run: uv run --no-sync pre-commit run --all-files
- name: Test with pytest and coverage
run: |
pytest -v --cov=sgkit --cov-report=term-missing
uv run --no-sync pytest -v --cov=sgkit --cov-report=term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7
with:
Expand All @@ -49,14 +54,19 @@ jobs:
- uses: actions/setup-python@v7
with:
python-version: '3.11'
- name: Set up uv
uses: astral-sh/setup-uv@v10.0.1
with:
version: "0.12.10"
python-version: '3.11'
enable-cache: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
uv sync --locked --all-extras --group test --no-default-groups --python 3.11
- name: Install zarr${{ matrix.zarr }}
run: |
python -m pip install --pre 'zarr${{ matrix.zarr }}'
python -m pip uninstall -y bio2zarr # TODO: remove when bio2zarr supports Zarr Python 3
uv pip install --python .venv/bin/python --pre 'zarr${{ matrix.zarr }}'
uv pip uninstall --python .venv/bin/python bio2zarr # TODO: remove when bio2zarr supports Zarr Python 3
- name: Run tests
run: |
pytest
uv run --no-sync pytest
18 changes: 12 additions & 6 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,25 @@ jobs:
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v10.0.1
with:
version: "0.12.10"
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install graphviz # Needed for documentation
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt -r requirements-doc.txt
pip install -U dask distributed # need latest versions to successully build docs
uv sync --locked --all-extras --group docs --group lint --no-default-groups --python "${{ matrix.python-version }}"
# Use newer Dask for task-graph rendering with NumPy 2.
uv pip uninstall --python .venv/bin/python dask-expr
uv pip install --python .venv/bin/python 'dask==2026.8.0'
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
run: uv run --no-sync pre-commit run --all-files
- name: Check for Sphinx doc warnings
run: |
cd docs
make html SPHINXOPTS="-W --keep-going -n"
make -C docs html SPHINXOPTS="-W --keep-going -n"
- uses: actions/upload-artifact@v7
if: failure()
with:
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/cubed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,24 @@ jobs:
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v10.0.1
with:
version: "0.12.10"
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Install deps and sgkit
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt -r requirements-dev.txt
python -m pip install -U git+https://github.com/cubed-dev/cubed.git -U git+https://github.com/cubed-dev/cubed-xarray.git -U git+https://github.com/pydata/xarray.git
uv sync --locked --all-extras --group test --no-default-groups --python "${{ matrix.python-version }}"
# Update the experimental packages without upgrading unrelated dependencies.
uv pip install --python .venv/bin/python \
--upgrade-package cubed --upgrade-package cubed-xarray --upgrade-package xarray \
git+https://github.com/cubed-dev/cubed.git git+https://github.com/cubed-dev/cubed-xarray.git git+https://github.com/pydata/xarray.git

- name: Test with pytest
run: |
pytest -v sgkit/tests/test_{aggregation,association,hwe,pca,window}.py \
uv run --no-sync pytest -v sgkit/tests/test_{aggregation,association,hwe,pca,window}.py \
-k "test_count_call_alleles or \
test_gwas_linear_regression or \
test_hwep or \
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,27 @@ jobs:

steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.11
uses: actions/setup-python@v7
with:
python-version: "3.11"
- name: Set up uv
uses: astral-sh/setup-uv@v10.0.1
with:
version: "0.12.10"
python-version: "3.11"
enable-cache: true
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install graphviz # Needed for documentation
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt -r requirements-doc.txt
pip install -U dask distributed # need latest versions to successully build docs
uv sync --locked --all-extras --group docs --no-default-groups --python "3.11"
# Use newer Dask for task-graph rendering with NumPy 2.
uv pip uninstall --python .venv/bin/python dask-expr
uv pip install --python .venv/bin/python 'dask==2026.8.0'
- name: Build Sphinx documentation
run: |
cd docs
make html SPHINXOPTS="-W --keep-going -n"
make -C docs html SPHINXOPTS="-W --keep-going -n"
- name: Commit documentation changes to gh-pages branch
run: |
git clone https://github.com/sgkit-dev/sgkit.git --branch gh-pages --single-branch gh-pages
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/upstream.yml

This file was deleted.

55 changes: 38 additions & 17 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,25 @@ jobs:

steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v10.0.1
with:
version: "0.12.10"
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools twine wheel build
uv sync --locked --only-group packaging --python "${{ matrix.python-version }}"
- name: Build a source distribution and a wheel
run: |
python -m build --sdist --wheel
python -m twine check --strict dist/*
uv build --no-sources --python "${{ matrix.python-version }}"
uv run --locked --only-group packaging twine check --strict dist/*
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
Expand Down Expand Up @@ -62,15 +69,22 @@ jobs:
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v10.0.1
with:
version: "0.12.10"
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install wheel and test
run: |
python -VV
# Install the local wheel
# Avoid building SciPy from source in CI.
wheel=$(ls artifact/sgkit-*.whl)
pip install ${wheel} ${wheel}[bgen] ${wheel}[plink]
python sgkit-copy/.github/scripts/test_sgkit.py
python sgkit-copy/.github/scripts/test_sgkit_bgen.py
python sgkit-copy/.github/scripts/test_sgkit_plink.py
uv venv --python "${{ matrix.python-version }}"
uv pip install --python .venv/bin/python --only-binary scipy "${wheel}[bgen,plink]"
.venv/bin/python sgkit-copy/.github/scripts/test_sgkit.py
.venv/bin/python sgkit-copy/.github/scripts/test_sgkit_bgen.py
.venv/bin/python sgkit-copy/.github/scripts/test_sgkit_plink.py

windows-test:
# This workflow only runs on the origin org
Expand All @@ -94,15 +108,22 @@ jobs:
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v10.0.1
with:
version: "0.12.10"
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install wheel and test
run: |
python -VV
# Install the local wheel
$env:wheel = $(ls artifact/sgkit-*.whl)
pip install $env:wheel "$env:wheel[bgen]" "$env:wheel[plink]"
python sgkit-copy/.github/scripts/test_sgkit.py
python sgkit-copy/.github/scripts/test_sgkit_bgen.py
python sgkit-copy/.github/scripts/test_sgkit_plink.py
# Avoid building SciPy from source in CI.
$wheel = (Get-ChildItem artifact/sgkit-*.whl).FullName
uv venv --python "${{ matrix.python-version }}"
uv pip install --python .venv/Scripts/python.exe --only-binary scipy "${wheel}[bgen,plink]"
.venv/Scripts/python.exe sgkit-copy/.github/scripts/test_sgkit.py
.venv/Scripts/python.exe sgkit-copy/.github/scripts/test_sgkit_bgen.py
.venv/Scripts/python.exe sgkit-copy/.github/scripts/test_sgkit_plink.py


pypi-upload:
Expand All @@ -118,14 +139,14 @@ jobs:
- name: Move to dist
run: |
mkdir dist
cp */*.{whl,gz} dist/.
cp ./*/*.{whl,gz} dist/.
- name: Publish package to TestPyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
- name: Publish package to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@ jobs:
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v10.0.1
with:
version: "0.12.10"
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
uv sync --locked --all-extras --group test --no-default-groups --python "${{ matrix.python-version }}"
- name: Test with pytest
# To avoid: 'UserWarning: KMeans is known to have a memory leak on Windows with MKL, when there are less chunks than available threads. You can avoid it by setting the environment variable OMP_NUM_THREADS=1'
env:
OMP_NUM_THREADS: 1
run: |
pytest -v
uv run --no-sync pytest -v
Loading
Loading