-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
180 lines (167 loc) · 4.82 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "openapipages"
dynamic = ["version"]
description = 'OpenAPI Spec-based pages (SwaggerUI, ReDoc, RapiDoc, Elements, Scalar) ready with configuration features.'
readme = "README.md"
requires-python = ">=3.8"
license = "MIT"
keywords = [
"openapipages",
"fastapi",
"flask",
"litestar",
"openapi",
"swagger",
"swagger-ui",
"scalar",
"elements",
"redoc",
"rapidoc",
"api",
"documentation",
"specification",
"spec",
]
authors = [{ name = "Hasan Sezer Taşan", email = "[email protected]" }]
maintainers = [
{ name = "Hasan Sezer Taşan", email = "[email protected]" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Topic :: Internet",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Operating System :: OS Independent",
"Typing :: Typed",
"Environment :: Web Environment",
"Programming Language :: Python",
"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 :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Framework :: FastAPI",
"Framework :: Flask",
]
dependencies = []
[project.urls]
Documentation = "https://github.com/hasansezertasan/openapipages#readme"
Issues = "https://github.com/hasansezertasan/openapipages/issues"
Source = "https://github.com/hasansezertasan/openapipages"
[tool.hatch.version]
path = "src/openapipages/__about__.py"
[tool.hatch.envs.default]
extra-dependencies = [
"fastapi>=0.63.0, <0.110.0",
"uvicorn>=0.20.0, <0.29.0",
"pre-commit>=3.0.0, <4.0.0",
]
[tool.hatch.envs.default.scripts]
start = "uvicorn example.main:app --reload"
pre = "pre-commit run --all-files --hook-stage manual --show-diff-on-failure"
[tool.hatch.envs.types]
extra-dependencies = ["mypy>=1.0.0", "ruff==0.4.5", "codespell==2.3.0"]
[tool.hatch.envs.types.scripts]
typing = "mypy --install-types --non-interactive {args:src/openapipages tests}"
style = ["ruff check {args:.}"]
format = ["ruff format {args:.}"]
spelling = "codespell ."
all = ["spelling", "typing", "style", "format"]
[tool.hatch.envs.hatch-test]
extra-dependencies = [
"pytest>=6.0.0",
"pytest-asyncio>=0.14.0",
"httpx>=0.23.3, <0.27.0",
"fastapi>=0.63.0, <0.110.0",
]
[tool.ruff]
# Run `ruff linter` command to see all available linters and their descriptions
target-version = "py38"
show-fixes = true
fix = true
[tool.ruff.lint]
select = [
"A",
"ARG",
"B", # flake8-bugbear
"B9",
"C", # flake8-comprehensions
"C4", # flake8-comprehensions
"C90", # mccabe
"DTZ",
"E", # pycodestyle errors
"E4",
"E7",
"E9",
"EM",
"ERA", # eradicate
"F", # pyflakes
"I", # isort
"INT", # flake8-gettext
"ICN",
"N", # pep8-naming
"PIE", # flake8-pie,
# "PLC", # pylint - convention
"PLE", # pylint - error
"PLR",
"PLW", # pylint - warning
"Q", # flake8-quotes
"RET", # flake8-return,
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
# "S",
"T",
"TID",
"T20", # flake8-print
# "UP", # pyupgrade
"W", # pycodestyle warnings
"YTT",
]
ignore = [
"E501", # line too long, handled by black
"RET504", # Unnecessary assignment before returns
"PLR2004", # Magic value used in comparison (.status_code == 200)
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-third-party = ["openapipages"]
[tool.mypy]
disallow_untyped_defs = true
ignore_missing_imports = true
[tool.codespell]
ignore-words-list = "Connexion, connexion"
[tool.coverage.run]
source_pkgs = ["openapipages", "tests"]
branch = true
parallel = true
omit = ["src/openapipages/__about__.py"]
[tool.coverage.paths]
openapipages = ["src/openapipages", "*/openapipages/src/openapipages"]
tests = ["tests", "*/openapipages/tests"]
[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]