Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4c48c3e
Update copyright year
fcooper8472 Nov 7, 2025
313061d
Migrate python to standard package dir structure
fcooper8472 Nov 7, 2025
b80588c
First draft of modern pyproject.toml
fcooper8472 Nov 7, 2025
fc5a0d0
Reposition library, and include resources in the wheel
fcooper8472 Dec 4, 2025
9c94415
Update deps, include pytest explicitly
fcooper8472 Dec 4, 2025
5c15d4d
Update wheel building
fcooper8472 Dec 4, 2025
c79a460
Upgrade python unit testing workflow
fcooper8472 Dec 4, 2025
2a792f6
Upgrade building the python bindings
fcooper8472 Dec 4, 2025
d1d2dbf
Remove old setup.py
fcooper8472 Dec 4, 2025
89f7056
Bump tskit
fcooper8472 Dec 4, 2025
3655b82
Build all wheels on PR
fcooper8472 Dec 4, 2025
ec912b4
Run tests with python < 3.14 because no wheels yet for msprime or tskit
fcooper8472 Dec 4, 2025
1c06483
Install dev deps so pytest is available
fcooper8472 Dec 4, 2025
bca44f5
Run selection of example workflows on included data
fcooper8472 Dec 4, 2025
407aec2
Update pypi readme and release notes
fcooper8472 Dec 4, 2025
dc7811f
Bump version number in preparation for release
fcooper8472 Dec 4, 2025
02d1706
Add C++ testing infrastructure
fcooper8472 Dec 5, 2025
cf85e30
C++ test workflow: correct working directory
fcooper8472 Dec 5, 2025
210e323
Fix defintiion
fcooper8472 Dec 5, 2025
9ce80fa
Hide boost headers in implementation
fcooper8472 Dec 5, 2025
7d98360
Commit WIP for regression test
fcooper8472 Dec 5, 2025
b8a4fdc
Merge branch '1-modernise-infrastructure-build-new-wheels-make-new-re…
fcooper8472 Dec 5, 2025
41fdc91
Merge remote-tracking branch 'origin/1-modernise-infrastructure-build…
fcooper8472 Dec 6, 2025
455fc98
Finish python regression test
fcooper8472 Dec 6, 2025
b9242b7
Stop using deprecated find boost module
fcooper8472 Dec 6, 2025
c507956
Modernise FileUtils
fcooper8472 Dec 6, 2025
13b78de
Update header guards
fcooper8472 Dec 6, 2025
94fef93
Update THROW_LINE macro to function using source_location
fcooper8472 Dec 6, 2025
8a71288
Remove using declarations
fcooper8472 Dec 6, 2025
f1a1633
Modernise some C++
fcooper8472 Dec 7, 2025
4253410
Fix remaining THROW_LINE -> make_error conversions
fcooper8472 Dec 7, 2025
e596e00
Add test for utils
fcooper8472 Dec 7, 2025
38c9a73
Alma linux 8 doesn't have new enough boost for config mode
fcooper8472 Dec 7, 2025
1ceeb1b
Back to C++17 to avoid nasty boost interaction on AlmaLinux8
fcooper8472 Dec 7, 2025
ab72f4c
Bump date for release
fcooper8472 Dec 18, 2025
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
85 changes: 53 additions & 32 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,66 +10,87 @@ on:
release:
types:
- published

env:
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-*
CIBW_SKIP: cp3*-musllinux_*
CIBW_ARCHS_MACOS: x86_64
CIBW_ARCHS_LINUX: auto64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_ALL_LINUX: yum -y install boost-devel zlib-devel
CIBW_BEFORE_ALL_MACOS: brew install boost zlib gsl
CIBW_BEFORE_BUILD: pip install --upgrade pip setuptools wheel ninja numpy cython
CIBW_ENVIRONMENT_MACOS: CXX="$(brew --prefix llvm@15)/bin/clang++"
MACOSX_DEPLOYMENT_TARGET: 10.15
workflow_dispatch:

