Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
158 lines (148 loc) · 5.14 KB
/
Copy pathpyproject.toml
File metadata and controls
158 lines (148 loc) · 5.14 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
# The package version is derived from the latest git tag (e.g. tag v0.1.0 ->
# version 0.1.0), so a release is cut by tagging -- there is no version string
# to bump by hand. Untagged builds get a setuptools-scm dev version.
[tool.hatch.version]
source = "vcs"
# Restrict the source distribution to the package and its tests. Without an
# explicit allowlist hatchling sweeps in everything not git-ignored -- stray
# PDFs, scratch data, and local .claude/ config -- which should not ship to
# PyPI. pyproject.toml, README.md, and LICENSE are always included via project
# metadata.
[tool.hatch.build.targets.sdist]
include = [
"/pg_gpu",
"/tests",
]
[project]
name = "pg_gpu"
dynamic = ["version"]
description = "GPU-accelerated population genetics statistics"
readme = "README.md"
requires-python = ">=3.12"
license = "MIT"
license-files = ["LICENSE"]
authors = [
{ name = "Andrew Kern", email = "adkern@uoregon.edu" },
]
maintainers = [
{ name = "Andrew Kern", email = "adkern@uoregon.edu" },
]
keywords = [
"population genetics",
"popgen",
"genomics",
"bioinformatics",
"GPU",
"CUDA",
"CuPy",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: POSIX :: Linux",
"Environment :: GPU :: NVIDIA CUDA :: 12",
]
# pg_gpu is GPU-first: cupy and the kvikio/nvcomp GPU-decompression stack are
# hard runtime requirements, not optional extras. The cupy [ctk] extra pulls
# the CUDA toolkit headers (nvrtc + runtime) from PyPI -- cupy 14 stopped
# bundling them, and they are needed at runtime because cupy JIT-compiles its
# kernels with NVRTC. With [ctk], a plain `pip install` works given only an
# NVIDIA CUDA-12 driver; no separate conda/system CUDA toolkit is required.
# matplotlib/seaborn back the plotting module (imported from __init__); tskit
# is imported directly by HaplotypeMatrix (otherwise only transitive via msprime).
dependencies = [
"numpy>=2.0",
"scipy>=1.12",
"pandas>=2.0",
"matplotlib>=3.7",
"seaborn>=0.12",
"scikit-allel>=1.3",
"msprime>=1.0",
"tskit>=0.5",
"h5py>=3.0",
"tqdm>=4.0",
"zarr>=2.16",
"bio2zarr[vcf]>=0.1",
"cupy-cuda12x[ctk]>=13.0",
"kvikio-cu12>=25.0",
"nvidia-nvcomp-cu12>=4.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-xdist>=3.0",
"ipython>=8.0",
"ipykernel>=6.0",
"ruff>=0.4",
]
docs = [
"sphinx>=4.0",
"sphinx-rtd-theme>=1.0",
"nbsphinx>=0.9.8",
]
moments = [
"moments-popgen",
"demes",
"demesdraw",
]
[project.urls]
Homepage = "https://github.com/kr-colab/pg_gpu"
Documentation = "https://pg-gpu.readthedocs.io"
Repository = "https://github.com/kr-colab/pg_gpu"
Issues = "https://github.com/kr-colab/pg_gpu/issues"
[tool.pytest.ini_options]
pythonpath = [
"pg_gpu"
]
markers = [
"slow: marks tests as slow (deselected by default, run with --slow)",
"requires_r: developer-local test that shells out to R (skipped when R is unavailable; never run in CI)",
]
filterwarnings = [
"ignore::DeprecationWarning:cupyx",
"ignore::DeprecationWarning:moments",
"ignore::DeprecationWarning:allel",
"ignore:No invariant site information:UserWarning",
"ignore:__array__ implementation:DeprecationWarning",
"ignore:.*FORMAT header not found:UserWarning",
"ignore::zarr.errors.UnstableSpecificationWarning",
"ignore::zarr.errors.ZarrDeprecationWarning",
"ignore:The `compressor` argument is deprecated:UserWarning:zarr",
# A multiallelic drop must be expected by the test that triggers it; any
# other drop fails the test. Matched by message, not category, so pytest's
# warnings plugin does not import pg_gpu before pytest-cov starts measuring
# (which would drop module-level coverage); a test pins the phrase.
"error:.* is defined on biallelic sites:UserWarning",
]
[tool.coverage.run]
source = ["pg_gpu"]
# Record repo-relative file paths in .coverage / coverage.xml instead of
# absolute ones, so the reports are portable across checkouts and CI (and
# diff-cover can map the files).
relative_files = true
# Measure example scripts that tests launch in a child interpreter; pytest-cov 7
# no longer instruments subprocesses automatically.
patch = ["subprocess"]
[tool.ruff]
line-length = 120
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "W"]
ignore = [
"E501", # line too long (handled by formatter)
"E711", # comparison to None (existing codebase style)
"E712", # comparison to True/False (existing codebase style)
"E721", # type comparison (existing codebase style)
"E741", # ambiguous variable name (common in pop gen: l, n, p)
"F401", # unused import (some re-exports are intentional)
"F811", # redefined unused name (test fixtures)
"F841", # unused variable (sometimes used for GPU sync)
"W605", # invalid escape sequence (in CUDA kernel strings)
]