forked from BioStructBenchmark/BioStructBenchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
213 lines (194 loc) · 6.47 KB
/
pyproject.toml
File metadata and controls
213 lines (194 loc) · 6.47 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
[project]
name = "BioStructBenchmark"
version = "0.0.1"
description = "A tool for analyzing protein-nucleic acid complexes"
authors = [
{ name="Delta Kapp", email="deltakapp@gmail.com"},
{ name="Morgan Esler", email="mesler1397@gmail.com"}
]
readme = {file = "README.md", content-type = "text/markdown"}
license = "MIT"
requires-python = ">=3.13.0"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
dependencies = [
"biopython>=1.85",
"numpy>=2.3.1",
"pandas>=2.0.0"
]
[project.urls]
"Homepage" = "https://github.com/BioStructBenchmark/BioStructBenchmark"
[project.scripts]
biostructbenchmark = "biostructbenchmark.__main__:main"
[build-system]
requires = ["setuptools>=80.9.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
include = ["biostructbenchmark*"]
exclude = ["tests*", "output_test*", "*output*"]
[dependency-groups]
test = [
"pytest>=8.3.0",
"pytest-cov>=6.0.0",
]
lint = [
"ruff>=0.8.0",
"mypy>=1.13.0",
]
security = [
"bandit>=1.8.0",
"pip-audit>=2.7.0",
]
quality = [
"interrogate>=1.7.0",
"vulture>=2.14",
]
dev = [
{include-group = "test"},
{include-group = "lint"},
{include-group = "security"},
{include-group = "quality"},
"pre-commit>=4.0.0",
"twine>=6.1.0",
]
[tool.pytest.ini_options]
minversion = "8.0"
addopts = [
"-ra",
"-q",
"--strict-markers",
"--cov=biostructbenchmark",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-fail-under=80",
]
pythonpath = "."
testpaths = ["tests"]
markers = [
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
"slow: marks tests as slow",
]
[tool.ruff]
line-length = 100
target-version = "py313"
src = ["biostructbenchmark", "tests"]
[tool.ruff.lint]
select = [
"E", "W", # pycodestyle errors/warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"RUF", # ruff-specific
"N", # pep8-naming
"PTH", # flake8-use-pathlib
"S", # flake8-bandit (security)
"C90", # mccabe complexity
"PL", # pylint
"PT", # flake8-pytest-style
"TRY", # tryceratops (exception handling)
"PERF", # perflint
"D", # pydocstyle (docstring conventions)
"TCH", # flake8-type-checking
"T10", # flake8-debugger (no debugger statements)
"T20", # flake8-print (no print in production)
"ERA", # eradicate (commented-out code)
"FLY", # flynt (f-string conversion)
"FURB", # refurb (modernization)
"LOG", # flake8-logging
"G", # flake8-logging-format
"RET", # flake8-return
"RSE", # flake8-raise
"PIE", # flake8-pie (miscellaneous)
"INP", # flake8-no-pep420 (implicit namespace packages)
]
ignore = [
"E501", # line too long (formatter handles)
# Docstring rules - use Google convention
"D100", # missing docstring in public module
"D104", # missing docstring in public package
"D107", # missing docstring in __init__
"D200", # one-line docstring should fit on one line (overly strict)
"D203", # one-blank-line-before-class (conflicts with D211)
"D205", # blank line required between summary and description
"D212", # multi-line docstring summary should start at first line (Google uses D213)
"D415", # first line should end with punctuation (overly strict)
# Exception handling - acceptable patterns
"TRY003", # long exception messages are acceptable
"TRY203", # re-raise without changes - acceptable for clean exception handling
"TRY300", # return in try block - acceptable pattern
# Complexity - scientific code is inherently complex
"PLR0913", # too many arguments - scientific code often has many params
"PLR2004", # magic values - acceptable in scientific/numerical code
"PLR0912", # too many branches - complex algorithms are acceptable
"PLR0915", # too many statements - complex functions are acceptable
"C901", # too complex - scientific algorithms can be complex
# Style preferences
"PLC0206", # dict iteration without .items() - acceptable for key-only iteration
"SIM108", # ternary operator - explicit if-else can be clearer
"PERF401", # list comprehension vs append - readability preference
"RET504", # unnecessary assignment before return - readability preference
"G004", # logging f-string - acceptable for simple logging
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S101", "PLR2004", "ARG001", "PLC0415", "E712", "PT009", "PT027", "RUF015", "PTH123", "B007", "RUF005", "S108", "PT011", "D", "T20", "INP001", "UP038"]
"scripts/**" = ["T20", "D103", "INP001", "PTH123", "F841"] # Scripts use print for output and are utility code
"biostructbenchmark/__main__.py" = ["PLC0415", "PLR0915", "T20"] # CLI entry point has conditional imports and prints
[tool.ruff.format]
quote-style = "double"
docstring-code-format = true
[tool.mypy]
python_version = "3.13"
strict = true
extra_checks = true
warn_return_any = true
warn_unused_ignores = true
show_error_codes = true
show_column_numbers = true
pretty = true
# Allow untyped calls for scientific libraries without type stubs
disallow_untyped_calls = false
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = ["Bio.*", "numpy.*", "pandas.*"]
ignore_missing_imports = true
# BioPython has incomplete type stubs - allow broader typing
follow_imports = "skip"
[tool.coverage.run]
branch = true
source = ["biostructbenchmark"]
omit = ["tests/*"]
[tool.coverage.report]
fail_under = 80
show_missing = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]
[tool.bandit]
targets = ["biostructbenchmark"]
exclude_dirs = ["tests"]
[tool.interrogate]
fail-under = 80
verbose = 2
ignore-init-method = true
ignore-init-module = true
ignore-magic = true
ignore-private = true
ignore-semiprivate = false
exclude = ["tests", "docs", "build", "dist"]
color = true
[tool.vulture]
min_confidence = 80
paths = ["biostructbenchmark"]
exclude = ["tests/", ".venv/"]