-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
242 lines (218 loc) · 7.08 KB
/
pyproject.toml
File metadata and controls
242 lines (218 loc) · 7.08 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
[project]
name = "pybwa"
version = "2.3.0"
description = "Python bindings for BWA"
readme = "README.md"
authors = [{name = "Nils Homer", email = "nils@fulcrumgenomics.com"}]
license = "MIT"
homepage = "https://github.com/fulcrumgenomics/pybwa"
repository = "https://github.com/fulcrumgenomics/pybwa"
keywords = ["bioinformatics"]
packages = [{ include = "pybwa" }]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Software Development :: Documentation",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.10.0,<4.0"
dependencies = [
"fgpyo >=0.7.0",
"pysam >=0.22.1",
"typing_extensions >=3.7.4; python_version <'3.13'",
]
[tool.poetry]
include = [
# pybwa
{ path = "LICENSE", format = ["sdist", "wheel"] },
{ path = "README.md", format = ["sdist", "wheel"] },
{ path = "pybwa/libbwa*.so", format = "wheel" },
{ path = "patches/*patch", format = ["sdist", "wheel"] },
{ path = "tests", format = "sdist" },
# bwa
{ path = "bwa/*.h", format = ["sdist", "wheel"] },
{ path = "bwa/*.c", format = ["sdist", "wheel"] },
{ path = "bwa/Makefile", format = ["sdist", "wheel"] },
{ path = "bwa/README.md", format = ["sdist", "wheel"] },
# htslib
{ path = "htslib/**/*.h", format = ["sdist", "wheel"] },
{ path = "htslib/**/*.c", format = ["sdist", "wheel"] },
{ path = "htslib/LICENSE", format = ["sdist", "wheel"] },
{ path = "htslib/README", format = ["sdist", "wheel"] },
{ path = "htslib/configure.ac", format = ["sdist", "wheel"] },
{ path = "htslib/m4/*.m4", format = ["sdist", "wheel"] },
{ path = "htslib/*.in", format = ["sdist", "wheel"] },
{ path = "htslib/configure", format = ["sdist", "wheel"] },
{ path = "htslib/config.guess", format = ["sdist", "wheel"] },
{ path = "htslib/config.sub", format = ["sdist", "wheel"] },
{ path = "htslib/version.sh", format = ["sdist", "wheel"] },
{ path = "htslib/Makefile", format = ["sdist", "wheel"] },
{ path = "htslib/*mk", format = ["sdist", "wheel"] },
]
exclude = [
"pybwa/**/*.so",
"**/*.so",
"*.so",
"htslib/*config*.h",
]
requires-poetry = ">=2.1"
[tool.poetry.build]
generate-setup-file = false
script = "build.py"
[tool.poetry.dependencies]
[tool.poetry.requires-plugins]
poethepoet = ">=0.29"
[tool.poetry.group.dev.dependencies]
# dependencies for linting, style checking, and unit testing
mypy = ">=1.13.0"
pytest = ">=8.3.3"
pytest-cov = ">=5.0.0"
ruff = ">=0.7.4"
setuptools = ">=68.0.0"
black = ">=24.8.0" # for readthedocs
cython = ">=3.0.11"
coverage = {extras = ["toml"], version = ">=7.6.10"}
types-setuptools = "^78.1.0.20250329"
[tool.poetry.group.docs.dependencies]
# dependencies for building docs
sphinx = { version = ">=7.0.0,<9"}
enum-tools = ">=0.12.0"
sphinx-toolbox = ">=3.8.1"
sphinx-jinja2-compat = ">=0.3.0"
sphinx-rtd-theme = ">=3.0.2"
sphinx-autodoc-typehints = "2"
[build-system]
requires = ["poetry-core>=2.1.1", "cython>=3.0.11", "setuptools>=75.1.0", "pysam >=0.22.1"]
build-backend = "poetry.core.masonry.api"
[tool.poe]
poetry_command = "task"
[tool.poe.tasks]
fix-format = "ruff format pybwa tests build.py"
fix-lint = "ruff check --fix pybwa tests build.py"
fix-all.ignore_fail = "return_non_zero"
fix-all.sequence = [
"fix-format",
"fix-lint"
]
check-lock = "poetry check --lock"
check-format = "ruff format --check --diff pybwa tests build.py"
check-lint = "ruff check pybwa tests build.py"
check-tests = "pytest"
check-typing = "mypy build.py pybwa tests --config=pyproject.toml"
check-all.ignore_fail = "return_non_zero"
check-all.sequence = [
"check-lock",
"check-format",
"check-lint",
"check-tests",
"check-typing",
"build-docs"
]
fix-and-check-all.ignore_fail = "return_non_zero"
fix-and-check-all.sequence = [
"fix-all",
"check-all"
]
build-docs.cwd = "docs"
build-docs.cmd = "make html"
[tool.ruff]
line-length = 100
target-version = "py310"
output-format = "full"
preview = true
[tool.ruff.lint]
select = [
"ARG", # Unused arguments
"C901", # McCabe complexity
"B", # bugbear
"D", # pydocstyle (docstrings. We have the "google" convention enabled)
"D204", # Blank line between class docstring and first (__init__) method
"D213", # Summary line should be located on the line after opening quotes
"E", # pycodestyle errors
"LOG", # flake8-logging
"LOG015", # (preview rule) Prohibit calls to the root logger
"F", # pyflakes
"I", # isort
"N", # PEP8 naming
"W", # pycodestyle warnings
"Q", # flake8-quotes
]
ignore = [
"E203",
"E701",
"D212", # summary line should be located on the same line as opening quotes
"D100", # missing docstring in public module
"D104", # missing docstring in public package
]
unfixable = ["B"]
# NB: only preview rules explicitly selected above (e.g. LOG015) will be enforced
preview = true
explicit-preview-rules = true
[tool.ruff.lint.isort]
force-single-line = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D103"] # missing docstring in public function
[tool.mypy]
strict_optional = true
strict_equality = true
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
enable_error_code = [
"ignore-without-code",
"possibly-undefined",
]
exclude = [
"docs/",
"site/",
]
[[tool.mypy.overrides]]
module = ["pyximport.*", "_test_libbwaindex", "Cython.Distutils.build_ext", "Cython.Build"]
ignore_missing_imports = true
[tool.coverage.run]
plugins = ["Cython.Coverage"]
branch = true
[tool.git-cliff.changelog]
header = ""
trim = true
body = """
{% for group, commits in commits | group_by(attribute="group") %}
## {{ group | upper_first }}
{% for commit in commits %}
- {{ commit.message | upper_first }} ({{ commit.id | truncate(length=8, end="") }})\
{% endfor %}
{% endfor %}\n
"""
[tool.git-cliff.git]
conventional_commits = true
commit_parsers = [
{ message = "^.+!:*", group = "Breaking"},
{ message = "^feat*", group = "Features"},
{ message = "^fix*", group = "Bug Fixes"},
{ message = "^docs*", group = "Documentation"},
{ message = "^perf*", group = "Performance"},
{ message = "^refactor*", group = "Refactor"},
{ message = "^style*", group = "Styling"},
{ message = "^test*", group = "Testing"},
{ message = "^chore\\(release\\):*", skip = true},
{ message = "^chore*", group = "Miscellaneous Tasks"},
{ body = ".*security", group = "Security"}
]
filter_commits = false