-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
242 lines (210 loc) · 4.72 KB
/
pyproject.toml
File metadata and controls
242 lines (210 loc) · 4.72 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
[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"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
"License :: OSI Approved :: MIT License",
]
dependencies = [
"numpy",
"pandas",
"matplotlib",
"seaborn",
"scikit-learn",
"dpu-utils>=0.2.13",
"rdkit",
"datamol",
"tqdm",
"adjustText",
"h5py",
"pytz",
"pydantic",
"chembl-webresource-client",
"biopython",
]
[project.optional-dependencies]
# Core ML functionality
ml = [
"torch==2.4.0",
"torchvision==0.22.1",
"torchaudio==2.4.0",
"molfeat==0.11.0",
"dgl<=2.0",
"dgllife>=0.3.2",
"pytorch_geometric",
"fcd_torch",
]
# Protein analysis
protein = [
"biopython",
"esm",
"sentence-transformers",
]
# Optimal transport distances
otdd = [
"torch==2.4.0",
"torchvision==0.22.1",
"torchaudio==2.4.0",
"pot",
"pykeops",
"geomloss",
"opentsne",
"munkres",
]
# All features
all = [
"torch==2.4.0",
"torchvision==0.22.1",
"torchaudio==2.4.0",
"molfeat==0.11.0",
"dgl<=2.0",
"dgllife>=0.3.2",
"pytorch_geometric",
"fcd_torch",
"biopython",
"esm",
"pot",
"pykeops",
"geomloss",
"opentsne",
"munkres",
"sentence-transformers",
]
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",
]
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"
[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"
[[tool.mypy.overrides]]
module = [
"rdkit.*",
"datamol.*",
"molfeat.*",
"dpu_utils.*",
"themap.models.otdd.*",
"tests.*",
]
ignore_missing_imports = true