-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
191 lines (179 loc) · 5.98 KB
/
pyproject.toml
File metadata and controls
191 lines (179 loc) · 5.98 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "intersect-orchestrator"
version = "0.1.4"
description = "Executor of INTERSECT campaigns"
classifiers = ["Private :: Do Not Upload"]
authors = [
{ name = "Lance Drane", email = "dranelt@ornl.gov" },
{ name = "Marshall McDonnell", email = "mcdonnellmt@ornl.gov" },
]
requires-python = ">=3.12,<4.0"
#license = { text = "BSD-3-Clause" }
dependencies = [
"asgi-correlation-id>=4.3.4",
"fastapi>=0.115.12",
"graphviz>=0.21",
"httpx>=0.28.1",
"intersect-sdk-common==0.9.5",
"jsonschema>=4.25.1",
"minio>=7.2.15",
"paho-mqtt>=2.1.0",
"pika>=1.3.2",
"prefect>=3.6.16",
"pydantic-settings>=2.8.1",
"python-multipart>=0.0.20",
"pyyaml>=6.0.3",
"retrying>=1.4.2",
"snakes>=0.9.33",
"sse-starlette>=3.0.2",
"structlog>=25.2.0",
"uvicorn[standard]>=0.34.2",
"websockets>=15.0.1",
]
[project.optional-dependencies]
mongo = [
"pymongo>=4.11.1",
]
postgres = [
"psycopg[binary]>=3.3.2",
]
[tool.hatch.build.targets.wheel]
packages = ["src/intersect_orchestrator"]
[dependency-groups]
dev = [
"codespell>=2.4.1",
"mongomock>=4.3.0",
"mypy>=1.15.0",
"pre-commit>=4.2.0",
"pytest>=8.3.5",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.1.0",
"ruff==0.15.4",
"pytest-postgresql>=8.0.0",
]
[tool.ruff]
line-length = 100
format = { quote-style = 'single' }
exclude = [
"concepts/**",
"services/**",
]
[tool.ruff.lint]
isort = { known-first-party = ['src'] }
pydocstyle = { convention = 'google' }
flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'double' }
mccabe = { max-complexity = 20 }
pylint = { max-args = 10, max-branches = 20, max-returns = 10, max-statements = 75 }
dummy-variable-rgx = '^(request)$' # permit "request" to be a variable name for FastAPI, even if not directly used
# pyflakes and the relevant pycodestyle rules are already configured
extend-select = [
'C90', # mccabe complexity
'I', # isort
'N', # pep8-naming
'UP', # pyupgrade
'YTT', # flake8-2020
'ANN', # flake8-annotations
'ASYNC', # flake8-async
'S', # flake8-bandit
'BLE', # flake8-blind-except
'B', # flake8-bugbear
'A', # flake8-builtins
'COM', # flake8-commas
'C4', # flake8-comprehensions
'DTZ', # flake8-datetimez
'T10', # flake8-debugger
'EM', # flake8-error-message
'FA', # flake8-future-annotations
'ISC', # flake8-implicit-string-concat
'ICN', # flake8-import-conventions
'G', # flake8-logging-format
'INP', # flake8-no-pep420
'PIE', # flake8-PIE
'T20', # flake8-T20
'PYI', # flake8-pyi
'PT', # flake8-pytest-style
'Q', # flake8-quotes
'RSE', # flake8-raise
'RET', # flake8-return
'SLF', # flake8-self
'SLOT', # flake8-slots
'SIM', # flake8-simplify
'TCH', # flake8-type-checking
'ARG', # flake8-unused-arguments
'PTH', # flake8-use-pathlib
'PGH', # pygrep-hooks
'PL', # pylint
'TRY', # tryceratops
'FLY', # flynt
'RUF', # RUFF additional rules
'FAST', # FastAPI
]
# If you're seeking to disable a rule, first consider whether the rule is overbearing, or if it should only be turned off for your usecase.
ignore = [
'COM812', # formatter, handled by Ruff format
'ISC001', # formatter, handled by Ruff format
'SIM105', # "with contextlib.suppress():" is slower than try-except-pass
'ANN401', # allow explicit "Any" typing, use with care
'PLR2004', # allow "magic numbers"
'RET504', # allow "unnecessary" assignments to variables before return statements
]
[tool.ruff.lint.extend-per-file-ignores]
'__init__.py' = ['F401'] # __init__.py commonly has unused imports
'docs/*' = [
'D', # the documentation folder does not need documentation
'INP001', # docs are not a namespace package
]
'src/intersect_orchestrator/app/*' = [
'INP001', # not a namespace package
]
'tests/*' = [
'S101', # allow assert statements in tests
'S106', # don't care about credentials in tests
'S311', # don't care about cryptographic security in tests
'SLF001', # allow private member access in tests
'ANN', # tests in general don't need types, unless they are runtime types.
'ARG', # allow unused parameters in tests
'D', # ignore documentation in tests
'FA100', # tests frequently use runtime typing annotations
]
# see https://mypy.readthedocs.io/en/stable/config_file.html for a complete reference
[tool.mypy]
strict = true
ignore_missing_imports = true # don't require typing for library stubs if they don't exist
disallow_untyped_decorators = false # this is needed for library decorator compatibility, i.e. "retrying"
plugins = ["pydantic.mypy"]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[tool.pytest.ini_options]
log_cli = true
addopts = "-ra"
asyncio_mode = "auto"
markers = [
"integration: mark test as an integration test",
"unit: mark test as a unit test",
"asyncio: mark test as an async test",
]
[tool.coverage.report]
omit = [
'*__init__*', # __init__ files should just re-export other classes and functions
]
exclude_also = [
'pragma: no-cover', # standard
'if (typing\\.)?TYPE_CHECKING:', # type checking blocks are not executed in coverage, but we don't care
'@(abc\\.)?abstractmethod', # don't try to cover abstract methods
"class .*\\bProtocol\\):", # don't cover protocol classes (similar to abstract classes)
'raise NotImplementedError', # it's not implemented so shouldn't be covered
'except.* ImportError', # these are usually used to throw a "friendlier" error and are not really worth testing
]
[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git*,*.lock,.venv,.*cache/*,*.min.*'
check-hidden = true
# ignore-regex = ''
# ignore-words-list = ''