-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
329 lines (292 loc) · 6.71 KB
/
pyproject.toml
File metadata and controls
329 lines (292 loc) · 6.71 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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "themap"
dynamic = ["version"]
authors = [
{name="Hosein Fooladi", email="fooladi.hosein@gmail.com"}
]
description = "Package for task hardness estimation for molecular activity prediction"
requires-python = ">=3.10"
license = {text = "MIT"}
keywords = [
"chemistry",
"machine-learning",
"dataset-distance",
"molecular",
"drug-discovery",
"cheminformatics",
"transfer-learning",
"domain-adaptation",
"task-hardness",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Typing :: Typed",
]
dependencies = [
# Core scientific computing
"numpy",
"pandas",
"scipy",
"scikit-learn",
# Chemistry
"rdkit",
"datamol",
# Utilities
"tqdm",
"h5py",
"pydantic",
"pyyaml",
"click>=8.0.0",
"dpu-utils>=0.2.13",
]
[project.scripts]
themap = "themap.cli:main"
[project.optional-dependencies]
# Visualization (optional but commonly used)
viz = [
"matplotlib",
"seaborn",
"adjustText",
]
# ChEMBL web access
chembl = [
"chembl-webresource-client",
"pytz",
]
# ML/deep learning dependencies
ml = [
"torch>=2.0.0,<3.0.0",
"torchvision>=0.15.0,<1.0.0",
"torchaudio>=2.0.0,<3.0.0",
"molfeat>=0.10.0",
"dgl<=2.0",
"dgllife",
"torch-geometric",
]
# Protein analysis
protein = [
"biopython",
"esm",
"sentence-transformers",
]
# Optimal transport distances
otdd = [
"torch>=2.0.0,<3.0.0",
"torchvision>=0.15.0,<1.0.0",
"torchaudio>=2.0.0,<3.0.0",
"pot",
"pykeops",
"geomloss",
"opentsne",
"munkres",
]
# All features
all = [
# Visualization
"matplotlib",
"seaborn",
"adjustText",
# ChEMBL
"chembl-webresource-client",
"pytz",
# ML
"torch>=2.0.0,<3.0.0",
"torchvision>=0.15.0,<1.0.0",
"torchaudio>=2.0.0,<3.0.0",
"molfeat>=0.10.0",
"dgl<=2.0",
"dgllife",
"torch-geometric",
# Protein
"biopython",
"esm",
"sentence-transformers",
# OTDD
"pot",
"pykeops",
"geomloss",
"opentsne",
"munkres",
]
test = [
"pytest>=6.0",
"pytest-dotenv",
"pytest-cov",
"pytest-timeout",
"pytest-xdist",
]
dev = [
"ruff==0.12.4",
"mypy==1.17.0",
"pre-commit",
"jupyterlab",
"nbconvert",
"ipywidgets",
"isort",
"celluloid",
"ipycache",
"watermark",
"psutil",
]
docs = [
"mkdocs",
"mkdocs-material>=7.1.1",
"mkdocs-material-extensions",
"mkdocstrings",
"mkdocstrings-python",
"mkdocs-jupyter",
"markdown-include",
"mdx_truly_sane_lists",
"nbconvert",
"mike>=1.0.0",
]
[project.urls]
"Homepage" = "https://github.com/HFooladi/THEMAP"
"Bug Tracker" = "https://github.com/HFooladi/THEMAP/issues"
"Documentation" = "https://hfooladi.github.io/THEMAP/"
"Changelog" = "https://github.com/HFooladi/THEMAP/blob/main/CHANGELOG.md"
[project.readme]
file="README.md"
content-type = "text/markdown"
[tool.hatch.version]
source = "vcs"
[tool.hatch.metadata.hooks.vcs]
version-file = "themap/_version.py"
tag-pattern = "v[0-9]*"
[tool.hatch.build.targets.wheel]
packages = ["themap"]
[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/docs",
"tests/",
"*.pyc",
]
[tool.ruff]
# Enable auto-fixing
fix = true
# Set line length
line-length = 110
# Set target version
target-version = "py310"
# Select rule codes to enforce. "E" and "F" are defaults. Add "I" for import sorting.
# You can add more codes like "B" (flake8-bugbear) or "C4" (flake8-comprehensions) etc.
[tool.ruff.lint]
select = ["E", "F", "W", "I"] # W = warnings, I = isort
ignore = ["E501"] # Line length handled by formatter
[tool.ruff.format]
# Use double quotes for strings
quote-style = "double"
# Use spaces around operators
indent-style = "space"
# Respect magic trailing commas
skip-magic-trailing-comma = false
# Line length matches linting
line-ending = "auto"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"F401", # imported but unused
"E402", # Module level import not at top of file
]
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
# Output options
addopts = [
"-v", # Verbose output
"--tb=short", # Short traceback format
"--strict-markers", # Require markers to be defined
"--color=yes", # Colored output
"--durations=10", # Show 10 slowest tests
"--disable-warnings", # Disable warnings in output
]
# Markers for test categorization
markers = [
"unit: Unit tests for individual components",
"integration: Integration tests for component interactions",
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"gpu: Tests requiring GPU hardware",
"network: Tests requiring network access",
"serial: Tests that must run serially",
]
# Warning filters
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
"ignore::FutureWarning:torch.*",
"ignore::UserWarning:scipy.*",
"ignore::UserWarning:rdkit.*",
]
[tool.coverage.run]
source = ["themap/"]
disable_warnings = ["no-data-collected"]
data_file = ".coverage/coverage"
[tool.coverage.report]
omit = ["themap/__init__.py"]
[tool.coverage.xml]
output = "coverage.xml"
[tool.mypy]
python_version = "3.10"
warn_return_any = false
warn_unused_ignores = false
no_implicit_optional = false
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"rdkit.*",
"datamol.*",
"molfeat.*",
"dpu_utils.*",
"themap.models.otdd.*",
"tests.*",
# Third-party libraries without stubs
"yaml",
"pandas",
"scipy.*",
"tqdm.*",
"seaborn",
"requests",
"chembl_webresource_client.*",
"esm.*",
"joblib",
"adjustText",
"munkres",
"sklearn.*",
"geomloss",
"ot.*",
"cupy.*",
"Bio.*",
"torch.*",
"tensorboard.*",
]
ignore_missing_imports = true
ignore_errors = false
[[tool.mypy.overrides]]
module = [
"themap.metalearning.*",
# Modules with complex type issues that would require significant refactoring
"themap.data.converter",
"themap.data.torch_dataset",
"themap.features.cache",
"themap.pipeline.output",
"themap.pipeline.runner",
"themap.pipeline.cli",
]
ignore_errors = true