-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
257 lines (216 loc) · 6.79 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
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
################################################################################
# Build Configuration
################################################################################
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "hatch-vcs"]
################################################################################
# Project Configuration
################################################################################
[project]
name = "data-orchestration"
description = "Transform and enrich the raw, curated openTECR data to produce suitable output formats."
authors = [
{ name = "openTECR Community", email = "moritz.beber@igdore.org" },
]
maintainers = [
{ name = "openTECR Community", email = "moritz.beber@igdore.org" },
]
license = "Apache-2.0"
readme = {"file" = "README.md", "content-type" = "text/markdown"}
requires-python = ">=3.12"
# Please consult https://pypi.org/classifiers/ for a full list.
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Typing :: Typed",
]
keywords = [
"thermodynamics",
"bioinformatics",
"openTECR",
"reactions",
"enzymes",
"equilibrium",
"database",
]
dynamic = ["version"]
dependencies = [
"dagster ~=1.7",
"dagster-cloud ~=1.7",
"dagster-pandera ~=0.23",
"httpx ~=0.27",
"openpyxl ~=3.1",
"pandas ~=2.2",
"pandera ~=0.20",
"polars ~=1.2",
"pyarrow ~=16.1",
"pydantic ~=2.8",
"zstandard ~=0.22",
]
[project.urls]
Homepage = "https://github.com/opentecr/data-orchestration"
"Source Code" = "https://github.com/opentecr/data-orchestration"
"Bug Tracker" = "https://github.com/opentecr/data-orchestration/issues"
[project.optional-dependencies]
dev = [
"hatch",
"pre-commit",
]
################################################################################
# Tool Configuration
################################################################################
[tool.dagster]
module_name = "data_orchestration"
[tool.hatch.build]
only-packages = true
[tool.hatch.build.targets.wheel]
packages = ["src/data_orchestration"]
[tool.hatch.build.hooks.vcs]
version-file = "src/data_orchestration/_version.py"
[tool.hatch.version]
source = "vcs"
[tool.black]
line-length = 88
target-version = ["py312"]
extend-exclude = '''
(
_version.py
)
'''
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = ["raises"]
[tool.coverage.paths]
source = [
"src/data_orchestration",
"*/site-packages/data_orchestration",
]
[tool.coverage.run]
branch = true
parallel = true
[tool.coverage.report]
exclude_lines = ["pragma: no cover"]
precision = 2
[tool.ruff]
line-length = 88
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"D107", # 'Missing docstring in __init__' ignored because pydoclint wants us to document the class instead.
"D203", # '1 blank line required before class docstring' ignored because we want no blank line.
"D212", # 'Multi-line docstring summary should start at the first line' ignored because we want the summary to start on the second line.
"D407", # 'Missing dashed underline after section' ignored because Google style docstrings don't underline.
"ANN002", # 'Missing type annotation for {*args} in method'.
"ANN003", # 'Missing type annotation for {*kwargs} in method'.
"ANN101", # 'Missing type annotation for {self} in method'.
"ANN102", # 'Missing type annotation for {cls} in classmethod'.
]
[tool.ruff.lint.extend-per-file-ignores]
"__init__.py" = [
"E401", # 'Multiple imports on one line'
"E402", # 'Module level import not at top of file'
"F401", # 'Imported but unused'
"I001", # 'Import block is un-sorted or un-formatted' ignored because we may have to import in a particular, not-alphabetical order.
]
"tests/**/*.py" = [
"S101", # 'Use of assert detected' ignored because we are using pytest.
"INP001", # 'Insecure input' ignored because we are testing.
"ANN201", # 'Missing type annotation for {return}' ignored because all tests return `None`.
]
[tool.ruff.lint.isort]
case-sensitive = true
known-first-party = ["src", "data_orchestration"]
lines-after-imports = 2
[tool.pydoclint]
style = "google"
arg-type-hints-in-docstring = false
check-return-types = false
check-yield-types = false
# TODO: Adjust mypy configuration.
#[tool.mypy]
#plugins = [
# "pydantic.mypy",
#]
# Stop mypy from complaining about missing types from imports.
#[[tool.mypy.overrides]]
#module = [
# "pandas",
#]
#ignore_missing_imports = true
#[tool.pydantic-mypy]
#init_forbid_extra = true
#init_typed = true
#warn_required_dynamic_aliases = true
################################################################################
# Hatch Environments
################################################################################
[tool.hatch.envs.dagster]
description = """Run a local dagster deployment and webserver."""
dependencies = [
"dagster-webserver ~=1.7",
]
[tool.hatch.envs.dagster.env-vars]
DAGSTER_HOME = "{root}/work"
[tool.hatch.envs.dagster.scripts]
run = "dagster dev"
[tool.hatch.envs.style]
description = """Check the style of the codebase."""
dependencies = [
"pydoclint",
"ruff",
]
detached = true
[tool.hatch.envs.style.scripts]
docstrings = "pydoclint"
code = "ruff check"
check = ["docstrings", "code"]
[tool.hatch.envs.safety]
description = """Check dependencies for security vulnerabilities."""
extra-dependencies = [
"safety",
]
[tool.hatch.envs.safety.scripts]
check = ["safety check --full-report"]
[tool.hatch.envs.types]
description = """Check the static types of the codebase."""
dependencies = [
"mypy",
"pandas-stubs",
]
[tool.hatch.envs.types.scripts]
check = "mypy src/data_orchestration"
[tool.hatch.envs.docs]
description = """Build or serve the documentation."""
extra-dependencies = [
"mkdocs-material ~=9.5",
"mkdocstrings[python] ~=0.24",
"mkdocs-awesome-pages-plugin ~=2.9",
]
[tool.hatch.envs.docs.scripts]
build = "mkdocs build --clean --strict"
serve = "mkdocs serve"
[tool.hatch.envs.test]
description = """Run the test suite."""
extra-dependencies = [
"pytest",
"pytest-cov",
"pytest-raises",
"pytest-randomly",
"pytest-xdist",
]
[[tool.hatch.envs.test.matrix]]
python = ["3.12"]
[tool.hatch.envs.test.scripts]
run = "pytest --cov=data_orchestration --cov-report=term-missing {args}"
[tool.hatch.envs.clean]
description = """Clean up assets."""
detached = true
[tool.hatch.envs.clean.scripts]
run = "find work -maxdepth 1 -not -name 'dagster.yaml' -not -name '.gitignore' -not -name work -exec rm -rf {{}} +"