-
-
Notifications
You must be signed in to change notification settings - Fork 211
/
Copy pathpyproject.toml
144 lines (126 loc) · 3.74 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
[project]
authors = [
{ name = "Dylan Anthony", email = "[email protected]" },
]
license = { text = "MIT" }
requires-python = ">=3.9,<4.0"
dependencies = [
"jinja2>=3.0.0,<4.0.0",
"typer>0.6,<0.16",
"colorama>=0.4.3; sys_platform == \"win32\"",
"shellingham>=1.3.2,<2.0.0",
"pydantic>=2.1.1,<3.0.0",
"attrs>=22.2.0",
"python-dateutil>=2.8.1,<3.0.0",
"httpx>=0.20.0,<0.29.0",
"ruamel.yaml>=0.18.6,<0.19.0",
"ruff>=0.2,<0.10",
"typing-extensions>=4.8.0,<5.0.0",
]
name = "openapi-python-client"
version = "0.23.0"
description = "Generate modern Python clients from OpenAPI"
keywords = [
"OpenAPI",
"Client",
"Generator",
]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"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 :: Code Generators",
"Typing :: Typed",
]
readme = "README.md"
[project.urls]
repository = "https://github.com/openapi-generators/openapi-python-client"
[project.scripts]
openapi-python-client = "openapi_python_client.cli:app"
[tool.ruff]
line-length = 120
exclude = [
".git",
".mypy_cache",
".venv",
"openapi_python_client/templates/*",
"end_to_end_tests/*",
"tests/test_templates/*",
]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "PL", "RUF"]
ignore = ["E501", "PLR0913", "PLR2004"]
[tool.ruff.lint.per-file-ignores]
"openapi_python_client/cli.py" = ["B008"]
"tests/*" = ["PLR2004"]
[tool.coverage.run]
omit = ["openapi_python_client/__main__.py", "openapi_python_client/templates/*"]
[tool.mypy]
plugins = ["pydantic.mypy"]
disallow_any_generics = true
disallow_untyped_defs = true
warn_redundant_casts = true
strict_equality = true
[[tool.mypy.overrides]]
module = [
"importlib_metadata",
"typer",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
junit_family = "xunit2"
[tool.pdm.dev-dependencies]
dev = [
"pytest>8",
"pytest-mock>3",
"mypy>=1.13",
"pytest-cov",
"python-multipart",
"types-PyYAML<7.0.0,>=6.0.3",
"types-certifi<2021.10.9,>=2020.0.0",
"types-python-dateutil<3.0.0,>=2.0.0",
"ruamel-yaml-string>=0.1.1",
"syrupy>=4",
]
[tool.pdm.build]
includes = [
"openapi_python_client",
"CHANGELOG.md",
"openapi_python_client/py.typed",
]
[tool.pdm.scripts]
lint = "ruff check --fix ."
format = "ruff format ."
mypy = "mypy openapi_python_client"
check = { composite = ["lint", "format", "mypy", "test"] }
regen = {composite = ["regen_e2e", "regen_integration"]}
e2e = "pytest openapi_python_client end_to_end_tests/test_end_to_end.py"
re = {composite = ["regen_e2e", "e2e --snapshot-update"]}
regen_e2e = "python -m end_to_end_tests.regen_golden_record"
unit_test = "pytest tests"
[tool.pdm.scripts.test]
cmd = "pytest tests end_to_end_tests/test_end_to_end.py --basetemp=tests/tmp"
[tool.pdm.scripts.test.env]
"TEST_RELATIVE" = "true"
[tool.pdm.scripts.post_test]
cmd = "rm -r tests/tmp"
[tool.pdm.scripts.test_with_coverage]
composite = ["test --cov openapi_python_client tests --cov-report=term-missing"]
[tool.pdm.scripts.regen_integration]
shell = """
openapi-python-client generate --overwrite --url https://raw.githubusercontent.com/openapi-generators/openapi-test-server/main/openapi.json --config integration-tests/config.yaml --meta pdm --output-path integration-tests \
"""
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.sdist]
include = [
"openapi_python_client",
]
exclude = [".gitignore"]