-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
192 lines (170 loc) · 4.16 KB
/
Copy pathpyproject.toml
File metadata and controls
192 lines (170 loc) · 4.16 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "autoregistry"
dynamic = ["version"]
description = "Automatic registry design-pattern for mapping names to functionality."
readme = "README.rst"
license = "Apache-2.0"
requires-python = ">=3.8"
authors = [
{ name = "Brian Pugh" }
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"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",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = []
[project.optional-dependencies]
pydantic = ["pydantic>=2.0"]
docs = [
"sphinx>=4.5,<7.5",
"sphinx-rtd-theme>=1.0,<3.2",
"sphinx-copybutton>=0.5.0",
]
[project.urls]
Homepage = "https://github.com/BrianPugh/autoregistry"
Repository = "https://github.com/BrianPugh/autoregistry"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "autoregistry/_version.py"
[tool.hatch.build.targets.sdist]
include = [
"/autoregistry",
]
[tool.hatch.build.targets.wheel]
packages = ["autoregistry"]
[dependency-groups]
dev = [
"coverage[toml]>=5.1,<8.0",
"ipdb>=0.13.9",
"pytest>=7.1.2,<9.0.0",
"pytest-cov>=3,<8",
"pytest-mock>=3.7.0",
"pyright>=1.1.273",
"ruff>=0.1.0",
"attrs>=23.1,<27.0",
"pydantic>=2.0",
"sphinx>=4.5,<7.5",
"sphinx-rtd-theme>=1.0,<3.2",
"sphinx-copybutton>=0.5.0",
]
[tool.coverage.run]
branch = true
omit = [
"tests/*",
]
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __repr__",
"if self.debug:",
"if debug:",
"if 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 False:",
"if __name__ == .__main__.:",
]
[tool.pyright]
venvPath = "."
venv = ".venv"
[tool.ruff]
target-version = 'py38'
line-length = 88 # Must agree with Black
exclude = [
"migrations",
"__pycache__",
"manage.py",
"settings.py",
"env",
".env",
"venv",
".venv",
]
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # Error
"F", # pyflakes
"I", # isort
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PGH", # pygrep-hooks
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"S", # bandit
"SIM", # flake8-simplify
"TRY", # tryceratops
"UP", # pyupgrade
"W", # Warning
"YTT", # flake8-2020
]
ignore = [
"B905", # zip strict=True; remove once python <3.10 support is dropped.
"S603", # subprocess call: check for execution of untrusted input
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"D200",
"D401",
"E402",
"E501",
"F401",
"TRY003", # Avoid specifying messages outside exception class; overly strict, especially for ValueError
]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
"chr",
"typer.Argument",
"typer.Option",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"S101", # use of "assert"
"S102", # use of "exec"
"S106", # possible hardcoded password.
"PGH001", # use of "eval"
"N806", # variable names should be lowercase; all of them are type[Registry]
"N807", # Function name should not start and end with `__`
]
[tool.ruff.lint.pep8-naming]
staticmethod-decorators = [
"pydantic.validator",
"pydantic.root_validator",
]