jobs:
build_wheels:
build_wheels_cloud:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-12]
include:
- os: ubuntu-24.04
arch: x86_64
py-vers-full: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*
py-vers-pr: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*
before-all: dnf -y install boost-devel zlib
extra-env: ""
mdt: ""
- os: ubuntu-24.04-arm
arch: aarch64
py-vers-full: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*
py-vers-pr: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*
before-all: dnf -y install boost-devel zlib
extra-env: ""
mdt: ""
- os: macos-15-intel
arch: x86_64
py-vers-full: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*
py-vers-pr: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*
before-all: brew install boost zlib
extra-env: CC=clang CXX=clang++
mdt: 15
- os: macos-14
arch: arm64
py-vers-full: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*
py-vers-pr: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*
before-all: brew install boost zlib
extra-env: CC=clang CXX=clang++
mdt: 14

env:
CIBW_BUILD: ${{ github.event_name != 'pull_request' && matrix.py-vers-full || matrix.py-vers-pr }}
CIBW_SKIP: cp3*-musllinux_*
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_BEFORE_ALL: ${{ matrix.before-all }}
CIBW_BEFORE_BUILD: pip install --upgrade pip setuptools wheel ninja numpy cython
CIBW_ENVIRONMENT: ${{ matrix.extra-env }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.mdt }}

steps:

- name: checkout repo & submodules
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v3

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.12.0

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
uses: pypa/cibuildwheel@v3.2.0

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-cloud-${{ matrix.os }}
path: ./wheelhouse/*.whl
retention-days: 1

upload_all:
name: Upload to PyPI
needs: build_wheels
needs: [build_wheels_cloud]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}

steps:
- uses: actions/setup-python@v3

- name: Download wheels
uses: actions/download-artifact@v3
- name: Download wheels from cloud runners
uses: actions/download-artifact@v5
with:
name: wheels
pattern: wheels-cloud-*
merge-multiple: true
path: wheels

- uses: pypa/gh-action-pypi-publish@v1.6.4
- uses: pypa/gh-action-pypi-publish@v1.13.0
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/cpp_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: C++ unit tests

on:
push:
branches:
- main
pull_request:
branches:
- '**'
workflow_dispatch:

jobs:

build-and-test:
name: C++ unit tests
runs-on: ${{ matrix.os }}
timeout-minutes: 10

strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
cxx: "clang++-18"
sys_install: "sudo apt -y update && sudo apt -y install libboost-iostreams-dev"
- os: ubuntu-24.04-arm
cxx: "g++-12"
sys_install: "sudo apt -y update && sudo apt -y install libboost-iostreams-dev"
- os: macos-15
cxx: ""
sys_install: "brew install boost"
- os: macos-15
cxx: "$(brew --prefix llvm@18)/bin/clang"
sys_install: "brew install boost"

steps:
- name: checkout repo & submodules
uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0

- name: install deps
run: |
${{ matrix.sys_install }}

- name: make build dir
run: |
mkdir build

- name: cmake configure
run: |
cmake ..
working-directory: build

- name: cmake build
run: |
cmake --build . --target cpp_tests --parallel 4
working-directory: build

- name: ctest
run: |
ctest --output-on-failure
working-directory: build
48 changes: 0 additions & 48 deletions .github/workflows/pip-install-macos.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/pip-install-ubuntu.yml

This file was deleted.

77 changes: 77 additions & 0 deletions .github/workflows/python_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Python examples

on:
push:
branches:
- main
pull_request:
branches:
- '**'
workflow_dispatch:

jobs:

build-and-test:
name: Python examples
runs-on: ${{ matrix.os }}
timeout-minutes: 10

strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
py: "3.10"
sys_install: "sudo apt -y update && sudo apt -y install libboost-iostreams-dev"
- os: macos-15
py: "3.13"
sys_install: "brew install boost"

steps:
- name: checkout repo & submodules
uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0

- name: install deps
run: |
${{ matrix.sys_install }}

- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.py }}

- name: install python bindings
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install .

- name: prepare example
run: |
prepare_example

- name: regular ARG-Needle
run: |
infer_args

- name: ARG-Needle with ASMC-clust
run: |
infer_args --asmc_clust 1

- name: ARG-Needle without ARG normalization
run: |
infer_args --normalize 0

- name: ARG-Needle (sequence mode)
run: |
prepare_example --mode sequence --length 5e5
infer_args --mode sequence

- name: ARG-Needle advanced mode (multistep)
run: |
prepare_example
infer_args_advanced --step 1 --num_snp_samples 200
infer_args_advanced --step 2
infer_args_advanced --step 3 --trim_num_snps 0,50
Loading
Loading