-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
334 lines (296 loc) · 11.6 KB
/
pyproject.toml
File metadata and controls
334 lines (296 loc) · 11.6 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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
[project]
name = "pipelex-api"
version = "0.0.12"
description = "Pipelex API"
authors = [{ name = "Evotis S.A.S.", email = "oss@pipelex.com" }]
maintainers = [{ name = "Pipelex staff", email = "oss@pipelex.com" }]
license = "MIT"
readme = "README.md"
requires-python = ">=3.11,<4.0"
classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
]
dependencies = [
"pipelex[mistralai,anthropic,google,google-genai,bedrock,fal]==0.18.0",
"fastapi>=0.118.0",
"pyjwt>=2.10.1",
"uvicorn>=0.37.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project.urls]
Homepage = "https://pipelex.com"
Repository = "https://github.com/Pipelex/pipelex-api"
Documentation = "https://docs.pipelex.com/pages/api/"
Changelog = "https://github.com/Pipelex/pipelex-api/blob/main/CHANGELOG.md"
[project.optional-dependencies]
dev = [
"boto3-stubs>=1.35.24",
"mypy>=1.11.2",
"pyright>=1.1.405",
"pandas-stubs>=2.2.3.241126",
"pylint>=3.3.8",
"pytest>=8.3.3",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.1.1",
"pytest-mock>=3.14.0",
"pytest-sugar>=1.0.0",
"pytest-xdist>= 3.6.1",
"ruff>=0.6.8",
"types-aioboto3[bedrock,bedrock-runtime]>=13.4.0",
"types-aiofiles>=24.1.0.20240626",
"types-beautifulsoup4>=4.12.0.20240907",
"types-markdown>=3.6.0.20240316",
"types-networkx>=3.3.0.20241020",
"types-openpyxl>=3.1.5.20250306",
"types-requests>=2.32.0.2024091",
"types-PyYAML>=6.0.12.20250326",
"types-toml>=0.10.8.20240310",
]
docs = [
"mkdocs==1.6.1",
"mkdocs-glightbox==0.4.0",
"mkdocs-material==9.6.14",
"mkdocs-meta-manager==1.1.0",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["api"]
[tool.uv]
required-version = ">=0.7.2"
[tool.mypy]
check_untyped_defs = true
exclude = "^.*\\.venv/.*$"
mypy_path = "."
packages = ["api", "tests"]
plugins = ["pydantic.mypy"]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
[[tool.mypy.overrides]]
ignore_missing_imports = true
module = ["api", "tests"]
[tool.pyright]
pythonVersion = "3.11"
include = ["api", "tests"]
exclude = ["**/__pycache__", ".venv", ".git", "build", "dist"]
analyzeUnannotatedFunctions = true
deprecateTypingAliases = false
disableBytesTypePromotions = true
enableExperimentalFeatures = false
enableTypeIgnoreComments = true
extraPaths = ["./tests"]
reportAbstractUsage = "error"
reportArgumentType = "error"
reportAssertAlwaysTrue = "error"
reportAssertTypeFailure = "error"
reportAssignmentType = "error"
reportAttributeAccessIssue = "error"
reportCallInDefaultInitializer = true
reportCallIssue = "error"
reportConstantRedefinition = "error"
reportDeprecated = "error"
reportDuplicateImport = "error"
reportFunctionMemberAccess = "error"
reportGeneralTypeIssues = "error"
reportImplicitOverride = true
reportImplicitStringConcatenation = false
reportImportCycles = true
reportIncompatibleMethodOverride = "error"
reportIncompatibleVariableOverride = "error"
reportIncompleteStub = "error"
reportInconsistentConstructor = "error"
reportInconsistentOverload = "error"
reportIndexIssue = "error"
reportInvalidStringEscapeSequence = "error"
reportInvalidStubStatement = "error"
reportInvalidTypeArguments = "error"
reportInvalidTypeForm = "error"
reportInvalidTypeVarUse = "error"
reportMatchNotExhaustive = "error"
reportMissingImports = "error"
reportMissingModuleSource = "warning"
reportMissingParameterType = "error"
reportMissingSuperCall = "none"
reportMissingTypeArgument = "error"
reportMissingTypeStubs = false
reportNoOverloadImplementation = "error"
reportOperatorIssue = "error"
reportOptionalCall = "error"
reportOptionalContextManager = "error"
reportOptionalIterable = "error"
reportOptionalMemberAccess = "error"
reportOptionalOperand = "error"
reportOptionalSubscript = "error"
reportOverlappingOverload = "error"
reportPossiblyUnboundVariable = "error"
reportPrivateImportUsage = "error"
reportPrivateUsage = "error"
reportPropertyTypeMismatch = true
reportRedeclaration = "error"
reportReturnType = "error"
reportSelfClsParameterName = "error"
reportTypeCommentUsage = "error"
reportTypedDictNotRequiredAccess = "error"
reportUnboundVariable = "error"
reportUndefinedVariable = "error"
reportUninitializedInstanceVariable = "none"
reportUnknownArgumentType = "error"
reportUnknownLambdaType = "error"
reportUnknownMemberType = "error"
reportUnknownParameterType = "error"
reportUnknownVariableType = "error"
reportUnnecessaryCast = "error"
reportUnnecessaryComparison = "error"
reportUnnecessaryContains = "error"
reportUnnecessaryIsInstance = "error"
reportUnnecessaryTypeIgnoreComment = "none"
reportUnsupportedDunderAll = "error"
reportUntypedBaseClass = "error"
reportUntypedClassDecorator = "error"
reportUntypedFunctionDecorator = "error"
reportUntypedNamedTuple = "error"
reportUnusedCallResult = "none"
reportUnusedClass = "error"
reportUnusedCoroutine = "error"
reportUnusedExcept = "error"
reportUnusedExpression = "error"
reportUnusedFunction = "error"
reportUnusedImport = "none"
reportUnusedVariable = "error"
reportWildcardImportFromLibrary = "error"
strictDictionaryInference = true
strictListInference = true
strictParameterNoneValue = true
strictSetInference = true
typeCheckingMode = "strict"
[tool.pytest.ini_options]
addopts = "--import-mode=importlib -ra -m 'not gha_disabled'"
asyncio_default_fixture_loop_scope = "session"
markers = ["gha_disabled: tests that should not run in GitHub Actions"]
minversion = "8.0"
xfail_strict = true
[tool.coverage.run]
source = ["api"]
omit = ["tests/*", "**/__init__.py"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"pass",
"raise ImportError",
]
[tool.ruff]
exclude = [
".cursor",
".git",
".github",
".mypy_cache",
".ruff_cache",
".venv",
".vscode",
"trigger_pipeline",
]
line-length = 150
target-version = "py311"
[tool.ruff.format]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN201", # Missing return type annotation for public function `my_func`
"ANN202", # Missing return type annotation for private function `my_func`
"ANN204", # Missing return type annotation for special method `my_func`
"ANN206", # Missing return type annotation for classmethod `my_func`
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `...`
"ASYNC230", # Async functions should not open files with blocking methods like `open`
"C901", # Is to complex
"COM812", # Checks for the absence of trailing commas.
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D205", # 1 blank line required between summary line and description
"D400", # First line should end with a period
"D401", # First line of docstring should be in imperative mood: "My docstring...."
"D404", # First word of the docstring should not be "This"
"D415", # First line should end with a period, question mark, or exclamation point
"DTZ001", # `datetime.datetime()` called without a `tzinfo` argument
"DTZ005", # `datetime.datetime.now()` called without a `tz` argument
"ERA001", # Found commented-out code
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument in function definition
"FBT003", #Boolean positional value in function call
"FIX002", # Line contains TODO, consider resolving the issue
"PLC0105", # `TypeVar` name "SomethingType" does not reflect its covariance; consider renaming it to "SomethingType_co"
"PLR0911", # Too many return statements (/6)
"PLR0912", # Too many branches (/12)
"PLR0913", # Too many arguments in function definition (/5)
"PLR0915", # Too many statements (/50)
"PLR2004", # Magic value used in comparison, consider replacing `2` with a constant variable
"PT013", # Incorrect import of `pytest`; use `import pytest` instead
"PTH100", # `os.path.abspath()` should be replaced by `Path.resolve()`
"PTH103", # `os.makedirs()` should be replaced by `Path.mkdir(parents=True)`
"PTH107", # `os.remove()` should be replaced by `Path.unlink()`
"PTH109", # `os.getcwd()` should be replaced by `Path.cwd()`
"PTH118", # `os.path.join()` should be replaced by `Path` with `/` operator
"PTH120", # `os.path.dirname()` should be replaced by `Path.parent`
"PTH110", # `os.path.exists()` should be replaced by `Path.exists()`
"PTH112", # `os.path.isdir()` should be replaced by `Path.is_dir()`
"PTH119", # `os.path.basename()` should be replaced by `Path.name`
"PTH123", # `open()` should be replaced by `Path.open()`
"PTH208", # Use `pathlib.Path.iterdir()` instead.
"PYI051", # `Literal["auto"]` is redundant in a union with `str`
"RET505", # superfluous-else-return
"RUF001", # String contains ambiguous `′` (PRIME). Did you mean ``` (GRAVE ACCENT)?
"RUF003", # Comment contains ambiguous `’` (RIGHT SINGLE QUOTATION MARK). Did you mean ``` (GRAVE ACCENT)?
"SIM105", # Use `contextlib.suppress(ValueError)` instead of `try`-`except`-`pass`
"SIM108", # Use ternary operator `description = func.__doc__.strip().split("\n")[0] if func.__doc__ else func.__name__` instead of `if`-`else`-block
"S101", # Use of `assert` detected
"S102", # Use of `exec` detected
"S106", # Possible hardcoded password assigned to argument: "secret"
"S105", # Possible hardcoded password assigned to: "child_secret"
"TD002", # Missing author in TODO; try: `# TODO(<author_name>): ...` or `# TODO @<author_name>: ...`
"TD003", # Missing issue link for this TODO
"T201", # `print` found
# TODO: stop ignoring these rules
"BLE001", # Do not catch blind exception: `Exception`
"B027", # Checks for empty methods in abstract base classes without an abstract decorator.
"UP007", # Use `X | Y` for type annotations
"UP036", # Version block is outdated for minimum Python version
"SIM102", # Use a single `if` statement instead of nested `if` statements
"S701", # Using jinja2 templates with `autoescape=False` is dangerous and can lead to XSS. Ensure `autoescape=True` or use the `select_autoescape` function.
"N818", # Exception name `RootException` should be named with an Error suffix
"TRY301", # Abstract `raise` to an inner function
"PERF401", # Use a list comprehension to create a transformed list
"PLW2901", # `for` loop variable `line` overwritten by assignment target
"TRY300", # Consider moving this statement to an `else` block
"UP035", # `typing.List` is deprecated, use `list` instead
"RET503", # Missing explicit `return` at the end of function able to return non-`None` value
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"T201", # Allow print statements in test files
"INP001", # Allow test files to not have __init__.py in their directories (avoids namespace collisions)
]
[tool.pylint.main]
py-version = "3.11"
reports = false
[tool.pylint.messages_control]
disable = ["all"]
enable = [
"W0101", # Unreachable code: Used when there is some code behind a "return" or "raise" statement, which will never be accessed.
]
ignore = [".venv", "__pycache__", "build", "dist", ".git"]