-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
111 lines (98 loc) · 2.73 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
[project]
name = "pyapi-server"
version = "0.9.0"
description = "Lightweight API framework using an OpenAPI spec for routing and validation."
readme = "README.md"
license = { text = "MIT" }
authors = [
{ name = "Berislav Lopac", email = "[email protected]" },
]
requires-python = ">=3.9"
dependencies = [
"PyYAML>=6.0.1",
"openapi-core>=0.19.1",
"starlette>=0.37.2",
"jsonschema-path>=0.3.2",
"stringcase>=1.2.0",
]
[dependency-groups]
checks = [
"mypy>=0.942",
"ruff>=0.0.253",
"isort>=5.13.2"
]
docs = [
"mkdocs-material>=9.5.44",
"mkapi>=3.0",
]
tests = [
"pytest>=8.3.3",
"pytest-cov>=3.0.0",
"pytest-spec>=3.2.0",
"pytest-asyncio>=0.18.3",
"requests>=2.27.1",
"tox>=4.4.6",
"tox-pdm>=0.6.1"
]
[project.urls]
homepage = "https://pyapi-server.readthedocs.io"
documentation = "https://pyapi-server.readthedocs.io"
repository = "https://github.com/berislavlopac/pyapi-server"
[project.optional-dependencies]
uvicorn = [
"uvicorn>=0.18.3"
]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm.build]
includes = ["pyapi/server/"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.run]
source = ["pyapi/", ]
omit = ["*/tests/*", ]
[tool.coverage.report]
skip_covered = false
show_missing = true
fail_under = 90
exclude_lines = ["pragma: no cover", "@abstract", ]
[tool.isort]
profile = "black"
line_length = 96
filter_files = true
force_alphabetical_sort_within_sections = true
[tool.ruff]
line-length = 96
output-format = "grouped"
[tool.ruff.lint]
select = [# see https://docs.astral.sh/ruff/rules/
"E4", "E7", "E9", # basic pycodestyle rules
"W", # pycodestyle warnings
"F", # Pyflakes rules
"D", # pydocstyle checks
"N", # PEP8 naming conventions
"PLR", # Pylint refactoring recommendations
"PTH", # recommends to use pathlib instead of os.path
"UP", # pyupgrade suggestions
"BLE", # locates blind exception capture
"B", # locates possible bugs and design problems
"A", # locates shadowing of builtin names
"C4", # locates possible issues with comprehensions
"DTZ", # locates incorrect use of timezone information
"PIE", # miscellaneous linting rules
"TRY", # locates potential exception handling antipatterns
"PERF", # locates potential performance issues
"RUF", # various Ruff-specific linting rules
"S", # various insecure code, with bandit
]
ignore = ["D107", "D203", "D211", "D212", "D401", "D407", "D413"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = ["D", "N802", "S101"]
"example/*" = ["D"]
[tool.mypy]
mypy_path = "pyapi/"
files = ["pyapi/"]
ignore_missing_imports = true