-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
156 lines (137 loc) · 3.43 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
[build-system]
build-backend = 'setuptools.build_meta'
requires = ["setuptools >= 62.0"]
[project]
name = "pyCANape"
description = 'Pythonic wrapper around the VECTOR CANape API'
readme = "README.md"
requires-python = ">=3.8"
license = { text = "MIT" }
keywords = [
"CANape",
"Measurement",
"Calibration",
"automotive"
]
authors = [
{ name = "Artur Drogunow", email = "[email protected]" },
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
dependencies = [
"psutil",
"numpy>=1.21",
"packaging",
"typing-extensions;python_version<'3.10'",
]
dynamic = ["version"]
[project.optional-dependencies]
dev = [
"pytest", # for tests
"pytest-cov", # for tests
"python-can==4.*", # for tests
"black==24.4.*",
"ruff==0.4.10",
"mypy==1.10.*",
"pre-commit",
]
doc = [
"furo",
"sphinx==7.*",
"sphinx-copybutton",
]
[project.urls]
Documentation = "https://pycanape.readthedocs.io"
Issues = "https://github.com/zariiii9003/pycanape/issues"
Source = "https://github.com/zariiii9003/pycanape"
Homepage = "https://github.com/zariiii9003/pycanape"
[tool.setuptools.dynamic]
version = {attr = "pycanape.__version__"}
[tool.setuptools.package-data]
"pycanape" = [
"py.typed",
]
[tool.mypy]
show_error_codes = true
ignore_missing_imports = false
disallow_untyped_defs = false
disallow_incomplete_defs = true
check_untyped_defs = true
warn_unused_ignores = true
warn_redundant_casts = true
disallow_any_generics = true
disallow_subclassing_any = true
exclude = [
"^docs/.*",
"^.*venv/.*",
"^tests/.*"
]
[[tool.mypy.overrides]]
module = [
"psutil",
]
ignore_missing_imports = true
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"E", # pycodestyle
"EM", # flake8-errmsg
"F", # pyflakes
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PIE", # flake8-pie
"PL", # pylint
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"UP", # pyupgrade
"W", # pycodestyle
]
ignore = [
"E501", # line too long
"PLR0904", # too-many-public-methods
"PLR0913", # too-many-arguments
"RUF012", # mutable-class-default
]
[tool.ruff.lint.per-file-ignores]
"src/pycanape/cnp_api/**/*.py" = [
"N", # names are mostly equal to CANapAPI.h
]
"tests/**/*.py" = [
"S", # irrelevant for tests
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant
"PLR2004", # Magic value used in comparison
"PLR0915", # Too many statements
]
[tool.ruff.lint.isort]
known-first-party = ["pycanape"]
[tool.pytest.ini_options]
addopts = "-v --assert=plain"
testpaths = ["tests"]
[tool.coverage.run]
branch = true
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_also = [
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
]
ignore_errors = true
[tool.coverage.html]
directory = "coverage_html_report"