-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
196 lines (175 loc) · 5.13 KB
/
pyproject.toml
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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
requires-python = ">=3.10"
version = "0.0.1"
name = "predict-drug-target"
description = "This project uses ESM2 protein embeddings and MolecularTransformer drug embeddings to train a linear classifier to predict potential drug-targets interactions."
readme = "README.md"
license = { file = "LICENSE.txt" }
authors = [
{ name = "Michel Dumontier", email = "[email protected]" },
]
maintainers = [
{ name = "Michel Dumontier", email = "[email protected]" },
{ name = "Vincent Emonet", email = "[email protected]" },
]
keywords = [
"Python",
"Classifier",
"Embeddings",
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]
dependencies = [
# "trapi-predict-kit[web] >=0.2.3",
"trapi-predict-kit[web] @ git+https://github.com/MaastrichtU-IDS/trapi-predict-kit.git",
"MolecularTransformerEmbeddings @ git+https://github.com/vemonet/MolecularTransformerEmbeddings.git",
"fair-esm",
"bio",
"scipy",
"torch",
"matplotlib",
"scikit-learn",
"xgboost",
"ipykernel",
"numpy",
"requests",
"qdrant-client",
"PubChemPy",
"typer",
# NOTE: bug in 1.6.1
"linkml-runtime ==1.6.0",
"opentelemetry-sdk",
"opentelemetry-exporter-otlp-proto-http",
"opentelemetry-exporter-jaeger",
"opentelemetry-instrumentation-fastapi",
"opentelemetry-instrumentation-httpx",
"opentelemetry-instrumentation-requests",
]
[project.optional-dependencies]
test = [
"pytest >=7.1.3",
"pytest-cov >=3.0.0",
"coverage",
"mypy >=0.991",
"ruff",
"black",
"pip-tools",
"reasoner_validator",
"types-requests",
]
[project.scripts]
predict-dt = "src.predict_drug_target.__main__:cli"
[project.urls]
Homepage = "https://github.com/MaastrichtU-IDS/predict-drug-target"
Documentation = "https://github.com/MaastrichtU-IDS/predict-drug-target"
History = "https://github.com/MaastrichtU-IDS/predict-drug-target/releases"
Tracker = "https://github.com/MaastrichtU-IDS/predict-drug-target/issues"
Source = "https://github.com/MaastrichtU-IDS/predict-drug-target"
# ENVIRONMENTS AND SCRIPTS
[tool.hatch.envs.default]
features = [
"test",
]
[tool.hatch.envs.default.scripts]
train = "python3 src/predict_drug_target/train.py {args}"
predict = "python3 src/predict_drug_target/predict.py {args}"
api = "uvicorn src.predict_drug_target.api:app --host 0.0.0.0 --reload {args}"
fmt = [
"black src/",
"ruff src/ --fix",
]
test = [
# "fmt",
"pytest {args}",
# "mypy",
]
cov = [
"fmt",
"pytest --cov-report html {args}",
"python -c 'import webbrowser; webbrowser.open(\"http://0.0.0.0:3000\")'",
"python -m http.server 3000 --directory ./htmlcov",
]
requirements = "pip-compile -o requirements.txt pyproject.toml"
# TOOLS
[tool.hatch.build.targets.wheel]
packages = ["src/predict_drug_target"]
[tool.hatch.metadata]
allow-direct-references = true
[tool.mypy]
files = ["src/"]
strict = false
implicit_reexport = true
follow_imports = "normal"
ignore_missing_imports = true
pretty = true
show_column_numbers = true
warn_no_return = true
warn_unused_ignores = true
warn_redundant_casts = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_any_generics = false
[tool.pytest.ini_options]
addopts = [
"-vvv",
# "--cov=src",
# "--color=yes",
# "--cov-report=term-missing",
]
filterwarnings = [
"ignore::DeprecationWarning:httpx.*:"
]
[tool.black]
color = true
line-length = 120
target-version = ['py310']
skip-string-normalization = false
# https://github.com/charliermarsh/ruff#supported-rules
[tool.ruff]
src = ["src", "tests"]
target-version = "py310"
line-length = 120
select = [
"I", # isort
"N", # pep8-naming
"S", # bandit
"A", # flake8-builtins
"YTT", # flake8-2020
"B", # flake8-bugbear
"C", # flake8-comprehensions
"ICN", # flake8-import-conventions
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"Q", # flake8-quotes
# "FBT", # flake8-boolean-trap
"F", # pyflakes
"UP", # pyupgrade
"E", # pycodestyle errors
"W", # pycodestyle warnings
"PLC", # pylint convention
"PLE", # pylint error
# "PLR", # pylint refactor Magic value used in comparison, consider replacing 400 with a constant variable
"PLW", # pylint warning
"RUF", # ruff specific
"T",
]
ignore = [
"E501", # line too long
"B008", # do not perform function calls in argument defaults
"B006", # do not use mutable data structures for argument defaults
"C901", # too complex
"S101", # Use of `assert` detected
"S301", # `pickle` and modules that wrap it can be unsafe
"T201", "T203", # remove print and pprint
"S105", # Potential password
"PLR0913", "PLR0912", "PLR0915", # Too many branches/statements/arguments to function call
"A002", "A003", # Argument/Class attribute `type` is shadowing a Python builtin
]
[tool.ruff.per-file-ignores]
"__init__.py" = ["I", "F401"] # module imported but unused