-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (118 loc) · 3.23 KB
/
pyproject.toml
File metadata and controls
134 lines (118 loc) · 3.23 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
[project]
name = "smpclient"
dynamic = ["version"]
description = "Simple Management Protocol (SMP) Client for remotely managing MCU firmware"
authors = [
{ name = "JP Hutchins", email = "jphutchins@gmail.com" },
{ name = "JP Hutchins", email = "jp@intercreate.io" },
]
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.10,<4"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries",
"Framework :: AsyncIO",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
]
dependencies = [
"smp>=4.0.2",
"intelhex>=2.3.0",
"async-timeout>=4.0.3; python_version < '3.11'",
]
[project.optional-dependencies]
serial = ["pyserial>=3.5"]
ble = ["bleak>=2.0.0"]
udp = []
all = ["smpclient[serial,ble,udp]"]
[project.urls]
Homepage = "https://www.intercreate.io"
Documentation = "https://intercreate.github.io/smpclient"
Repository = "https://github.com/intercreate/smpclient.git"
Issues = "https://github.com/intercreate/smpclient/issues"
[project.scripts]
mcuimg = "smpclient.mcuboot:mcuimg"
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[dependency-groups]
dev = [
"smpclient[all]",
"hatch>=1.14.1",
"mypy>=1.7.0",
"mypy-extensions>=1.0.0",
"types-pyserial>=3.5.0.11",
"pydoclint>=0.5.8",
"pytest>=8.4.0",
"pytest-cov>=7.0.0",
"pytest-asyncio>=0.23.2",
"ruff>=0.12.0",
"taskipy>=1",
]
doc = [
"mkdocstrings[python]>=0.26.1",
"mike>=2.1.3",
"mkdocs-material>=9.5.38",
"griffe-inherited-docstrings>=1.0.1",
"griffe>=1.3.1",
"smp>=4.0.0",
]
[tool.taskipy.tasks]
format = "ruff format ."
lint = "ruff check . && pydoclint src/smpclient"
fix = "ruff check --fix . && ruff format ."
typecheck = "mypy ."
test = "pytest --maxfail=1"
coverage = "pytest --cov --cov-report=xml --cov-report=term-missing"
all = "task format && task lint && task typecheck && task test"
matrix = """
UV_PROJECT_ENVIRONMENT=.venv-3.10 uv run --python 3.10 task all &&
UV_PROJECT_ENVIRONMENT=.venv-3.11 uv run --python 3.11 task all &&
UV_PROJECT_ENVIRONMENT=.venv-3.12 uv run --python 3.12 task all &&
UV_PROJECT_ENVIRONMENT=.venv-3.13 uv run --python 3.13 task all &&
UV_PROJECT_ENVIRONMENT=.venv-3.14 uv run --python 3.14 task all
"""
[tool.ruff]
line-length = 100
extend-exclude = ["dutfirmware"]
[tool.ruff.lint]
extend-select = ["I", "D"]
ignore = ["D1"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "preserve"
[tool.mypy]
disallow_untyped_defs = true
exclude = ['dutfirmware']
[tool.pydoclint]
style = "google"
arg-type-hints-in-docstring = false
allow-init-docstring = true
check-return-types = false
check-yield-types = false
[tool.pytest.ini_options]
norecursedirs = "dutfirmware/*"
filterwarnings = ["ignore:The --rsyncdir:DeprecationWarning"]
[tool.coverage.run]
source = ["smpclient", "tests"]
branch = true
[tool.coverage.report]
fail_under = 91
show_missing = true
exclude_lines = [
"@overload",
"assert_never",
"pragma: no cover",
"if __name__ == .__main__.:",
"if TYPE_CHECKING",
':\s*\.\.\.\s*$',
'^\s*\.\.\.\s*$',
]