-
Notifications
You must be signed in to change notification settings - Fork 136
Expand file tree
/
Copy pathpyproject.toml
More file actions
197 lines (181 loc) · 5.39 KB
/
pyproject.toml
File metadata and controls
197 lines (181 loc) · 5.39 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
[project]
name = "biotite"
requires-python = ">=3.11"
description = "A comprehensive library for computational molecular biology"
readme = "README.rst"
authors = [{name = "The Biotite contributors"}]
license = "BSD-3-Clause"
license-files = ["LICENSE.rst"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
dependencies = [
# Wheels compiled with NumPy 2.0 are backward compatible with NumPy 1.x
# https://numpy.org/devdocs/dev/depending_on_numpy.html#numpy-2-0-specific-advice
"numpy >= 1.25",
"biotraj >= 1.0, < 2.0",
"requests >= 2.12",
"msgpack >= 0.5.6",
"networkx >= 2.0",
"packaging >= 24.0",
]
dynamic = ["version"]
[project.optional-dependencies]
test = [
"pytest",
"pytest-codspeed",
]
lint = [
"ruff == 0.9.7",
"numpydoc == 1.8.0",
]
[project.urls]
homepage = "https://www.biotite-python.org"
repository = "https://github.com/biotite-dev/biotite"
documentation = "https://www.biotite-python.org"
[tool.ruff.lint]
# pyflakes, pycodestyle isort and varibale naming
select = ["F", "E", "W", "I", "TID", "N"]
ignore = [
# In docstrings long lines are often intentional
# Most other ocassions are caught by the ruff formatter
"E501",
# Due to constants and class placeholders defined in functions
"N806",
]
[tool.ruff.lint.per-file-ignores]
# Due to `* import` of BCIF encoding
"src/biotite/setup_ccd.py" = ["F405", "F403"]
# Due to imports after the PATH has been adjusted
"doc/conf.py" = ["E402"]
# Due to `from .module import *` imports in `__init__.py` modules
"__init__.py" = ["F403", "TID252"]
# Due to package existence check before other modules are imported
"src/biotite/interface/**/__init__.py" = ["E402"]
# Due to pymol scripts that are evaluated in other example scripts
"doc/examples/**/*_pymol.py" = ["F821"]
# Due to 'Table' class used as parametrized argument in test functions
"benchmarks/sequence/align/benchmark_kmers.py" = ["N803"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.isort]
# No separator lines between import sections
no-lines-before = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]
order-by-type = true
known-first-party = ["biotite"]
[tool.numpydoc_validation]
# The description of each rule is documented at
# https://numpydoc.readthedocs.io/en/latest/validation.html#built-in-validation-checks
checks = [
"all",
# ... except:
"GL08", # Properties do not have a docstring
"SS03", # Sometimes the citation comes after the period
"SS05", # Too error-prone; classes do not use infinite verbs
"SS06", # Sometimes summaries are a bit longer
"ES01", # Some functions are simple enough to not need an extended summary
"PR06", # The types are quite descriptive (include shape, dtype, etc.)
"RT02", # In Biotite all return values have names
# Intentionally not all docstrings contain these sections
"YD01",
"SA01",
"EX01",
]
exclude = [
'__init__$', # Subpackage descriptions are not Numpydoc formatted
'\._[_a-z0-9]+$', # Do not validate private or special methods
# Dataclasses: Numpydoc complains about additional constructor parameters,
# but the constructor is absent
'sdf.Metadata\.Key',
'header.Header',
'throttle.ThrottleStatus',
# Numpydoc does not accept the parameters of inherited constructors
"query.DepositGrouping",
"query.UniprotGrouping",
# Function uses args/kwargs, but docstring describes parameter
'geometry.index_',
'query.FieldQuery',
'query.SimilarityQuery',
'query.IdentityQuery',
'query.StructureQuery',
'query.SuperOrSubstructureQuery',
'query.SuperstructureQuery',
'query.SubstructureQuery',
# Numpydoc expects a return value for decorators
'application.requires_state',
'version.requires_version',
'object.validate',
# Usage of the return value is not intended
'display.show',
'display.play',
]
[tool.pytest.ini_options]
testpaths = [
"tests",
"benchmarks"
]
python_files = [
"test_*.py",
"benchmark_*.py",
]
python_functions = [
"test_*",
"benchmark_*",
]
filterwarnings = [
# Appears in loading NetCDF trajectory files
"ignore:The 'netCDF4' Python package is not installed.",
"ignore:Input structure has no associated 'BondList'",
]
[tool.hatch.build.targets.sdist]
exclude = [
"tests",
"benchmarks",
"doc",
"environment.yml",
# .github, .gitignore, .gitattributes
".git*",
]
artifacts = [
"src/biotite/structure/info/components.bcif"
]
[tool.hatch.build.targets.wheel]
artifacts = [
"src/biotite/structure/info/components.bcif"
]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/biotite/version.py"
[tool.hatch.build.targets.wheel.hooks.cython]
dependencies = ["hatch-cython"]
[tool.hatch.build.targets.wheel.hooks.cython.options]
include_numpy = true
compile_py = false
define_macros = [
["NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION"],
]
[build-system]
requires = [
"hatchling",
"hatch-vcs == 0.4",
"hatch-cython == 0.5",
"numpy >= 2.0",
"cython >= 3.0",
]
build-backend = "hatchling.build"