-
Notifications
You must be signed in to change notification settings - Fork 41
/
pyproject.toml
190 lines (169 loc) · 5.48 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build]
exclude = [".github"]
[tool.hatch.build.targets.wheel]
packages = ["bowtie"]
[tool.hatch.build.targets.wheel.hooks.custom]
[tool.hatch.build.targets.wheel.force-include]
data = "bowtie/data"
[project]
name = "bowtie-json-schema"
description = "A meta-validator for the JSON Schema specification."
requires-python = ">=3.12"
readme = "README.rst"
license = {text = "MIT"}
keywords = [
"validation",
"data validation",
"jsonschema",
"json",
"json schema",
]
authors = [
{ name = "Julian Berman", email = "[email protected]" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: File Formats :: JSON :: JSON Schema",
]
dynamic = ["version"]
dependencies = [
"aiodocker",
"attrs>=22.2.0",
"diagnostic",
"github3.py",
"httpx",
"inflect",
"jsonschema>=4.19.0",
"jsonschema_lexer",
"pyperf",
"referencing>=0.31.0",
"referencing-loaders>=2024.5.2",
"rich",
"rich-click>=1.8.0",
"rpds.py>=0.18.0",
"structlog",
"url.py>=0.11.3",
]
[project.optional-dependencies]
strategies = ["hypothesis>=6.92.1"]
[project.scripts]
bowtie = "bowtie._cli:main"
[project.urls]
Documentation = "https://docs.bowtie.report/"
Homepage = "https://bowtie.report/"
Issues = "https://github.com/bowtie-json-schema/bowtie/issues/"
Funding = "https://github.com/sponsors/Julian"
Source = "https://github.com/bowtie-json-schema/bowtie"
[tool.coverage.html]
show_contexts = true
skip_covered = false
[tool.coverage.run]
branch = true
parallel = true # to support subprocess collection
source = ["bowtie"]
dynamic_context = "test_function"
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
"\\s*\\.\\.\\.\\s*",
]
show_missing = true
skip_covered = true
[tool.doc8]
ignore = [
"D000", # see PyCQA/doc8#125
"D001", # one sentence per line, so max length doesn't make sense
]
[tool.pytest.ini_options]
addopts = ["--strict-markers"]
xfail_strict = true
markers = [
"json: Tests of Bowtie's JSON output",
"containers: (Integration) tests dependent on podman/dockerd",
]
[tool.pyright]
reportUnnecessaryTypeIgnoreComment = true
strict = ["**/*.py"]
exclude = [
"**/tests/__init__.py",
"**/tests/conftest.py",
"**/tests/miniatures.py",
"**/tests/test_*.py",
"**/bowtie/benchmarks/*",
"**/tests/benchmarks/*",
]
[tool.ruff]
line-length = 79
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"A001", # It's fine to shadow builtins
"A002",
"A003",
"ARG", # This is all wrong whenever an interface is involved
"ANN", # Just let the type checker do this
"B006", # Mutable arguments require care but are OK if you don't abuse them
"B008", # It's totally OK to call functions for default arguments.
"B904", # raise SomeException(...) is fine.
"B905", # No need for explicit strict, this is simply zip's default behavior
"C408", # Calling dict is fine when it saves quoting the keys
"C901", # Not really something to focus on
"D105", # It's fine to not have docstrings for magic methods.
"D107", # __init__ especially doesn't need a docstring
"D200", # This rule makes diffs uglier when expanding docstrings
"D203", # No blank lines before docstrings.
"D212", # Start docstrings on the second line.
"D400", # This rule misses sassy docstrings ending with ! or ?
"D401", # This rule is too flaky.
"D406", # Section headers should end with a colon not a newline
"D407", # Underlines aren't needed
"D412", # Plz spaces after section headers
"EM101", # These don't bother me.
"EM102",
"FBT", # It's worth avoiding boolean args but I don't care to enforce it
"FIX", # Yes thanks, if I could it wouldn't be there
"N", # These naming rules are silly
"PLR0912", # These metrics are fine to be aware of but not to enforce
"PLR0913",
"PLR0915",
"PLW2901", # Shadowing for loop variables is occasionally fine.
"PT006", # pytest parametrize takes strings as well
"PYI025", # No, importing it as Set is fine.
"RET501", # Returning None explicitly is *definitely* fine
"RET502", # Returning None implicitly is fine
"RET503",
"RET505", # These push you to use `if` instead of `elif`, but for no reason
"RET506",
"RSE102", # Ha, what, who even knew you could leave the parens off. But no.
"SIM300", # Not sure what heuristic this uses, but it's easily incorrect
"SLF001", # Private usage within this package itself is fine
"TD", # These TODO style rules are also silly
"TRY003", # Some exception classes are essentially intended for free-form
]
[tool.ruff.lint.flake8-pytest-style]
mark-parentheses = false
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.isort]
combine-as-imports = true
from-first = true
[tool.ruff.lint.per-file-ignores]
"noxfile.py" = ["ANN", "D100", "S101", "T201"]
"docs/*" = ["ANN", "D", "INP001"]
"bowtie/tests/*" = ["ANN", "D", "DTZ011", "RUF012", "S", "INP"]
"bowtie/benchmarks/*" = ["ANN", "D", "DTZ011", "RUF012", "S", "INP", "E501"]
"implementations/*" = ["ANN", "BLE001", "D", "PERF", "S101"]