Skip to content

Commit

Permalink
tests: Generate some of the Web 2 tox entries by toxgen (#3981)
Browse files Browse the repository at this point in the history
- remove hardcoded entries for `falcon`, `starlite`, `pyramid`,
`bottle`, `tornado` from the tox template
- remove them from the ignore list in `populate_tox.py`
- run `populate_tox.py` to fill in entries for them
- run `split_gh_tox_actions.py` to generate the CI yaml files so that
they correspond to the new tox.ini

The remaining integrations in this group are not trivial to port to the
script, I'll do this step by step in follow-up PRs.

---------

Co-authored-by: Daniel Szoke <[email protected]>
  • Loading branch information
sentrivana and szokeasaurusrex authored Feb 14, 2025
1 parent 8f22def commit 24afdb3
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 133 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-web-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6","3.7","3.8","3.9","3.11","3.12","3.13"]
python-version: ["3.8","3.9","3.11","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6","3.7","3.8","3.9","3.11","3.12","3.13"]
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down
40 changes: 40 additions & 0 deletions scripts/populate_tox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
},
"python": ">=3.8",
},
"bottle": {
"package": "bottle",
"deps": {
"*": ["werkzeug<2.1.0"],
},
},
"celery": {
"package": "celery",
"deps": {
Expand All @@ -26,6 +32,10 @@
"dramatiq": {
"package": "dramatiq",
},
"falcon": {
"package": "falcon",
"python": "<3.13",
},
"flask": {
"package": "flask",
"deps": {
Expand Down Expand Up @@ -64,6 +74,12 @@
"*": ["mockupdb"],
},
},
"pyramid": {
"package": "pyramid",
"deps": {
"*": ["werkzeug<2.1.0"],
},
},
"redis_py_cluster_legacy": {
"package": "redis-py-cluster",
},
Expand All @@ -90,6 +106,20 @@
"py3.6": ["aiocontextvars"],
},
},
"starlite": {
"package": "starlite",
"deps": {
"*": [
"pytest-asyncio",
"python-multipart",
"requests",
"cryptography",
"pydantic<2.0.0",
"httpx<0.28",
],
},
"python": "<=3.11",
},
"statsig": {
"package": "statsig",
"deps": {
Expand All @@ -102,6 +132,16 @@
"*": ["httpx"],
},
},
"tornado": {
"package": "tornado",
"deps": {
"*": ["pytest"],
"<=6.4.1": [
"pytest<8.2"
], # https://github.com/tornadoweb/tornado/pull/3382
"py3.6": ["aiocontextvars"],
},
},
"trytond": {
"package": "trytond",
"deps": {
Expand Down
5 changes: 0 additions & 5 deletions scripts/populate_tox/populate_tox.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@
"aws_lambda",
"beam",
"boto3",
"bottle",
"chalice",
"cohere",
"cloud_resource_context",
"cohere",
"django",
"falcon",
"fastapi",
"gcp",
"grpc",
Expand All @@ -77,15 +75,12 @@
"openai",
"openai_notiktoken",
"pure_eval",
"pyramid",
"quart",
"ray",
"redis",
"requests",
"rq",
"sanic",
"starlite",
"tornado",
}


Expand Down
63 changes: 0 additions & 63 deletions scripts/populate_tox/tox.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ envlist =
{py3.11,py3.12}-boto3-v{1.34}
{py3.11,py3.12,py3.13}-boto3-latest

# Bottle
{py3.6,py3.9}-bottle-v{0.12}
{py3.6,py3.12,py3.13}-bottle-latest

# Chalice
{py3.6,py3.9}-chalice-v{1.16}
{py3.8,py3.12,py3.13}-chalice-latest
Expand All @@ -100,12 +96,6 @@ envlist =
{py3.10,py3.11,py3.12}-django-v{5.0,5.1}
{py3.10,py3.12,py3.13}-django-latest

# Falcon
{py3.6,py3.7}-falcon-v{1,1.4,2}
{py3.6,py3.11,py3.12}-falcon-v{3}
{py3.8,py3.11,py3.12}-falcon-v{4}
{py3.7,py3.11,py3.12}-falcon-latest

# FastAPI
{py3.7,py3.10}-fastapi-v{0.79}
{py3.8,py3.12,py3.13}-fastapi-latest
Expand Down Expand Up @@ -154,12 +144,6 @@ envlist =
# pure_eval
{py3.6,py3.12,py3.13}-pure_eval

# Pyramid
{py3.6,py3.11}-pyramid-v{1.6}
{py3.6,py3.11,py3.12}-pyramid-v{1.10}
{py3.6,py3.11,py3.12}-pyramid-v{2.0}
{py3.6,py3.11,py3.12}-pyramid-latest

# Quart
{py3.7,py3.11}-quart-v{0.16}
{py3.8,py3.11,py3.12}-quart-v{0.19}
Expand Down Expand Up @@ -191,15 +175,6 @@ envlist =
{py3.8,py3.11,py3.12}-sanic-v{24.6}
{py3.9,py3.12,py3.13}-sanic-latest

# Starlite
{py3.8,py3.11}-starlite-v{1.48,1.51}
# 1.51.14 is the last starlite version; the project continues as litestar

# Tornado
{py3.8,py3.11,py3.12}-tornado-v{6.0}
{py3.8,py3.11,py3.12}-tornado-v{6.2}
{py3.8,py3.11,py3.12}-tornado-latest

# === Integrations - Auto-generated ===
# These come from the populate_tox.py script. Eventually we should move all
# integration tests there.
Expand Down Expand Up @@ -291,11 +266,6 @@ deps =
boto3-v1.34: boto3~=1.34.0
boto3-latest: boto3
# Bottle
bottle: Werkzeug<2.1.0
bottle-v0.12: bottle~=0.12.0
bottle-latest: bottle
# Chalice
chalice: pytest-chalice==0.0.5
chalice-v1.16: chalice~=1.16.0
Expand Down Expand Up @@ -334,14 +304,6 @@ deps =
django-v5.1: Django==5.1rc1
django-latest: Django
# Falcon
falcon-v1.4: falcon~=1.4.0
falcon-v1: falcon~=1.0
falcon-v2: falcon~=2.0
falcon-v3: falcon~=3.0
falcon-v4: falcon~=4.0
falcon-latest: falcon
# FastAPI
fastapi: httpx
# (this is a dependency of httpx)
Expand Down Expand Up @@ -431,13 +393,6 @@ deps =
# pure_eval
pure_eval: pure_eval
# Pyramid
pyramid: Werkzeug<2.1.0
pyramid-v1.6: pyramid~=1.6.0
pyramid-v1.10: pyramid~=1.10.0
pyramid-v2.0: pyramid~=2.0.0
pyramid-latest: pyramid
# Quart
quart: quart-auth
quart: pytest-asyncio
Expand Down Expand Up @@ -497,24 +452,6 @@ deps =
sanic-v24.6: sanic~=24.6.0
sanic-latest: sanic
# Starlite
starlite: pytest-asyncio
starlite: python-multipart
starlite: requests
starlite: cryptography
starlite: pydantic<2.0.0
starlite: httpx<0.28
starlite-v{1.48}: starlite~=1.48.0
starlite-v{1.51}: starlite~=1.51.0
# Tornado
# Tornado <6.4.1 is incompatible with Pytest ≥8.2
# See https://github.com/tornadoweb/tornado/pull/3382.
tornado-{v6.0,v6.2}: pytest<8.2
tornado-v6.0: tornado~=6.0.0
tornado-v6.2: tornado~=6.2.0
tornado-latest: tornado
# === Integrations - Auto-generated ===
# These come from the populate_tox.py script. Eventually we should move all
# integration tests there.
Expand Down
Loading

0 comments on commit 24afdb3

Please sign in to comment.