-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
162 lines (142 loc) · 3.77 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
# SPDX-FileCopyrightText: 2024 Justin Simon <[email protected]>
#
# SPDX-License-Identifier: MIT
[build-system]
requires = ["hatchling", "hatch-regex-commit"]
build-backend = "hatchling.build"
[project]
name = "pymctp"
dynamic = ["version"]
description = "PyMCTP is a tool to craft/decode DMTF MCTP communication packets"
readme = "README.md"
requires-python = ">=3.8"
license = { file = "LICENSE" }
keywords = []
authors = [
{ name = "Justin Simon", email = "[email protected]" }
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python",
"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",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
]
dependencies = [
"scapy>=2.5.0",
"crc8>=0.1.0",
"pyaardvark>=0.7.1",
"mashumaro>=3.5"
]
[project.urls]
Documentation = "https://github.com/jls5177/pymctp#readme"
Issues = "https://github.com/jls5177/pymctp/issues"
Source = "https://github.com/jls5177/pymctp"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.version]
source = "regex_commit"
path = "src/pymctp/__about__.py"
#commit_extra_args = ["-e"]
tag_sign = false
[tool.hatch.build.targets.sdist]
exclude = [
".history",
".ruff_cache",
".venv",
".vscode",
"dist",
]
[tool.hatch.envs.types]
extra-dependencies = [
"mypy>=1.0.0",
]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/pymctp tests}"
[tool.hatch.envs.default]
type = "virtual"
path = ".venv"
dependencies = [
"pytest",
"pytest-cov",
"reuse >= 4.0",
]
[tool.hatch.envs.default.scripts]
license-check = "reuse lint"
add-license = "reuse annotate -c \"$(git config --get user.name) <$(git config --get user.email)>\" -l MIT --merge-copyrights -r ."
# Ruff
[tool.ruff]
target-version = "py310"
line-length = 120
exclude = ["./.history", "./.venv"]
[tool.ruff.lint]
ignore = [
# Allow boolean positional values in function calls, like `dict.get(... True)`
"FBT001", "FBT002", "FBT003",
# Ignore complexity
"C901",
"RUF012",
# Allow unused arguments (for now)
"ARG001", "ARG002", "ARG005",
# Allow wildcard imports (for now)
"F403", "F405",
# Allow relative imports (for now)
"TID252", "F401",
# Allow "print" (for now)
"T201",
# Allow UpperCamelCase function names
"N801", "N802", "N806",
# Allow asserts in code
"S101",
# Allow magic values (for now)
"PLR2004",
]
unfixable = [
# Don't touch unused imports
"F401",
# Don't touch unused variables
"F841",
"TRY", "T201",
]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.isort]
known-first-party = ["pymctp"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401", "I001", "E501"]
".github/**" = ["D"]
"tests/**/*" = ["PLR2004", "S101", "TID252", "ARG001", "C408"]
"/*.py" = ["E402", "F401", "I001", "E501"]
# Coverage
[tool.coverage.run]
source_pkgs = ["pymctp", "tests"]
branch = true
parallel = true
omit = [
"src/pymctp/__about__.py",
]
[tool.coverage.paths]
pymctp = ["src/pymctp", "*/pymctp/src/pymctp"]
tests = ["tests", "*/pymctp/tests"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.hatch.envs.coverage]
detached = true
dependencies = [
"coverage[toml]",
]
[tool.hatch.envs.coverage.scripts]
combine = "coverage combine {args}"
html = "coverage html --skip-covered --skip-empty"
xml = "coverage xml --skip-empty"