-
Notifications
You must be signed in to change notification settings - Fork 10
/
pyproject.toml
225 lines (192 loc) · 5.14 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
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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "openjd-adaptor-runtime"
description = "A python library for building adaptors that integrate applications with Open Job Description jobs."
authors = [
{name = "Amazon Web Services"},
]
dynamic = ["version"]
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.9"
# https://pypi.org/classifiers/
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Developers",
]
dependencies = [
"pyyaml ~= 6.0",
"jsonschema >= 4.17.0, == 4.*",
"pywin32 >= 307; platform_system == 'Windows'",
]
[project.urls]
Homepage = "https://github.com/OpenJobDescription/openjd-adaptor-runtime-for-python"
Source = "https://github.com/OpenJobDescription/openjd-adaptor-runtime-for-python"
[tool.hatch.build]
artifacts = [
"*_version.py"
]
only-pacakges = true
[tool.hatch.version]
source = "vcs"
[tool.hatch.version.raw-options]
version_scheme = "post-release"
[tool.hatch.build.hooks.vcs]
version-file = "_version.py"
[tool.hatch.build.hooks.custom]
path = "hatch_version_hook.py"
[[tool.hatch.build.hooks.custom.copy_map]]
sources = [
"_version.py",
]
destinations = [
"src/openjd/adaptor_runtime",
"src/openjd/adaptor_runtime_client",
]
[tool.hatch.build.targets.sdist]
packages = [
"src/openjd",
]
only-include = [
"src/openjd",
]
[tool.hatch.build.targets.wheel]
packages = [
"src/openjd",
]
only-include = [
"src/openjd",
]
[tool.mypy]
check_untyped_defs = false
show_error_codes = false
pretty = true
ignore_missing_imports = true
disallow_incomplete_defs = false
disallow_untyped_calls = false
show_error_context = true
strict_equality = false
python_version = 3.9
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = false
# Tell mypy that there's a namespace package at src/openjd
namespace_packages = true
explicit_package_bases = true
mypy_path = "src"
[tool.ruff]
line-length = 100
[tool.ruff.lint]
ignore = [
"E501",
# Double Check if this should be fixed
"E731",
]
[tool.ruff.lint.pep8-naming]
classmethod-decorators = [
"classmethod",
]
[tool.ruff.lint.isort]
known-first-party = [
"openjd",
]
[tool.black]
line-length = 100
[tool.pytest.ini_options]
xfail_strict = false
addopts = [
"-rfEx",
"--durations=5",
"--cov=src/openjd/adaptor_runtime",
"--cov=src/openjd/adaptor_runtime_client",
"--color=yes",
"--cov-report=html:build/coverage",
"--cov-report=xml:build/coverage/coverage.xml",
"--cov-report=term-missing",
"--numprocesses=auto",
"--timeout=30"
]
[tool.coverage.run]
branch = true
parallel = true
plugins = ["coverage_conditional_plugin"]
[tool.coverage.paths]
source = [
"src/"
]
[tool.coverage.coverage_conditional_plugin.omit]
# Source files to exclude from coverage in both OS
"True" = [
"src/openjd/adaptor_runtime_client/_version.py",
"src/openjd/adaptor_runtime/_version.py"
]
# Source files to exclude from coverage on Posix
"sys_platform != 'win32'" = [
"src/openjd/adaptor_runtime/_background/backend_named_pipe_server.py",
"src/openjd/adaptor_runtime/_background/background_named_pipe_request_handler.py",
"src/openjd/adaptor_runtime/_named_pipe/*.py",
"src/openjd/adaptor_runtime/application_ipc/_win_adaptor_server.py",
"src/openjd/adaptor_runtime/application_ipc/_named_pipe_request_handler.py",
"src/openjd/adaptor_runtime_client/win_client_interface.py",
"src/openjd/adaptor_runtime_client/named_pipe/*.py"
]
# Source files to exclude from coverage on Windows
"sys_platform == 'win32'" = [
"src/openjd/adaptor_runtime/_background/http_server.py",
"src/openjd/adaptor_runtime/application_ipc/_adaptor_server.py",
"src/openjd/adaptor_runtime/application_ipc/_http_request_handler.py",
"src/openjd/adaptor_runtime_client/connection.py",
"src/openjd/adaptor_runtime_client/posix_client_interface.py",
"src/openjd/adaptor_runtime/_http/*.py"
]
[tool.coverage.coverage_conditional_plugin.rules]
is-windows = "sys_platform == 'win32'"
is-posix = "sys_platform != 'win32'"
[tool.coverage.report]
show_missing = true
fail_under = 90
[tool.semantic_release]
# Can be removed or set to true once we are v1
major_on_zero = false
tag_format = "{version}"
[tool.semantic_release.commit_parser_options]
allowed_tags = [
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"style",
"refactor",
"test",
]
minor_tags = []
patch_tags = [
"chore",
"feat",
"fix",
"refactor",
]
[tool.semantic_release.publish]
upload_to_vcs_release = false
[tool.semantic_release.changelog]
template_dir = ".semantic_release"
[tool.semantic_release.changelog.environment]
trim_blocks = true
lstrip_blocks = true
[tool.semantic_release.branches.release]
match = "(mainline|release)"