Skip to content

Commit

Permalink
python: Switch api model generation to our new codegen (#1666)
Browse files Browse the repository at this point in the history
svix-mman authored Jan 28, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent c875ff3 commit ce6ecb1
Showing 100 changed files with 2,140 additions and 509 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
@@ -30,11 +30,6 @@ jobs:
python -m pip install -r requirements.txt .
python -m pip install -r requirements-dev.txt .
- name: Regen openapi libs
run: |
cd python
./scripts/generate_openapi.sh
- name: Run linting
run: |
cd python
5 changes: 0 additions & 5 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
@@ -33,11 +33,6 @@ jobs:
cd python
python -m pip install build
- name: Regen openapi libs
run: |
cd python
./scripts/generate_openapi.sh
- name: Build distributions
run: |
cd python
4 changes: 0 additions & 4 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -36,10 +36,6 @@ jobs:
python -m pip install -r requirements-dev.txt .
working-directory: ./python

- name: Regen openapi libs
run: ./scripts/generate_openapi.sh
working-directory: ./python

- name: Check typing on client tests
run: mypy tests/test_client.py
working-directory: ./python
3 changes: 2 additions & 1 deletion python/mypy.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[mypy]
strict = True
strict = True
plugins = pydantic.mypy
53 changes: 6 additions & 47 deletions python/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -7,13 +7,7 @@
anyio==4.6.0
# via httpcore
attrs==24.2.0
# via
# openapi-python-client
# pytest-docker
autoflake==2.3.1
# via openapi-python-client
black==24.8.0
# via openapi-python-client
# via pytest-docker
build==1.2.2
# via pip-tools
certifi==2024.8.30
@@ -24,60 +18,38 @@ certifi==2024.8.30
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via
# black
# pip-tools
# typer
# via pip-tools
h11==0.14.0
# via httpcore
httpcore==0.17.3
# via httpx
httpx==0.24.1
# via
# -r requirements.in/development.txt
# openapi-python-client
# via -r requirements.in/development.txt
idna==3.10
# via
# anyio
# httpx
# requests
iniconfig==2.0.0
# via pytest
isort==5.13.2
# via openapi-python-client
jinja2==3.1.4
# via
# -r requirements.in/development.txt
# openapi-python-client
# via -r requirements.in/development.txt
markupsafe==2.1.5
# via
# jinja2
# werkzeug
mypy==1.11.2
# via -r requirements.in/development.txt
mypy-extensions==1.0.0
# via
# black
# mypy
openapi-python-client==0.14.1
# via -r requirements.in/development.txt
# via mypy
packaging==24.1
# via
# black
# build
# pytest
pathspec==0.12.1
# via black
pip-tools==7.4.1
# via -r requirements.in/development.txt
platformdirs==4.3.6
# via black
pluggy==1.5.0
# via pytest
pydantic==1.10.18
# via openapi-python-client
pyflakes==3.2.0
# via autoflake
pyproject-hooks==1.1.0
# via
# build
@@ -90,32 +62,19 @@ pytest-docker==3.1.1
# via -r requirements.in/development.txt
pytest-httpserver==1.1.0
# via -r requirements.in/development.txt
python-dateutil==2.9.0.post0
# via openapi-python-client
pyyaml==6.0.2
# via openapi-python-client
requests==2.32.3
# via -r requirements.in/development.txt
ruff==0.6.8
# via -r requirements.in/development.txt
shellingham==1.5.4
# via openapi-python-client
six==1.16.0
# via python-dateutil
sniffio==1.3.1
# via
# anyio
# httpcore
# httpx
typer==0.9.4
# via openapi-python-client
types-requests==2.32.0.20241016
# via -r requirements.in/development.txt
typing-extensions==4.12.2
# via
# mypy
# pydantic
# typer
# via mypy
urllib3==2.2.3
# via
# requests
1 change: 0 additions & 1 deletion python/requirements.in/development.txt
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@ mypy>=1.4.0
pip-tools>=6.13.0
pytest
httpx>=0.23.0
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
jinja2>=3.1.3
pytest-docker
pytest-httpserver
3 changes: 2 additions & 1 deletion python/requirements.txt
Original file line number Diff line number Diff line change
@@ -3,4 +3,5 @@ setuptools >= 21.0.0
urllib3 >= 1.25.3
Deprecated >= 1.2.13
types-deprecated >= 1.2.5
types-python-dateutil >= 2.8.9
types-python-dateutil >= 2.8.9
pydantic >= 2
17 changes: 0 additions & 17 deletions python/scripts/generate_openapi.sh

This file was deleted.

1 change: 1 addition & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@ def read_file(filepath):
META_PATH = os.path.join(PKG_DIR, PKG_NAME, "__init__.py")
META_CONTENTS = read_file(META_PATH)
PKG_REQUIRES = [
"pydantic >=2",
"httpx >=0.23.0",
"attrs >=21.3.0",
"python-dateutil",
Loading

0 comments on commit ce6ecb1

Please sign in to comment.