-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
172 lines (154 loc) · 5.13 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
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=61.2", "wheel", "setuptools-rust>=1.9"]
[project]
authors = [{name = "Gufo Labs"}]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Intended Audience :: Telecommunications Industry",
"Programming Language :: Rust",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: BSD License",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Networking",
"Topic :: System :: Networking :: Monitoring",
"Operating System :: POSIX :: Linux",
"Typing :: Typed",
]
dynamic = ["version"]
keywords = ["error"]
license = {text = "BSD 3-Clause License"}
name = "gufo_snmp"
requires-python = ">=3.9"
[project.readme]
content-type = "text/markdown"
file = "README.md"
[project.urls]
"Bug Tracker" = "https://github.com/gufolabs/gufo_snmp/issues"
Changelog = "https://github.com/gufolabs/gufo_snmp/blob/master/CHANGELOG.md"
Documentation = "https://docs.gufolabs.com/gufo_snmp/"
Homepage = "https://github.com/gufolabs/gufo_snmp/"
"Source Code" = "https://github.com/gufolabs/gufo_snmp/"
[tool.setuptools]
include-package-data = true
package-dir = {"" = "src"}
zip-safe = false
[tool.setuptools.packages.find]
namespaces = true
where = ["src"]
[tool.setuptools.package-data]
"*" = ["py.typed"]
[tool.setuptools.dynamic]
version = {attr = "gufo.snmp.__version__"}
[tool.distutils.build_rust]
inplace = true
release = true
[[tool.setuptools-rust.ext-modules]]
target = "gufo.snmp._fast"
[tool.coverage.run]
omit = ["*tests*", "*examples*"]
[tool.coverage.html]
directory = "dist/coverage"
[tool.cibuildwheel]
before-test = "pip install -r {project}/.requirements/test.txt"
test-command = "pytest -v {project}/tests"
[tool.cibuildwheel.linux]
before-all = "./tools/build/setup-rust.sh && pip install -r ./.requirements/build.txt"
manylinux-aarch64-image = "manylinux2014"
# manylinux-i686-image = "manylinux_2_24"
# manylinux-ppc64le-image = "manylinux_2_24"
# manylinux-pypy_aarch64-image = "manylinux_2_24"
# manylinux-pypy_i686-image = "manylinux_2_24"
# manylinux-pypy_x86_64-image = "manylinux_2_24"
# manylinux-s390x-image = "manylinux_2_24"
manylinux-x86_64-image = "manylinux2014"
musllinux-aarch64-image = "musllinux_1_1"
# musllinux-i686-image = "musllinux_1_1"
# musllinux-ppc64le-image = "musllinux_1_1"
# musllinux-s390x-image = "musllinux_1_1"
musllinux-x86_64-image = "musllinux_1_1"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [".git", "build", "dist"]
line-length = 79
# Assume Python 3.9
target-version = "py39"
# Enable
select = [
"E", # Pycodestyle Error
"F", # Pyflakes
"W", # Pycodestyle Warning
"C90", # mccabe
"I", # isort
"D", # Pydocstyle
"YTT", # flake8-2020
"ANN", # flake8-annotations
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"PT", # flake8-pytest-style
"RET", # flake8-return
"SIM", # flake8-simplify
"PLC", # pylint
"PLE", # pylint
"PLR", # pylint
"PLW", # pylint
"PIE", # flake8-pie
"RUF", # ruff specific
]
# Always autofix, but never try to fix `F401` (unused imports).
fix = true
ignore = ["D203", "D212", "D107", "PLR0913"]
unfixable = ["F401"]
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 15
[tool.ruff.per-file-ignores]
# Ignore `E402` (import violations) in all `__init__.py` files
"__init__.py" = ["E402"]
"examples/*.py" = [
"D100", # Missing docstring in public module
"D103", # Missing docstring in public function
"PLR2004", # Magic value used in comparison, consider replacing {x} with a constant variable
]
"src/gufo/snmp/protocol.py" = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
]
"src/gufo/snmp/snmpd.py" = [
"S603", # `subprocess` call: check for execution of untrusted input
]
"tests/*.py" = [
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `x`
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"S101", # Use of assert detected
"PT011", # {exc} is too broad, set the `match` parameter or use a more specific exception.
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
]
[tool.mypy]
explicit_package_bases = true
mypy_path = ["src"]
strict = true
warn_unused_ignores = false