Skip to content

Commit 24fe2a1

Browse files
committed
switch docs build to github
install slim from conda remove windows increase timeout bump conda cache
1 parent 4f4af53 commit 24fe2a1

File tree

4 files changed

+33
-47
lines changed

4 files changed

+33
-47
lines changed

.circleci/config.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -47,39 +47,9 @@ jobs:
4747
paths:
4848
- "/home/circleci/.local"
4949

50-
- run:
51-
name: Build docs
52-
command: |
53-
# don't re-generate these which require tricky prerequisites (inkscape, xmlstarlet)
54-
touch docs/_static/{pedigree0.svg,pedigree1.svg,pedigree2.svg,pedigree_recapitate.svg,pedigree_simplify.svg,pedigree_mutate.svg}
55-
touch docs/_static/{pedigree01.png,pedigree0.png,pedigree1.png,pedigree2.png,pedigree_recapitate.png,pedigree_simplify.png,pedigree_mutate.png}
56-
cd docs && make
57-
58-
- run:
59-
name: Run Python tests
60-
command: |
61-
PYTHONPATH=python pytest --cov=pyslim --cov-report=xml --cov-branch \
62-
-n 1 tests
63-
6450
- run:
6551
name: Upload Python coverage
6652
command: |
6753
bash <(curl -s https://codecov.io/bash) -X gcov -n python_tests
6854
# Clean up reports so we don't upload them twice.
6955
rm -f coverage.xml
70-
71-
- run:
72-
name: Build Python package
73-
command: |
74-
rm -fR build
75-
python setup.py sdist
76-
python setup.py check
77-
python -m twine check dist/*.tar.gz
78-
python -m venv venv
79-
source venv/bin/activate
80-
pip install --upgrade setuptools pip wheel
81-
python setup.py build_ext
82-
python setup.py egg_info
83-
python setup.py bdist_wheel
84-
pip install dist/*.tar.gz
85-
python3 -c "import pyslim; print(pyslim.__version__)"

.github/workflows/tests.yml

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ jobs:
3131
- name: Cache conda and dependancies
3232
id: cache
3333
uses: actions/cache@v2
34+
env:
35+
# Increase this to reset the cache if the key hasn't changed.
36+
CACHE_NUM: 1
3437
with:
3538
path: |
36-
c:\Miniconda\envs\anaconda-client-env
37-
/usr/share/miniconda/envs/anaconda-client-env
38-
~/osx-conda
39-
~/.profile
40-
key: ${{ runner.os }}-${{ matrix.python}}-conda-v10-${{ hashFiles('requirements/CI/pip-requirements.txt') }}-${{ hashFiles('requirements/CI/conda-requirements.txt') }}
39+
${{ steps.find-conda.outputs.CONDA }}/envs/${{ env.CONDA_ENV_NAME }}
40+
~/.bash_profile
41+
key: ${{ runner.os }}-${{ matrix.python}}-conda-v10-${{ hashFiles('requirements/CI/pip-requirements.txt') }}-${{ hashFiles('requirements/CI/conda-requirements.txt') }}-${{ env.CACHE_NUM }}
4142

4243
- name: Install Conda
4344
uses: conda-incubator/setup-miniconda@v2
@@ -58,7 +59,11 @@ jobs:
5859
- name: Install conda deps
5960
if: steps.cache.outputs.cache-hit != 'true'
6061
shell: bash -l {0} #We need a login shell to get conda
61-
run: conda install --yes --file=requirements/CI/conda-requirements.txt
62+
run: |
63+
if [ "$RUNNER_OS" != "Windows" ]; then
64+
conda install --yes slim
65+
fi
66+
conda install --yes --file=requirements/CI/conda-requirements.txt
6267
6368
- name: Install pip deps
6469
if: steps.cache.outputs.cache-hit != 'true'
@@ -76,13 +81,14 @@ jobs:
7681
mkdir -p /usr/local/miniconda/envs
7782
sudo cp -r ~/osx-conda /usr/local/miniconda/envs/anaconda-client-env
7883
79-
- name: Build SLiM
80-
run: |
81-
git clone https://github.com/messerlab/SLiM.git
82-
mkdir -p SLiM/Release
83-
cd SLiM/Release
84-
cmake -D CMAKE_BUILD_TYPE=Release ..
85-
make -j 2
84+
# Installing SLiM from conda now.
85+
# - name: Build SLiM
86+
# run: |
87+
# git clone https://github.com/messerlab/SLiM.git
88+
# mkdir -p SLiM/Release
89+
# cd SLiM/Release
90+
# cmake -D CMAKE_BUILD_TYPE=Release ..
91+
# make -j 2
8692

8793
- name: Run tests
8894
run: |
@@ -91,5 +97,13 @@ jobs:
9197
export PATH=$PATH:$PWD/SLiM/Release
9298
pytest -xv -n2
9399
100+
- name: Build docs
101+
run: |
102+
source ~/.profile
103+
conda activate anaconda-client-env
104+
export PATH=$PATH:$PWD/SLiM/Release
105+
touch docs/_static/{pedigree0.svg,pedigree1.svg,pedigree2.svg,pedigree_recapitate.svg,pedigree_simplify.svg,pedigree_mutate.svg}
106+
touch docs/_static/{pedigree01.png,pedigree0.png,pedigree1.png,pedigree2.png,pedigree_recapitate.png,pedigree_simplify.png,pedigree_mutate.png}
107+
cd docs && make
94108
95109

docs/vignette_space.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ jupytext:
66
format_version: 0.12
77
jupytext_version: 1.9.1
88
kernelspec:
9-
display_name: Python 3
10-
language: python
11-
name: python3
9+
display_name: Python 3
10+
language: python
11+
name: python3
12+
execution:
13+
timeout: 90
1214
---
1315

1416
```{code-cell}

tests/test_tree_sequence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"""
44
import pickle
55
import random
6+
import numpy as np
67
import os
78

8-
import numpy as np
99
import pytest
1010
import tskit
1111
import msprime

0 commit comments

Comments
 (0)