Skip to content

Commit 53099c6

Browse files
committed
Pyproject reqs
1 parent 7b6f418 commit 53099c6

7 files changed

Lines changed: 86 additions & 100 deletions

File tree

.github/workflows/docs.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ on:
88
merge_group:
99
jobs:
1010
Docs:
11-
uses: tskit-dev/.github/.github/workflows/docs-build-template.yml@main
11+
uses: tskit-dev/.github/.github/workflows/docs-build-template.yml@v1
1212
with:
13-
requirements-path: requirements/CI-docs/requirements.txt
1413
additional-setup: sudo apt-get install -y tabix
15-
make-command: make all
14+
make-command: make all

.github/workflows/tests.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
with:
2121
python-version: '3.10'
2222
- name: install clang-format
23-
if: steps.clang_format.outputs.cache-hit != 'true'
2423
run: |
2524
sudo pip install clang-format==6.0.1
2625
sudo ln -s /usr/local/bin/clang-format /usr/local/bin/clang-format-6.0
@@ -48,57 +47,50 @@ jobs:
4847
with:
4948
submodules: true
5049

51-
- name: Cache conda and dependancies
52-
id: cache
53-
uses: actions/cache@v4.2.2
54-
with:
55-
path: ${{ env.CONDA }}/envs
56-
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.python}}-conda-v5-${{ hashFiles('requirements/CI-tests-conda/requirements.txt')}}
57-
5850
- name: Install Miniconda with Mamba
5951
uses: conda-incubator/setup-miniconda@v3.1.1
60-
if: steps.cache.outputs.cache-hit != 'true'
6152
with:
6253
activate-environment: anaconda-client-env
6354
python-version: ${{ matrix.python }}
6455
channels: conda-forge
65-
# channel-priority: strict
6656
auto-update-conda: true
67-
# mamba-version: "*"
68-
# use-mamba: true
6957

7058
- name: Fix windows .profile
71-
if: steps.cache.outputs.cache-hit != 'true' && matrix.os == 'windows-latest'
7259
run: |
7360
cp ~/.bash_profile ~/.profile
7461
7562
# Work around weird issues on OSX possibly caused by mixed compilers
7663
# https://github.com/tskit-dev/tsinfer/issues/376
7764
- name: Install compiler from conda
78-
if: steps.cache.outputs.cache-hit != 'true'
7965
shell: bash -l {0} #We need a login shell to get conda
8066
run: conda install --yes c-compiler
8167

8268
- name: Install conda deps
83-
if: steps.cache.outputs.cache-hit != 'true'
8469
shell: bash -l {0} #We need a login shell to get conda
85-
run: conda install --yes --file=requirements/CI-tests-conda/requirements.txt
70+
run: conda install msprime
71+
72+
- name: Install uv
73+
uses: astral-sh/setup-uv@v6
74+
with:
75+
version: "0.8.15"
8676

8777
- name: Install cyvcf2 #Fails if done via conda due to no windows support.
88-
if: steps.cache.outputs.cache-hit != 'true' && matrix.os != 'windows-latest'
8978
run: |
9079
source ~/.profile
9180
conda activate anaconda-client-env
9281
#Install these by pip so we don't pull in cbgen with conda as it isn't available on 3.12
93-
pip install sgkit==0.9.0 cyvcf2==0.31.1 yarl==1.9.4 aiohttp==3.9.5 requests==2.32.3
82+
uv pip install sgkit==0.9.0 cyvcf2==0.31.1 yarl==1.9.4 aiohttp==3.9.5 requests==2.32.3
9483
9584
- name: Install sgkit only on windows
96-
if: steps.cache.outputs.cache-hit != 'true' && matrix.os == 'windows-latest'
9785
run: |
9886
source ~/.profile
9987
conda activate anaconda-client-env
10088
#Install these by pip so we don't pull in cbgen with conda as it isn't available on 3.12
101-
pip install sgkit==0.9.0
89+
uv pip install sgkit==0.9.0
90+
91+
- name: Install pip deps
92+
run:
93+
uv pip install -r pyproject.toml --extra test
10294

10395
- name: Build module
10496
run: |

pyproject.toml

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dependencies = [
5454
"humanize",
5555
"daiquiri",
5656
"tskit>=0.5.3",
57-
"numcodecs>=0.6",
57+
"numcodecs>=0.6,<0.15.1", #Pinned due to https://github.com/zarr-developers/numcodecs/issues/733
5858
"zarr>=2.2,!=2.11.0,!=2.11.1,!=2.11.2,<3",
5959
"lmdb",
6060
"sortedcontainers",
@@ -73,6 +73,77 @@ Changelog = "https://tskit.dev/tsinfer/docs/stable/CHANGELOG.html"
7373
[project.scripts]
7474
tsinfer = "tsinfer.__main__:main"
7575

76+
[project.optional-dependencies]
77+
test = [
78+
"build==1.2.2.post1",
79+
"colorama==0.4.6",
80+
"daiquiri==3.2.5.1",
81+
"humanize==4.12.1",
82+
"lmdb==1.6.2",
83+
"matplotlib==3.9.4",
84+
"meson==1.7.0",
85+
"msprime==1.3.3",
86+
"pytest==8.3.5",
87+
"pytest-cov==6.0.0",
88+
"seaborn==0.13.2",
89+
"sgkit[vcf]==0.9.0",
90+
"tskit==0.6.0",
91+
"tqdm==4.67.1",
92+
"twine==6.1.0"
93+
]
94+
95+
docs = [
96+
"jupyter-book==1.0.4.post1",
97+
"sphinx-issues==5.0.0",
98+
"sphinx-argparse==0.5.2",
99+
"humanize==4.12.1",
100+
"lmdb==1.6.2",
101+
"tqdm==4.67.1",
102+
"daiquiri==3.3.0",
103+
"msprime==1.3.3",
104+
"sgkit[vcf]==0.9.0",
105+
"ipywidgets==8.1.5",
106+
"Bio==1.7.1",
107+
"bio2zarr==0.1.4",
108+
"sphinx-book-theme",
109+
"pyfaidx==0.8.1.3"
110+
]
111+
112+
dev = [
113+
"attrs",
114+
"codecov",
115+
"coverage",
116+
"flake8",
117+
"six",
118+
"tqdm",
119+
"humanize",
120+
"daiquiri",
121+
"msprime>=1.0.0",
122+
"tskit>=0.5.3",
123+
"lmdb",
124+
"pre-commit",
125+
"pytest",
126+
"pytest-coverage",
127+
"h5py",
128+
"sortedcontainers",
129+
"python-prctl; sys_platform == 'linux'",
130+
"numa; sys_platform == 'linux'",
131+
"sphinx",
132+
"sphinx-argparse",
133+
"sphinx_rtd_theme",
134+
"setuptools>=45",
135+
"setuptools_scm",
136+
"matplotlib",
137+
"seaborn",
138+
"colorama",
139+
"sgkit[vcf]",
140+
"sphinx-book-theme",
141+
"jupyter-book",
142+
"sphinx-issues",
143+
"ipywidgets",
144+
"pyfaidx"
145+
]
146+
76147
[tool.setuptools]
77148
packages = ["tsinfer"]
78149
include-package-data = true

requirements/CI-docs/requirements.txt

Lines changed: 0 additions & 14 deletions
This file was deleted.

requirements/CI-tests-complete/requirements.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

requirements/CI-tests-conda/requirements.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

requirements/development.txt

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)