-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
156 lines (130 loc) · 4.19 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
[project]
name = "april_vision"
description = "An AprilTags wrapper with camera discovery and axis conversion."
readme = "README.md"
license = {file = "LICENSE"}
authors = [{name = "Will Barber"}, {name = "Joshua Perriman"}]
classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Image Recognition",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Typing :: Typed",
"License :: OSI Approved :: MIT License",
]
dynamic = ["version"]
requires-python = ">=3.8"
dependencies = [
"pyapriltags >=3.3.0.2,<4",
"numpy >= 1.21,<2",
"pyquaternion >=0.9.9,<1",
# winrt only supports upto python 3.10
# winrt >=1.0.21033.1, <2; platform_system=='Windows'
"winsdk >=1.0.0b7,<2; platform_system=='Windows'",
]
[project.optional-dependencies]
dev = [
"poethepoet >=0.0.1,<1",
"ruff >=0.3.0,<0.4",
"mypy==1.9.0",
"build",
"types-Pillow",
"types-tabulate",
"pytest",
"pytest-cov",
]
cli = [
"Pillow >=9.4.0,<10",
"tabulate >=0.9.0,<1",
"font-roboto >=0.0.1",
]
opencv = ["opencv-python-headless >=4,<4.9"]
[project.scripts]
april_vision = "april_vision.cli:main"
[project.urls]
Repository = "https://github.com/WillB97/april_vision"
[tool.setuptools.packages]
find = {}
[tool.setuptools.exclude-package-data]
"tests.test_data" = ["*"]
[build-system]
requires = ["setuptools>=60", "wheel", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
version_file = "april_vision/_version.py"
# ### Linting Rules ###
[tool.ruff]
line-length = 95
lint.select = [
"D", # pydocstyle
"E", # pycodestyle error
"F", # pyflakes
"I", # isort
"W", # pycodestyle warning
"RUF", # ruff-specific
"B006", # mutable default argument
"B021", # f-string docstring
"COM818", # warn about implicitly creating a tuple
# "SLF001", # warn about accessing private members, these can be noqa'd when necessary
]
preview = true # Enable preview to get the rest of pycodestyle errors
lint.ignore = [
"D104", # Ignoe missing docstring in public package
"D105", # Ignore missing docstring in magic method
"D107", # Ignore missing docstring in __init__
"D401", # Ignore first line of docstring should be in imperative mood
"D203", # Ignore 1 blank line required before class docstring
"D212", # Ignore Multi-line docstring summary should start at the first line
"RUF005", # Allow alternate iterable unpacking
"RUF015", # Allow + concatenation
]
# ### Formatting Rules ###
[tool.mypy]
mypy_path = "stubs"
warn_unused_ignores = true
warn_return_any = true
show_error_codes = true
strict_optional = true
implicit_optional = true
disallow_any_unimported = true
disallow_subclassing_any = true
#disallow_any_generics = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
check_untyped_defs = true
# ### Tasks ###
[tool.poe.env]
PYMODULE = "april_vision"
[tool.poe.tasks]
_upload = "python -m twine upload dist/*"
[tool.poe.tasks.lint]
help = "Run ruff against the project to check for linting errors."
cmd = "ruff check $PYMODULE"
[tool.poe.tasks.type]
help = "Run mypy against the project to check for type errors."
cmd = "python -m mypy $PYMODULE"
[tool.poe.tasks.test]
help = "Run pytest against the project to check for test errors."
cmd = "python -m pytest --cov=$PYMODULE --cov-report=term --cov-report=xml tests"
[tool.poe.tasks.check]
help = "Check the project for linting, type and test errors."
sequence = ["lint", "type", "test"]
[tool.poe.tasks.fix]
help = "Use ruff to fix any auto-fixable linting errors."
cmd = "ruff check --fix-only $PYMODULE"
[tool.poe.tasks.build]
help = "Build the wheel and source distributions."
cmd = "python -m build"
[tool.poe.tasks.upload]
help = "Build and upload the wheel and source distributions to PyPI."
sequence = ["build", "_upload"]
[tool.poe.tasks.clean]
help = "Clean the project of any build artifacts."
sequence = [
"shutil:rmtree('dist', ignore_errors=1)",
"shutil:rmtree('build', ignore_errors=1)",
]
default_item_type = "script"