-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathpyproject.toml
More file actions
212 lines (184 loc) · 5.9 KB
/
pyproject.toml
File metadata and controls
212 lines (184 loc) · 5.9 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
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "e3-core"
authors = [{name="AdaCore's IT Team"}]
dynamic = ["version"]
description = "E3 core. Tools and library for building and testing software"
readme = "README.md"
license = {text = "GPLv3"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Build Tools"
]
# Even if they are used by the pytest driver, the pytest and coverage
# dependencies are not installed by default. This is on purpose to avoid
# importing test/coverage packages in a release install.
dependencies = [
"defusedxml",
"colorama",
"pyyaml",
"python-dateutil",
"requests",
"requests-cache",
"requests_toolbelt",
"tqdm",
"stevedore>1.20.0",
"setuptools",
"packaging",
"resolvelib",
"psutil; sys_platform=='win32'",
"psutil; sys_platform=='linux'",
"psutil; sys_platform=='linux2'",
"psutil; sys_platform=='darwin'",
"distro; sys_platform=='linux'",
"distro; sys_platform=='linux2'",
]
[project.urls]
Repository = "https://github.com/AdaCore/e3-core"
[project.optional-dependencies]
test = [
"mock",
"requests-mock",
"pytest",
"pytest-html",
"pytest-socket",
"ansi2html",
"ptyprocess; sys_platform!='win32'",
"requests-mock"
]
check = [
"mypy==1.14.1",
"pytest", # for the pytest plugin
"bandit",
"pip-audit",
"requests-mock",
"types-colorama",
"types-mock",
"types-psutil",
"types-python-dateutil",
"types-PyYAML",
"types-requests",
"types-setuptools",
"types-tqdm",
"types-defusedxml",
"distro; sys_platform=='darwin'", # for type checking
]
[project.scripts]
e3 = "e3.sys:main"
e3-sandbox = "e3.anod.sandbox.main:main"
e3-pypi-closure = "e3.python.pypiscript:main"
[project.entry-points."e3.anod.sandbox.sandbox_action"]
exec = "e3.anod.sandbox.action:SandBoxExec"
create = "e3.anod.sandbox.action:SandBoxCreate"
show-config = "e3.anod.sandbox.action:SandBoxShowConfiguration"
migrate = "e3.anod.sandbox.migrate:SandBoxMigrate"
[project.entry-points."e3.event.handler"]
smtp = "e3.event.handler.smtp:SMTPHandler"
logging = "e3.event.handler.logging:LoggingHandler"
file = "e3.event.handler.file:FileHandler"
s3 = "e3.event.handler.s3:S3Handler"
[project.entry-points."e3.store"]
http-simple-store = "e3.store.backends.http_simple_store:HTTPSimpleStore"
[project.entry-points."e3.store.cache.backend"]
file-cache = "e3.store.cache.backends.filecache:FileCache"
[project.entry-points."sandbox_scripts"]
anod = "e3.anod.sandbox.scripts:anod"
[project.entry-points."pytest11"]
pytest = "e3.pytest"
[tool.setuptools.dynamic]
version = {file = "VERSION"}
[tool.coverage.report]
fail_under = 90
[tool.coverage.run]
branch = false
omit = [
"*mypy.py"
]
[tool.coverage.html]
title = "e3 coverage report"
[tool.pytest.ini_options]
addopts = "--failed-first --disable-socket --e3"
[tool.mypy]
# Ensure mypy works with namespace in which there is no toplevel
# __init__.py. Explicit_package_bases means that that mypy_path
# will define which directory is the toplevel directory of the
# namespace.
mypy_path = "src"
namespace_packages = true
explicit_package_bases = true
warn_redundant_casts = true
# do not warn when there are unused ignores, it is currently too difficult
# to have this setting working and mypy running on Linux, macOS, and Windows
#warn_unused_ignores = True
warn_unused_configs = true
disallow_untyped_calls = true
disallow_untyped_defs = true
warn_unreachable = true
disallow_incomplete_defs = true
disallow_any_unimported = true
disallow_subclassing_any = true
no_implicit_optional = true
[[tool.mypy.overrides]]
module = [
"coverage.*",
"distro",
"requests_toolbelt.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"tests.tests_e3.*",
"e3.anod.driver.*",
"e3.os.windows.native_api.*",
"e3.yaml.*"
]
disallow_untyped_defs = false
[tool.ruff]
line-length = 88
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# Probably not useful for us
"ARG002", # unused method argument - needed for interface/compatibility
"C901", # too complex function (MCCabe complexity)
"FLY002", # consider f-string instead of join (sometimes less readable)
"INP001", # implicit namespace package - e3-core uses PEP 420 namespace packages
"PLR0912", # too many branches in a function
"SIM108", # ternary operator - can reduce readability
"TRY003", # long message outside the exception class, difficult to change
"FBT001", # Boolean positional arguments - backward compatibility issue
"FBT002", # It could be a backward compatibility issue with this rule
"PTH100", # Ignore this rule as os.path.abspath() and resolve () it is not strictly equivalent
# Decision not to follow
"G004", # we accept f-string in logging statements
"ERA001", # too many false positive with this rule
"PERF203", # `try`-`except` within a loop incurs performance overhead for Python < 3.11
"PGH003", # allow type: ignore - can be done by mypy if we wanted to
"S101", # use of assert statement, used for mypy
"S506", # unsafe yaml loader - OrderedDictYAMLLoader is a project-defined loader, already excluded from bandit (B506)
"T201", # print statement are allowed
# Recommendations from ruff
"COM812", # Avoid enforcing trailing commas - use of formatter instead
"D203", # 1 blank line required before class docstring, we follow pep257
"D213", # We use pep257 convention for multi-line docstrings
]
[tool.ruff.lint.pylint]
max-args = 18
max-statements = 82
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
[tool.ruff.lint.pep8-naming]
extend-ignore-names = [
"CaasSkipUpdate",
"get_ticket_crm_IT",
"P",
]