Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
af5fb51
Migrate to dependency-groups, update Python floor to 3.11, add ruff c…
jeromekelleher Feb 27, 2026
c6017a5
Add prek.toml for standard linting configuration
jeromekelleher Feb 27, 2026
f1511da
Add uv.lock
jeromekelleher Feb 27, 2026
98c6789
Add lint.yml; update tests.yml and docs.yml to use dependency groups
jeromekelleher Feb 27, 2026
99a9e96
Add wheels.yml (PyPI release workflow)
jeromekelleher Feb 27, 2026
cbf46a6
Update package versions
jeromekelleher Feb 27, 2026
013973a
Ruffify
jeromekelleher Feb 27, 2026
c110940
Standardise docs build: __PKG_VERSION__, uv-based build.sh, simplifie…
jeromekelleher Feb 27, 2026
736393e
Align docs.yml with shared workflow pattern; add Set build version an…
jeromekelleher Feb 27, 2026
205e709
Add explicit SLiM install and verification steps
jeromekelleher Feb 27, 2026
823f924
Add SLiM to PATH after micromamba install
jeromekelleher Feb 27, 2026
f4ab97d
Install SLiM into base env and add debug diagnostics
jeromekelleher Feb 27, 2026
a843e59
Add micromamba base bin dir to PATH after SLiM install
jeromekelleher Feb 27, 2026
abe0c53
Use general docs build with install-slim option
jeromekelleher Mar 4, 2026
06e3a43
Fixed up docs nitpicks
jeromekelleher Mar 4, 2026
029b585
Update prek.toml to use uv run
jeromekelleher Mar 4, 2026
e2efb9d
Skip failing tests
jeromekelleher Mar 4, 2026
a285afe
Remove some dead packages
jeromekelleher Mar 4, 2026
df025d2
Pin workflows at v14
jeromekelleher Mar 4, 2026
f0960ec
Use only-group
jeromekelleher Mar 4, 2026
e9249ca
Really skip on windows
jeromekelleher Mar 4, 2026
1202af0
Make the windows test skip broader
jeromekelleher Mar 4, 2026
636d283
Skip another failing windows test
jeromekelleher Mar 4, 2026
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
86 changes: 7 additions & 79 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,86 +1,14 @@
name: Docs

name: Docs
on:
pull_request:
push:
branches: [main]
tags:
- '*'
merge_group:

jobs:

test:
name: Build docs
runs-on: ubuntu-24.04
defaults:
run:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v4.2.2
with:
submodules: true

- name: Cache conda and dependencies
id: cache
uses: actions/cache@v4.2.2
env:
# Increase this to reset the cache if the key hasn't changed.
CACHE_NUM: 3
with:
path: |
/usr/share/miniconda/envs/anaconda-client-env
~/osx-conda
~/.profile
key: conda-v${{ env.CACHE_NUM }}-${{ hashFiles('pyproject.toml') }}

- name: Install Conda
uses: conda-incubator/setup-miniconda@v3.1.1
if: steps.cache.outputs.cache-hit != 'true'
with:
activate-environment: anaconda-client-env
python-version: "3.10"
channels: conda-forge
channel-priority: strict
auto-update-conda: true

- name: Install slim
if: steps.cache.outputs.cache-hit != 'true'
shell: bash -l {0} #We need a login shell to get conda
run: |
conda install --yes slim

- name: Install uv and pip deps
if: steps.cache.outputs.cache-hit != 'true'
shell: bash -l {0}
run: |
pip install uv
uv pip install --system -r pyproject.toml --extra docs
# Install current pyslim as editable to ensure we get the latest version
uv pip install --system -e .

# # Retaining commented block for next devel cycle
# - name: Build SLiM
# run: |
# git clone https://github.com/messerlab/SLiM.git
# cd SLiM
# mkdir -p Release
# cd Release
# cmake -D CMAKE_BUILD_TYPE=Release ..
# make -j 2

- name: Build docs
run: |
source ~/.profile
conda activate anaconda-client-env
export PATH=$PWD/SLiM/Release:$PATH
slim -v
pip list
cd docs && make



Docs:
uses: tskit-dev/.github/.github/workflows/docs.yml@v14
with:
install-slim: true
11 changes: 11 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Lint

on:
pull_request:
push:
branches: [main]
merge_group:

jobs:
Lint:
uses: tskit-dev/.github/.github/workflows/lint.yml@v14
47 changes: 21 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ on:
merge_group:

