Skip to content

Commit ce6ecb1

Browse files
authored
python: Switch api model generation to our new codegen (#1666)
1 parent c875ff3 commit ce6ecb1

File tree

100 files changed

+2140
-509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+2140
-509
lines changed

Diff for: .github/workflows/python-lint.yml

-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ jobs:
3030
python -m pip install -r requirements.txt .
3131
python -m pip install -r requirements-dev.txt .
3232
33-
- name: Regen openapi libs
34-
run: |
35-
cd python
36-
./scripts/generate_openapi.sh
37-
3833
- name: Run linting
3934
run: |
4035
cd python

Diff for: .github/workflows/python-release.yml

-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ jobs:
3333
cd python
3434
python -m pip install build
3535
36-
- name: Regen openapi libs
37-
run: |
38-
cd python
39-
./scripts/generate_openapi.sh
40-
4136
- name: Build distributions
4237
run: |
4338
cd python

Diff for: .github/workflows/python-tests.yml

-4
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ jobs:
3636
python -m pip install -r requirements-dev.txt .
3737
working-directory: ./python
3838

39-
- name: Regen openapi libs
40-
run: ./scripts/generate_openapi.sh
41-
working-directory: ./python
42-
4339
- name: Check typing on client tests
4440
run: mypy tests/test_client.py
4541
working-directory: ./python

Diff for: python/mypy.ini

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[mypy]
2-
strict = True
2+
strict = True
3+
plugins = pydantic.mypy

Diff for: python/requirements-dev.txt

+6-47
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@
77
anyio==4.6.0
88
# via httpcore
99
attrs==24.2.0
10-
# via
11-
# openapi-python-client
12-
# pytest-docker
13-
autoflake==2.3.1
14-
# via openapi-python-client
15-
black==24.8.0
16-
# via openapi-python-client
10+
# via pytest-docker
1711
build==1.2.2
1812
# via pip-tools
1913
certifi==2024.8.30
@@ -24,60 +18,38 @@ certifi==2024.8.30
2418
charset-normalizer==3.3.2
2519
# via requests
2620
click==8.1.7
27-
# via
28-
# black
29-
# pip-tools
30-
# typer
21+
# via pip-tools
3122
h11==0.14.0
3223
# via httpcore
3324
httpcore==0.17.3
3425
# via httpx
3526
httpx==0.24.1
36-
# via
37-
# -r requirements.in/development.txt
38-
# openapi-python-client
27+
# via -r requirements.in/development.txt
3928
idna==3.10
4029
# via
4130
# anyio
4231
# httpx
4332
# requests
4433
iniconfig==2.0.0
4534
# via pytest
46-
isort==5.13.2
47-
# via openapi-python-client
4835
jinja2==3.1.4
49-
# via
50-
# -r requirements.in/development.txt
51-
# openapi-python-client
36+
# via -r requirements.in/development.txt
5237
markupsafe==2.1.5
5338
# via
5439
# jinja2
5540
# werkzeug
5641
mypy==1.11.2
5742
# via -r requirements.in/development.txt
5843
mypy-extensions==1.0.0
59-
# via
60-
# black
61-
# mypy
62-
openapi-python-client==0.14.1
63-
# via -r requirements.in/development.txt
44+
# via mypy
6445
packaging==24.1
6546
# via
66-
# black
6747
# build
6848
# pytest
69-
pathspec==0.12.1
70-
# via black
7149
pip-tools==7.4.1
7250
# via -r requirements.in/development.txt
73-
platformdirs==4.3.6
74-
# via black
7551
pluggy==1.5.0
7652
# via pytest
77-
pydantic==1.10.18
78-
# via openapi-python-client
79-
pyflakes==3.2.0
80-
# via autoflake
8153
pyproject-hooks==1.1.0
8254
# via
8355
# build
@@ -90,32 +62,19 @@ pytest-docker==3.1.1
9062
# via -r requirements.in/development.txt
9163
pytest-httpserver==1.1.0
9264
# via -r requirements.in/development.txt
93-
python-dateutil==2.9.0.post0
94-
# via openapi-python-client
95-
pyyaml==6.0.2
96-
# via openapi-python-client
9765
requests==2.32.3
9866
# via -r requirements.in/development.txt
9967
ruff==0.6.8
10068
# via -r requirements.in/development.txt
101-
shellingham==1.5.4
102-
# via openapi-python-client
103-
six==1.16.0
104-
# via python-dateutil
10569
sniffio==1.3.1
10670
# via
10771
# anyio
10872
# httpcore
10973
# httpx
110-
typer==0.9.4
111-
# via openapi-python-client
11274
types-requests==2.32.0.20241016
11375
# via -r requirements.in/development.txt
11476
typing-extensions==4.12.2
115-
# via
116-
# mypy
117-
# pydantic
118-
# typer
77+
# via mypy
11978
urllib3==2.2.3
12079
# via
12180
# requests

Diff for: python/requirements.in/development.txt

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ mypy>=1.4.0
33
pip-tools>=6.13.0
44
pytest
55
httpx>=0.23.0
6-
openapi-python-client>=0.14.1,<0.15 # I think version 0.15 is now dangerous for us? https://github.com/openapi-generators/openapi-python-client/pull/775#issuecomment-1646977834
76
jinja2>=3.1.3
87
pytest-docker
98
pytest-httpserver

Diff for: python/requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ setuptools >= 21.0.0
33
urllib3 >= 1.25.3
44
Deprecated >= 1.2.13
55
types-deprecated >= 1.2.5
6-
types-python-dateutil >= 2.8.9
6+
types-python-dateutil >= 2.8.9
7+
pydantic >= 2

Diff for: python/scripts/generate_openapi.sh

-17
This file was deleted.

Diff for: python/setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def read_file(filepath):
3131
META_PATH = os.path.join(PKG_DIR, PKG_NAME, "__init__.py")
3232
META_CONTENTS = read_file(META_PATH)
3333
PKG_REQUIRES = [
34+
"pydantic >=2",
3435
"httpx >=0.23.0",
3536
"attrs >=21.3.0",
3637
"python-dateutil",

0 commit comments

Comments
 (0)