-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
158 lines (140 loc) · 3.76 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "wks-com"
description = "Communicate with your inverter (WKS EKO Circle)."
readme = "README.md"
requires-python = ">= 3.10"
authors = [
{ name = "Mickaël Schoentgen", email="contact@tiger-222.fr" },
]
maintainers = [
{ name = "Mickaël Schoentgen", email="contact@tiger-222.fr" },
]
license = { file = "LICENSE.txt" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: Unix",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries",
]
keywords = [
"inverter",
"rs232",
"serial",
"wks",
"eko",
]
dependencies = [
"pydantic>=2.5.2,<3",
"pyserial>=3.5,<4",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/BoboTiG/python-wks-com"
Changelog = "https://github.com/BoboTiG/python-wks-com/blob/main/CHANGELOG.md"
Source = "https://github.com/BoboTiG/python-wks-com"
Sponsor = "https://github.com/sponsors/BoboTiG"
Tracker = "https://github.com/BoboTiG/python-wks-com/issues"
"Released Versions" = "https://github.com/BoboTiG/python-wks-com/releases"
[project.scripts]
wks-read = "wks_com.__main__:read"
[project.optional-dependencies]
test = [
"freezegun==1.5.1",
"mypy==1.14.1",
"pytest==8.3.4",
"pytest-cov==6.0.0",
"ruff==0.9.4",
]
dev = [
"build==1.2.2.post1",
"twine==6.1.0",
]
[tool.hatch.version]
path = "src/wks_com/__init__.py"
[tool.hatch.build]
skip-excluded-dirs = true
[tool.hatch.build.targets.sdist]
only-include = [
"CHANGELOG.md",
"src",
]
[tool.hatch.build.targets.wheel]
packages = [
"src/wks_com",
]
[tool.mypy]
# Ensure we know what we do
warn_redundant_casts = true
warn_unused_ignores = true
warn_unused_configs = true
# Imports management
ignore_missing_imports = true
follow_imports = "skip"
# Ensure full coverage
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
# Restrict dynamic typing (a little)
# e.g. `x: List[Any]` or x: List`
disallow_any_generics = true
strict_equality = true
[tool.pytest.ini_options]
pythonpath = "src"
addopts = """
--cov-report=term-missing:skip-covered
--cov=src/wks_com
--log-cli-level=DEBUG
--strict-markers
-r fE
-vvv
"""
[tool.ruff]
indent-width = 4
line-length = 120
target-version = "py310"
[tool.ruff.format]
indent-style = "space"
line-ending = "auto"
quote-style = "double"
skip-magic-trailing-comma = false
[tool.ruff.lint]
extend-select = ["ALL"]
fixable = ["ALL"]
ignore = [
"COM812", # conflict
"D1", # TODO
"D203", # conflict
"D205", # 1 blank line required between summary line and description
"D211", # conflict
"D212", # multi-line docstring summary should start at the first line
"D213", # conflict
"D301", # use `r"""` if any backslashes in a docstring
"D4", # first line should blablabla
"DTZ007", # timezone issue, but we do not care
"ISC001", # conflict
"N805", # `cls` argument name for pydantic models
"T201", # print()
]
[tool.ruff.lint.per-file-ignores]
"src/tests/*" = [
"D", # docstrings
"N802", # test function names using command names
"PLR2004", # magic value used in comparison
"S", # assert in tests
"SLF", # private class access in tests
]