jobs:
packaging:
name: Python packaging
uses: tskit-dev/.github/.github/workflows/python-packaging.yml@v14

test:
name: Python
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: ["3.10", 3.13]
python: ["3.11", "3.13"]
os: [macos-latest, ubuntu-24.04, windows-latest]
sys: [mingw64, ucrt64]
env: [x86_64, ucrt-x86_64]
Expand All @@ -33,7 +37,6 @@ jobs:
- os: windows-latest
sys: mingw64
env: ucrt-x86_64

defaults:
run:
shell: bash -l {0}
Expand Down Expand Up @@ -78,8 +81,8 @@ jobs:
path: D:\a\pyslim\pyslim\SLiM
key: ${{runner.os}}-${{matrix.sys}}-${{matrix.env}}-key

- name: Build SLiM windows
if: ( matrix.os == 'windows-latest' && steps.cache-slim.outputs.cache-hit != 'true' )
- name: Build SLiM (Windows)
if: matrix.os == 'windows-latest' && steps.cache-slim.outputs.cache-hit != 'true'
shell: msys2 {0}
run: |
git clone https://github.com/messerlab/SLiM.git
Expand All @@ -92,37 +95,29 @@ jobs:
make -j 2

- name: Install uv and dependencies
shell: bash -l {0}
run: |
pip install uv
uv pip install --system -r pyproject.toml --extra test
uv sync --locked --group test --no-default-groups

- name: Install SLiM macos / linux
if: (matrix.os == 'macos-latest' || matrix.os == 'ubuntu-24.04')
run: |
micromamba install slim -y
- name: Install SLiM (macOS / Linux)
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-24.04'
run: micromamba install slim -y

- name: Run tests
shell: bash -l {0}
run: |
micromamba info
micromamba list
export PATH=$PWD/SLiM/Release:$PATH
which slim
slim -v
python -m pytest \
-n 0 \
-v \
--cov=pyslim \
--cov-branch \
--cov-report=term-missing \
export PATH=$PWD/SLiM/Release:$PATH
uv run --no-default-groups --group test pytest \
-n 0 -v \
--cov=pyslim --cov-branch \
--cov-report=xml \
tests


- name: upload coverage report to codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.4.0
with:
fail_ci_if_error: true
env_vars: OS,PYTHON
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
flags: python-tests
files: coverage.xml
disable_search: true
verbose: true
52 changes: 52 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish Python release

on:
push:
branches: [test-publish]
release:
types: [published]

jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
version: "0.8.15"

- name: Build
run: uv build

- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish:
runs-on: ubuntu-24.04
environment: release
needs: [build]
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v7.0.0
with:
name: dist
path: dist

- name: Publish to TestPyPI
if: github.event_name == 'push' && github.ref_name == 'test-publish'
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
repository-url: https://test.pypi.org/legacy/
verbose: true

- name: Publish to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@v1.13.0
15 changes: 2 additions & 13 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@

# Need to set PYTHONPATH so that we pick up the local pyslim
PYPATH=${PWD}/..
PYSLIM_VERSION:=$(shell PYTHONPATH=${PYPATH} \
python3 -c 'import pyslim; print(pyslim.__version__.split("+")[0])')

dev: prereqs
all: prereqs
if (cd _static && md5sum -c pedigrees.ink.svg.md5 | grep -l "FAILED"); then echo "remaking figures with inkscape"; $(MAKE) -C _static; else echo "not remaking figures"; fi
PYTHONPATH=${PYPATH} ./build.sh

dist: prereqs
@echo Building distribution for pyslim version ${PYSLIM_VERSION}
sed -i s/__PYSLIM_VERSION__/${PYSLIM_VERSION}/g _config.yml
$(MAKE) -C _static
PYTHONPATH=${PYPATH} ./build.sh
./build.sh

clean:
rm -fR _build
Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ sphinx:
logo:
text: |
pyslim<br/>
version __PYSLIM_VERSION__
version __PKG_VERSION__
issues_github_path: tskit-dev/pyslim
todo_include_todos: true
intersphinx_mapping:
Expand Down
3 changes: 1 addition & 2 deletions docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

REPORTDIR=_build/html/reports

# TODO add -n for nitpick mode.
jupyter-book build -W --keep-going .
uv run --project=.. --group docs jupyter-book build . -vnW --keep-going
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
if [ -e $REPORTDIR ]; then
Expand Down
Loading
Loading