-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
137 lines (125 loc) · 4.25 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
[project]
name = "dragonfly-mainframe"
description = "Distributes tasks to dragonfly-clients and handles package status updates."
authors = [
{ name = "Vipyr Security Developers", email = "[email protected]" },
]
requires-python = ">=3.12,<3.13"
license = { text = "MIT" }
dependencies = [
"alembic==1.13.2",
"asgi-correlation-id==4.3.1",
"dragonfly-logging-config @ git+https://github.com/vipyrsec/[email protected]",
"fastapi-pagination>=0.12.25",
"fastapi-slim==0.112.0",
"httpx==0.27.0",
"letsbuilda-pypi @ git+https://github.com/vipyrsec/letsbuilda-pypi@c721bdf726324e808ef1dd9983d0fe7896c4c3fd",
"psycopg2-binary==2.9.9",
"pydantic-settings==2.3.4",
"pyjwt[crypto]==2.8.0",
"python-dotenv==1.0.1",
"sentry-sdk==2.11.0",
"SQLAlchemy==2.0.31",
"structlog-sentry==2.1.0",
"structlog==24.4.0",
"uvicorn[standard]==0.30.3",
"prometheus-client>=0.21.0",
"prometheus-fastapi-instrumentator>=7.0.0",
]
dynamic = ["version"]
[project.urls]
repository = "https://github.com/vipyrsec/dragonfly-mainframe/"
documentation = "https://docs.vipyrsec.dev/dragonfly-mainframe/"
[tool.pdm]
version = { source = "file", path = "src/mainframe/__init__.py" }
[tool.pdm.dev-dependencies]
docs = ["furo", "releases", "sphinx", "sphinx-autoapi"]
lint = ["pre-commit==3.7.1", "pyright==1.1.373", "ruff==0.5.5"]
logs = ["rich==13.7.1"]
test = ["coverage==7.6.0", "pytest==8.3.2"]
[tool.pdm.scripts]
format = { shell = "ruff format" }
lint = { shell = "pyright; ruff check ." }
test = { shell = "docker compose -f compose.yaml -f compose-tests.yaml up --build --exit-code-from mainframe" }
coverage = { shell = "coverage run -m pytest tests -vv && coverage report -m --skip-covered && coverage xml" }
precommit = { shell = "pre-commit run --all-files" }
all = { composite = ["format", "lint", "test"] }
start = { cmd = "docker compose up --build" }
[tool.ruff]
line-length = 120
[tool.pyright]
include = ["src/**/*.py"]
ignore = ["alembic/"]
venvPath = "."
venv = ".venv"
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
analyzeUnannotatedFunctions = true
strictParameterNoneValue = true
enableTypeIgnoreComments = true
reportMissingModuleSource = "warning"
reportMissingImports = "error"
reportUndefinedVariable = "error"
reportAssertAlwaysTrue = "error"
reportInvalidStringEscapeSequence = "error"
reportInvalidTypeVarUse = "error"
reportMissingTypeStubs = "none"
reportSelfClsParameterName = "error"
reportUnsupportedDunderAll = "error"
reportUnusedExpression = "error"
reportWildcardImportFromLibrary = "error"
reportGeneralTypeIssues = "error"
reportOptionalSubscript = "error"
reportOptionalMemberAccess = "error"
reportOptionalCall = "error"
reportOptionalIterable = "error"
reportOptionalContextManager = "error"
reportOptionalOperand = "error"
reportTypedDictNotRequiredAccess = "error"
reportPrivateImportUsage = "error"
reportUnboundVariable = "error"
reportUnusedCoroutine = "error"
reportConstantRedefinition = "error"
reportDeprecated = "error"
reportDuplicateImport = "error"
reportFunctionMemberAccess = "error"
reportIncompatibleMethodOverride = "error"
reportIncompatibleVariableOverride = "error"
reportIncompleteStub = "error"
reportInconsistentConstructor = "error"
reportInvalidStubStatement = "error"
reportMatchNotExhaustive = "error"
reportMissingParameterType = "error"
reportMissingTypeArgument = "error"
reportOverlappingOverload = "error"
reportPrivateUsage = "error"
reportTypeCommentUsage = "error"
reportUnknownArgumentType = "error"
reportUnknownLambdaType = "error"
reportUnknownMemberType = "error"
reportUnknownParameterType = "error"
reportUnknownVariableType = "error"
reportUnnecessaryCast = "error"
reportUnnecessaryComparison = "error"
reportUnnecessaryContains = "error"
reportUnnecessaryIsInstance = "error"
reportUnusedClass = "error"
reportUnusedImport = "error"
reportUnusedFunction = "error"
reportUnusedVariable = "error"
reportUntypedBaseClass = "error"
reportUntypedClassDecorator = "error"
reportUntypedFunctionDecorator = "error"
reportUntypedNamedTuple = "error"
[tool.coverage.run]
branch = false
omit = [
"__pypackages__/*",
"src/mainframe/custom_exceptions.py",
"src/mainframe/database.py",
"src/mainframe/dependencies.py",
"src/mainframe/json_web_token.py",
]
[tool.coverage.report]
fail_under = 100