-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
150 lines (129 loc) · 3.36 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
[project]
name = "smo"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [
{ name = "Stefane Fermigier", email = "sf@abilian.com" }
]
requires-python = ">=3.10"
dependencies = [
"flask>=3.1.0",
"werkzeug>=3.1.3",
"flasgger>=0.9.7.1",
# Persistence
"sqlalchemy>=2.0.36",
"flask-sqlalchemy>=3.1.1",
"psycopg2-binary>=2.9.10",
# Other libraries
"gurobipy>=12.0.0",
"kubernetes>=31.0.0",
"python-dotenv>=1.0.1",
"pyyaml>=6.0.2",
"requests>=2.32.3",
# Unneeded?
# "google-auth>=2.36.0",
# "pyasn1>=0.6.1",
# "python-dateutil>=2.9.0.post0",
# "rsa>=4.9",
# "websocket-client>=1.8.0",
# Temp
"devtools>=0.12.2",
"alembic>=1.14.0",
]
[project.scripts]
smo = "smo.cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
# Basic tools
"abilian-devtools>=0.7.4",
# Testing addons
"coverage>=7.6.7",
# Formatting addons
"docformatter>=1.7.5",
# Runtime type checking
"typeguard>=4.4.1",
"beartype>=0.19.0",
"pytest-beartype>=0.2.0",
# Type hints
"types-pyyaml>=6.0.12.20240917",
"types-requests>=2.32.0.20241016",
# Architecture layering testing
"pytest-archon>=0.0.6",
# SBOM generation
"cyclonedx-bom>=4.6.1",
"lbom>=0.6",
"sbom4python>=0.11.3",
"spdx-tools>=0.8.3",
]
# -----------------------------------------------------------------------------
[tool.pytest]
python_files = "test_*.py *_test.py tests.py"
[tool.pytest.ini_options]
addopts = "--disable-warnings --disable-pytest-warnings --ignore=src/app/sandbox/ --tb=short --doctest-modules"
filterwarnings = [
'ignore:.*contextfunction.*:DeprecationWarning',
'ignore:.*Unmanaged.*:sqlalchemy.exc.SAWarning',
]
testpaths = ["tests", "src"]
# -----------------------------------------------------------------------------
[tool.pyanalyze]
paths = ["src/"]
import_paths = ["."]
# -----------------------------------------------------------------------------
[tool.deptry.per_rule_ignores]
# X defined as a dependency but not used in the codebase
DEP002 = [
# Used (implicitely) by SQLA
'psycopg2-binary',
'alembic',
]
# X imported but declared as a dev dependency
#DEP004 = []
# -----------------------------------------------------------------------------
[tool.pyright]
exclude = [
'.nox',
'tests',
'sandbox',
'doc',
'scripts',
'tmp',
]
include = ["src"]
# False positives
reportPrivateImportUsage = false
reportFunctionMemberAccess = false
# Enable later
reportGeneralTypeIssues = false
reportIncompatibleMethodOverride = false
reportIncompatibleVariableOverride = false
# -----------------------------------------------------------------------------
[tool.bandit]
skips = [
"B404", # blacklist
"B603", # subprocess_without_shell_equals_true
"B101", # assert_used
# FIXME later
"B311", # blacklist
]
exclude_dirs = [
"tests",
]
# -----------------------------------------------------------------------------
[tool.coverage.run]
# Not needed
# omit = ["tests/*.py", "**/test*.py", "**/*test.py"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
'pragma: no cover',
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
"raise AssertionError",
"raise NotImplementedError",
]