forked from tier4/ota-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
176 lines (162 loc) · 3.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
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
[build-system]
build-backend = "hatchling.build"
requires = [
"hatch-vcs",
"hatchling>=1.20",
]
[project]
name = "otaclient"
readme = "README.md"
license = { text = "LICENSE.md" }
requires-python = ">=3.8"
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Operating System :: Unix",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dynamic = [
"version",
]
dependencies = [
"aiofiles<25,>=24.1",
"aiohttp>=3.9.5,<3.11",
"cryptography>=42.0.4,<44",
"grpcio>=1.53.2,<1.67",
"protobuf<4.22,>=4.21.12",
"pydantic<3,>=2.6",
"pydantic-settings<3,>=2.3",
"pyopenssl<25,>=24.1",
"pyyaml<7,>=6.0.1",
"requests<2.33,>=2.32",
"simple-sqlite3-orm<0.3,>=0.2",
"typing-extensions>=4.6.3",
"urllib3<2.3,>=2.2.2",
"uvicorn[standard]<0.31,>=0.30",
"zstandard<0.24,>=0.22",
]
optional-dependencies.dev = [
"black",
"coverage",
"pytest==7.1.2",
"pytest-asyncio==0.23.8",
"pytest-mock==3.14",
"requests-mock",
"ruff",
]
urls.Source = "https://github.com/tier4/ota-client"
[tool.hatch.version]
source = "vcs"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.hooks.vcs]
version-file = "src/_otaclient_version.py"
[tool.hatch.build.targets.sdist]
exclude = [
"/tools",
".github",
]
[tool.hatch.build.targets.wheel]
exclude = [
"**/.gitignore",
"**/*README.md",
]
only-include = [
"src",
]
sources = [
"src",
]
[tool.hatch.envs.dev]
type = "virtual"
features = [
"dev",
]
[tool.pytest.ini_options]
asyncio_mode = "auto"
log_auto_indent = true
log_format = "%(asctime)s %(levelname)s %(filename)s %(funcName)s,%(lineno)d %(message)s"
log_cli = true
log_cli_level = "INFO"
testpaths = [
"./tests",
]
[tool.black]
line-length = 88
target-version = [
'py38',
'py39',
'py310',
'py311',
]
extend-exclude = '''(
^.*(_pb2.pyi?|_pb2_grpc.pyi?)$
)'''
[tool.coverage.run]
branch = false
relative_files = true
source = [
"otaclient",
"otaclient_api",
"otaclient_common",
"ota_metadata",
"ota_proxy",
]
[tool.coverage.report]
omit = [
"**/*_pb2.py*",
"**/*_pb2_grpc.py*",
]
exclude_also = [
"def __repr__",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
skip_empty = true
skip_covered = true
[tool.pyright]
exclude = [
"**/__pycache__",
]
ignore = [
"proto/**",
"**/*_pb2.py*",
"**/*_pb2_grpc.py*",
]
pythonVersion = "3.8"
[tool.ruff]
target-version = "py38"
# NOTE: not include tests and tools for now
include = [
"tests/**/*.py",
"src/**/*.py",
"pyproject.toml",
]
extend-exclude = [
"*_pb2.py*",
"*_pb2_grpc.py*",
]
[tool.ruff.lint]
select = [
"E4",
"E7",
"E9",
"F", # pyflakes
"Q", # flake8-quotes
"I", # isort
"B", # flake8-bugbear
"A", # flake8-builtins
"ICN", # flake8-import-conventions
]
ignore = [
"E266", # (too many leading '#'): sometimes we use multiple # for separting sections
"E203", # (white space before ':'): this error conflicts with black linting
"E701", # (multiple statements on one line)
"S101", # (use of assert): mostly we use assert for typing
]