Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

pyproject.toml 5.9 KB

You have to be logged in to leave a comment. Sign In
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
  1. [build-system]
  2. requires = ["hatchling"]
  3. build-backend = "hatchling.build"
  4. [project]
  5. requires-python = ">=3.7"
  6. name = "openpredict"
  7. description = "A package to help serve predictions of biomedical concepts associations as Translator Reasoner API."
  8. readme = "README.md"
  9. license = { file = "LICENSE.txt" }
  10. authors = [
  11. { name = "Remzi ร‡elebi", email = "r.celebi@maastrichtuniversity.nl" },
  12. { name = "Vincent Emonet", email = "vincent.emonet@gmail.com" },
  13. { name = "Arif Yilmaz" },
  14. { name = "Elif" },
  15. ]
  16. keywords = [
  17. "Python",
  18. "Biomedical Data Translator",
  19. "TRAPI",
  20. "Predictions"
  21. ]
  22. classifiers = [
  23. "License :: OSI Approved :: MIT License",
  24. "Operating System :: OS Independent",
  25. "Programming Language :: Python :: 3.8",
  26. "Programming Language :: Python :: 3.9",
  27. "Programming Language :: Python :: 3.10",
  28. ]
  29. dynamic = ["version"]
  30. dependencies = [
  31. "numpy",
  32. "pandas",
  33. "scikit-learn",
  34. "gensim", # For word2vec
  35. "scipy ==1.10.1", # https://stackoverflow.com/questions/78279136/importerror-cannot-import-name-triu-from-scipy-linalg-gensim
  36. "requests >=2.23.0",
  37. "rdflib >=6.1.1",
  38. "SPARQLWrapper >=2.0.0,<3.0.0",
  39. "reasoner-pydantic >=4.1.4",
  40. # "trapi-predict-kit[web,opentelemetry] >=0.2.3",
  41. "trapi-predict-kit[web,opentelemetry] @ git+https://github.com/MaastrichtU-IDS/trapi-predict-kit.git",
  42. # "trapi-predict-kit @ {root:uri}/trapi-predict-kit",
  43. "predict-drug-target @ git+https://github.com/MaastrichtU-IDS/predict-drug-target.git", # Uncomment for prod
  44. # "predict-drug-target", # Uncomment if you want to run locally in dev
  45. # "predict-drug-target @ {root:uri}/predict-drug-target",
  46. ]
  47. [project.optional-dependencies]
  48. train = [
  49. # Dependencies to train the original OpenPredict drug-disease model
  50. "numpy ==1.16.1", # requires python 3.8
  51. "pandas ==1.1.1",
  52. "torch ==1.13.1",
  53. "networkx",
  54. "gensim ==3.8.3",
  55. "scipy ==1.5.4",
  56. # scipy ==0.19.1
  57. ## Cannot update to numpy1.16.5 because it requires werkzeug>=2.0
  58. # numpy ==1.16.5
  59. # werkzeug >=2.0
  60. "cython ==0.29.32",
  61. "pyspark ==3.1.1",
  62. # "findspark",
  63. "scikit-learn ==0.23.1",
  64. "shap ==0.41.0",
  65. "matplotlib ==3.4.3",
  66. "pyRDF2vec ==0.0.5",
  67. "python-multipart >=0.0.5",
  68. "kgx",
  69. ]
  70. test = [
  71. "pytest",
  72. "pytest-cov",
  73. "httpx",
  74. "typer >=0.7.0",
  75. "pre-commit >=3.2.0",
  76. "dvc >=2.38.1",
  77. "pip-tools",
  78. "types-requests",
  79. ]
  80. test-prod = [
  81. # Cannot be installed on python 3.8
  82. "reasoner-validator >=3.9.0",
  83. ]
  84. doc = [
  85. "mkdocs >=1.4.2",
  86. "mkdocs-material >=8.2.7",
  87. "mkdocstrings[python] >=0.19.1",
  88. "mdx-include >=1.4.1",
  89. "mkdocs-markdownextradata-plugin >=0.2.5",
  90. ]
  91. [project.urls]
  92. Homepage = "https://github.com/MaastrichtU-IDS/translator-openpredict"
  93. Documentation = "https://github.com/MaastrichtU-IDS/translator-openpredict"
  94. History = "https://github.com/MaastrichtU-IDS/translator-openpredict/releases"
  95. Tracker = "https://github.com/MaastrichtU-IDS/translator-openpredict/issues"
  96. Source = "https://github.com/MaastrichtU-IDS/translator-openpredict"
  97. # [tool.hatch.build.targets.wheel]
  98. # packages = ["src/openpredict"]
  99. # [project.scripts]
  100. # openpredict = "openpredict.__main__:main"
  101. # HATCH CONFIG: ENVS AND SCRIPTS
  102. [tool.hatch.envs.default]
  103. features = [
  104. "test",
  105. "test-prod",
  106. "doc",
  107. # "train",
  108. ]
  109. post-install-commands = [
  110. "pre-commit install",
  111. "dvc pull"
  112. ]
  113. # type = "container"
  114. # image = "ghcr.io/maastrichtu-ids/openpredict-api:0.1.0"
  115. # command = ["/bin/sleep", "infinity"]
  116. # start-on-creation = false
  117. # NOTE: we can't run training and integration out of docker (require python 3.8)
  118. [tool.hatch.envs.default.scripts]
  119. dev = "uvicorn src.trapi.main:app --reload --log-level debug"
  120. docs = "mkdocs serve -a localhost:8001 {args}"
  121. fmt = "pre-commit run --all --all-files"
  122. test-dev = "pytest tests/production {args}"
  123. test-ci = "pytest tests/production --server https://openpredict.ci.transltr.io {args}"
  124. test-prod = "pytest tests/production --server https://openpredict.transltr.io {args}"
  125. requirements = "pip-compile --extra dev --extra test --extra train -o requirements.txt pyproject.toml"
  126. requirements-test = "pip-compile --extra dev --extra test --extra test-prod -o requirements-tests.txt pyproject.toml"
  127. fix-permission = "sudo chown -R $(id -u):$(id -g) models data"
  128. # train = "python src/openpredict_model/train.py train-model"
  129. # TOOLS
  130. [tool.hatch.build.targets.wheel]
  131. packages = ["src/trapi", "src/openpredict_model", "src/drkg_model"]
  132. [tool.hatch.metadata]
  133. allow-direct-references = true
  134. [tool.hatch.version]
  135. path = "src/trapi/__init__.py"
  136. # [tool.coverage.run]
  137. # source = ["src/openpredict"]
  138. # branch = true
  139. # [tool.coverage.report]
  140. # omit = ["tests/*"]
  141. [tool.pytest.ini_options]
  142. addopts = [
  143. "-vvv",
  144. "--cov=src",
  145. "--color=yes",
  146. "--cov-report=term-missing",
  147. ]
  148. [tool.ruff]
  149. src = ["src", "tests"]
  150. target-version = "py38"
  151. line-length = 120
  152. select = [
  153. "A",
  154. "B", # flake8-bugbear
  155. "C", # flake8-comprehensions
  156. "E", # pycodestyle errors
  157. "F", # pyflakes
  158. # "FBT", # flake8-boolean-trap
  159. "I", # isort
  160. "ICN",
  161. "N",
  162. "PLC",
  163. "PLE",
  164. # "PLR", # Magic value used in comparison, consider replacing the str with a constant variable
  165. "PLW",
  166. "Q",
  167. "RUF",
  168. "S",
  169. "SIM",
  170. "T",
  171. "TID",
  172. "UP",
  173. "W", # pycodestyle warnings
  174. "YTT",
  175. ]
  176. ignore = [
  177. "Q000", # no single quotes
  178. "N806", "N802", "N803", # lowercase variables
  179. "E501", # line too long
  180. "B008", # do not perform function calls in argument defaults
  181. "B006", # do not use mutable data structures for argument defaults
  182. "C901", # too complex
  183. "S101", # Use of `assert` detected
  184. "T201", "T203", # remove print and pprint
  185. "A003", # Class attribute `type` is shadowing a python builtin
  186. "SIM118", # dont use .keys()
  187. ]
  188. [tool.ruff.per-file-ignores]
  189. "__init__.py" = [ "I", "F401" ]
  190. [tool.ruff.isort]
  191. known-third-party = ["trapi_predict_kit"]
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...