-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
229 lines (206 loc) · 5.68 KB
/
pyproject.toml
File metadata and controls
229 lines (206 loc) · 5.68 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
[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "simba-ms"
version = "0.1.0"
description = "SIMBA: Spectral Identification of Molecule Bio-Analogues - Transformer-based neural network for MS/MS structural similarity prediction"
readme = "README.md"
requires-python = ">=3.11,<3.12"
license = {text = "Apache-2.0"}
authors = [
{name = "Bittremieux Lab", email = "wout.bittremieux@uantwerpen.be"},
]
keywords = [
"metabolomics",
"mass-spectrometry",
"structural-similarity",
"transformer",
"deep-learning",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
dependencies = [
# Core scientific computing
"numpy>=1.24.0,<2.0",
"scipy>=1.10.0,<2.0",
"pandas>=2.0.0,<3.0",
"polars>=0.20.0",
# Deep learning
"torch>=2.0.0",
"torchvision>=0.15.0",
"pytorch-lightning>=2.0.0",
"lightning>=2.0.0",
"torchmetrics>=1.0.0",
# Chemistry
"rdkit>=2023.9.0",
"matchms>=0.24.0",
"spectrum-utils>=0.4.0",
"pyteomics>=4.6.0",
"depthcharge-ms @ git+https://github.com/wfondrie/depthcharge.git@bd2861f",
"myopic-mces>=1.0.0,<2.0.0",
"highspy>=1.13.1",
# Data processing
"h5py>=3.10.0",
"pyarrow>=15.0.0",
"datasets>=2.20.0",
# ML utilities
"scikit-learn>=1.4.0,<2.0.0",
"einops>=0.7.0",
# Visualization
"matplotlib>=3.7.0",
"seaborn>=0.13.0",
# Utilities
"click>=8.1.0",
"tqdm>=4.66.0",
"pyyaml>=6.0.0",
"requests>=2.32.0",
"llvmlite>=0.43.0",
"hydra-core>=1.3.2",
"omegaconf>=2.3.0",
"sqlalchemy>=1.4,<2.0",
"hydra-optuna-sweeper>=1.2.0",
"hydra-submitit-launcher>=1.2.0",
"optuna>=2.10.1",
]
[project.optional-dependencies]
dev = [
"ruff>=0.6.0",
"pre-commit>=3.5.0",
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-mock>=3.15.1",
]
notebooks = [
"jupyter>=1.0.0",
"jupyterlab>=4.0.0",
"ipykernel>=6.28.0",
"ipywidgets>=8.0.0",
]
docs = [
"myst-parser>=4.0.1",
"sphinx>=8.2.3",
"sphinx-autodoc-typehints>=3.5.2",
"sphinx-click>=6.2.0",
"sphinx-rtd-theme>=3.0.2",
"sphinx-markdown-tables>=0.0.17",
]
[project.urls]
Homepage = "https://github.com/bittremieuxlab/simba"
Repository = "https://github.com/bittremieuxlab/simba"
Documentation = "https://simba-ms.readthedocs.io"
"Bug Tracker" = "https://github.com/bittremieuxlab/simba/issues"
[project.scripts]
simba = "simba.cli:cli"
simba-sweep = "simba.commands.sweep_train:sweep_train"
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["."]
include = ["simba*"]
exclude = ["tests*", "legacy*", "notebooks*", "docs*"]
[tool.setuptools.package-data]
simba = ["configs/**/*.yaml"]
# ============================================================================
# Ruff Configuration
# ============================================================================
[tool.ruff]
target-version = "py311"
line-length = 88
exclude = [
".git",
".github",
".pytest_cache",
".ruff_cache",
".venv",
"__pycache__",
"build",
"dist",
"*.egg-info",
# Exclude legacy code from linting
"legacy",
"notebooks",
"data",
"docs",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
]
ignore = [
"E501", # Line too long (handled by formatter)
"B008", # Function calls in argument defaults
"B020", # Loop control variable overrides iterable it iterates
"B905", # zip() without explicit strict parameter
"N803", # Argument name should be lowercase (scientific naming)
"N806", # Variable should be lowercase (scientific naming)
"N812", # Lowercase imported as non-lowercase (e.g., `import torch.nn.functional as F`)
"N813", # Camelcase imported as lowercase
"N999", # Invalid module name (legacy CamelCase module names)
"SIM108", # Use ternary operator (can reduce readability)
]
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403"]
"**/scripts/**/*.py" = ["T201"]
"preprocessing_scripts/**/*.py" = ["T201"]
"training_scripts/**/*.py" = ["T201"]
"inference_scripts/**/*.py" = ["T201"]
[tool.ruff.lint.isort]
known-first-party = ["simba"]
lines-after-imports = 2
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
docstring-code-format = true
# ============================================================================
# Pytest Configuration
# ============================================================================
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
"--cov=simba",
"--cov-report=term-missing",
"--cov-report=html",
]
markers = [
"unit: Unit tests (fast, isolated)",
"integration: Integration tests (slower, may require data/models)",
"slow: Slow tests that may take several seconds",
]
[tool.coverage.run]
source = ["simba"]
omit = [
"*/tests/*",
"*/legacy_scripts/*",
"*/__pycache__/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]