Repository navigation
Expand file tree
/
Copy pathpixi.toml
More file actions
102 lines (89 loc) · 3.61 KB
/
Copy pathpixi.toml
File metadata and controls
102 lines (89 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
[workspace]
name = "pg_gpu"
# No version here on purpose: the package version is derived from git tags by
# hatch-vcs (see pyproject.toml), so duplicating it would only drift.
description = "GPU-accelerated population genetics statistics"
channels = ["conda-forge", "bioconda"]
platforms = ["linux-64"]
[dependencies]
python = ">=3.12"
numpy = ">=2.0"
scipy = ">=1.12"
pandas = ">=2.0"
scikit-allel = ">=1.3"
msprime = ">=1.0"
h5py = ">=3.0"
tqdm = ">=4.0"
zarr = ">=2.16"
dask = ">=2024.1" # pre-2024 dask imports numpy.compat, removed in numpy 2
pandoc = ">=3.9.0.2,<4"
nbsphinx = ">=0.9.8,<0.10"
[pypi-dependencies]
# The runtime stack (cupy-cuda12x, bio2zarr[vcf], and the kvikio/nvcomp
# GPU-decompression libraries) is declared in pyproject.toml's
# [project.dependencies] so that a plain `pip install` into a conda/venv
# environment pulls everything. The editable install below brings those
# transitive deps into the pixi environment too -- pyproject is the single
# source of truth. All of them (including kvikio-cu12 / nvidia-nvcomp-cu12)
# resolve from the default PyPI index now, so no extra index is needed.
pg_gpu = { path = ".", editable = true }
[feature.gpu.dependencies]
# cupy comes from pyproject's cupy-cuda12x pip wheel; cuda-version pins the
# conda-side CUDA runtime so any conda GPU packages stay on the 12.x ABI.
# cuda-cudart-dev supplies the toolkit headers (cuda_fp16.h, etc.): cupy's
# runtime NVRTC kernel compilation discovers the conda CUDA include dir and
# expects those headers there -- the pip wheel ships runtime libs but not the
# full toolkit headers, so without this cp.unique/sort kernels fail to build.
cuda-version = "12.*"
cuda-cudart-dev = "12.*"
notebook = ">=7.5.5,<8"
[feature.gpu.system-requirements]
cuda = "12"
[feature.dev.dependencies]
pytest = ">=7.0"
pytest-xdist = ">=3.0"
pytest-cov = ">=4.0"
diff-cover = ">=9.5"
ipython = ">=8.0"
ipykernel = ">=6.0"
ruff = ">=0.4"
htslib = ">=1.19" # provides bgzip/tabix for VCF round-trip tests
[feature.moments.dependencies]
# moments-popgen caps both of these, and the conda solve wins over the pypi
# one, so the caps have to be stated here or the environment silently
# resolves to an older moments than required below. Scoped to this feature,
# so only the parity-comparison environment is held back.
mpmath = "<1.4"
scipy = "<1.17"
[feature.moments.pypi-dependencies]
# Below 1.5.3 the cython genotype kernel has a sign error in the
# single-population pi2 correction, so the unphased parity tests compare
# against wrong reference values.
moments-popgen = ">=1.5.3"
demesdraw = "*"
demes = "*"
[feature.docs.dependencies]
sphinx = ">=4.0"
sphinx-rtd-theme = ">=1.0"
[feature.lint.dependencies]
python = ">=3.12"
ruff = ">=0.4"
[environments]
default = ["gpu", "dev", "docs"]
moments = ["gpu", "dev", "docs", "moments"]
lint = ["lint"]
[tasks]
test = { cmd = "pytest tests/ -v" }
test-parallel = { cmd = "pytest tests/ -v -n 10" }
lint = { cmd = "ruff check pg_gpu/ tests/ examples/" }
docs = { cmd = "make html", cwd = "docs" }
# Coverage tooling runs in the moments env (a superset that also exercises the
# moments-LD parity tests). Run: `pixi run coverage` then
# `pixi run diff-coverage <base branch>`.
[feature.moments.tasks]
coverage = { cmd = "pytest tests/ --slow --cov --cov-report=term-missing --cov-report=html --cov-report=xml -n 10" }
# `base` is substituted unquoted into the shell, so pass a plain git refname;
# branch names containing shell metacharacters (& ; | ( )) will not work.
[feature.moments.tasks.diff-coverage]
cmd = "diff-cover coverage.xml --compare-branch={{ base }} --format html:diff-coverage.html"
args = [{ arg = "base", default = "origin/main" }]