-
-
Notifications
You must be signed in to change notification settings - Fork 291
Expand file tree
/
Copy pathpyproject.toml
More file actions
141 lines (123 loc) · 3.72 KB
/
Copy pathpyproject.toml
File metadata and controls
141 lines (123 loc) · 3.72 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
[project]
authors = [
{ name = "Dylan Anthony", email = "contact@dylananthony.com" },
]
license = "MIT"
requires-python = ">=3.11,<4.0"
dependencies = [
"jinja2>=3.0.0,<4.0.0",
"typer>0.16,<0.28",
"colorama>=0.4.3; sys_platform == \"win32\"",
"shellingham>=1.3.2,<2.0.0",
"pydantic>=2.10,<3.0.0",
"attrs>=22.2.0",
"httpx>=0.23.1,<0.29.0",
"ruamel.yaml>=0.18.6,<0.20.0",
"ruff>=0.2",
]
name = "openapi-python-client"
version = "0.29.1"
description = "Generate modern Python clients from OpenAPI"
keywords = [
"OpenAPI",
"Client",
"Generator",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"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"
[dependency-groups]
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",
"syrupy>=4",
"hypothesis>=6.100",
]
[tool.ruff]
line-length = 120
exclude = [
".git",
".mypy_cache",
".venv",
"openapi_python_client/templates/*",
"end_to_end_tests/golden-records/*",
"end_to_end_tests/__snapshots__/*",
"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/*", "end_to_end_tests/*", "integration_tests/*", "tests/*"]
[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.build]
includes = [
"openapi_python_client",
"CHANGELOG.md",
"openapi_python_client/py.typed",
]
[tool.pdm.scripts]
lint = "ruff check ."
format = "ruff format ."
mypy = "mypy openapi_python_client fuzz"
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"
fuzz = "pytest fuzz --hypothesis-show-statistics"
[tool.pdm.scripts.test]
cmd = "pytest tests end_to_end_tests/test_end_to_end.py end_to_end_tests/functional_tests --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/refs/tags/v0.2.1/openapi.yaml --config integration-tests/config.yaml --meta none --output-path integration-tests/integration_tests \
"""
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.sdist]
include = [
"openapi_python_client",
]
exclude = [".gitignore"]