-
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathpyproject.toml
More file actions
163 lines (146 loc) · 4.02 KB
/
pyproject.toml
File metadata and controls
163 lines (146 loc) · 4.02 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
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
[build-system]
requires = ["hatchling>=1.25", "hatch-vcs>=0.4"]
build-backend = "hatchling.build"
[project]
name = "pyspacemouse"
dynamic = ["version"]
description = "Multiplatform Python interface to the 3DConnexion Space Mouse - forked from pyspacenavigator"
readme = "README.md"
authors = [
{ name = "Jakub Andrýsek", email = "email@kubaandrysek.cz" },
{ name = "Peter Mitrano", email = "mitranopeter@gmail.com" }
]
license = "MIT"
keywords = [
"pyspacemouse",
"3d",
"6 DoF",
"HID",
"python",
"open-source",
"spacemouse",
"spacenavigator",
"3dconnection",
"3d-mouse",
]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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 :: 3.13",
"Operating System :: OS Independent",
"Topic :: System :: Hardware :: Universal Serial Bus (USB) :: Human Interface Device (HID)",
]
dependencies = ["easyhid", "tomli; python_version < '3.11'"]
[project.urls]
Documentation = "https://spacemouse.kubaandrysek.cz"
Issues = "https://github.com/JakubAndrysek/pyspacemouse/issues"
Source = "https://github.com/JakubAndrysek/pyspacemouse"
[project.optional-dependencies]
dev = [
"build",
"ruff>=0.12.0",
"pytest>=7.0",
"pytest-cov>=4.0",
]
docs = [
"mkdocs",
"mkdocs-material",
"mkdocs-glightbox",
"mkdocs-redirects",
"mkdoxy",
"mkdocs-open-in-new-tab",
"mkdocs-git-revision-date-localized-plugin",
]
[project.scripts]
pyspacemouse = "pyspacemouse.pyspacemouse_cli:main"
[tool.hatch.version]
source = "vcs"
tag-pattern = "(?P<version>.*)"
[tool.hatch.version.raw-options]
local_scheme = "no-local-version" # Remove local version identifier for PyPI compatibility
[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/docs",
"/html",
"/media",
"/site",
"/tests",
"/.gitignore",
"/.pre-commit-config.yaml",
"/Doxyfile",
"/mkdocs.yml",
"/Makefile",
"/CONTRIBUTING.md",
"/troubleshooting.md",
"/release.md",
]
[tool.hatch.build.targets.wheel]
packages = ["pyspacemouse"]
# Ruff configuration
[tool.ruff]
target-version = "py38"
line-length = 100
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"W", # pycodestyle warnings
]
ignore = [
"E501", # Line too long (handled by formatter)
"F403", # Star import unable to detect undefined names
"PLR0913", # Too many arguments
"PLR2004", # Magic value used in comparison
"PLR0912", # Too many branches
"PLW0603", # Global statement discouraged
"PLW2901", # Loop variable overwritten
"UP006", # Use `list` instead of `List` - not available in Python 3.8
"UP007", # Use `X | Y` instead of `Union` - not available in Python 3.8
"UP031", # Use format specifiers (keep % format for now)
"UP045", # Use `X | None` instead of `Optional` - not available in Python 3.8
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
# Pytest configuration
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = "--strict-markers --cov=pyspacemouse --cov-report=term-missing --cov-report=xml"
[tool.coverage.run]
source_pkgs = ["pyspacemouse"]
branch = true
omit = ["*/tests/*", "*/__pycache__/*"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"pragma: no cover",
]
[tool.hatch.envs.default]
dependencies = [
"ruff>=0.12.0",
"pytest>=7.0",
"pytest-cov>=4.0",
]
[tool.hatch.envs.dev]
template = "default"
features = ["dev", "docs"]
[tool.hatch.envs.test]
template = "default"
dependencies = [
"pytest>=7.0",
"pytest-cov>=4.0",
]