Skip to content

Commit

Permalink
tests: Generate DB group by toxgen script (#3978)
Browse files Browse the repository at this point in the history
- remove hardcoded entries for `sqlalchemy`, `pymongo`,
`redis_py_cluster_legacy`, `clickhouse_driver` 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 13, 2025
1 parent c6b5994 commit feb642b
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-integrations-dbs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
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
15 changes: 15 additions & 0 deletions scripts/populate_tox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
},
"python": ">=3.8",
},
"clickhouse_driver": {
"package": "clickhouse-driver",
},
"gql": {
"package": "gql[all]",
},
Expand All @@ -32,6 +35,18 @@
"openfeature": {
"package": "openfeature-sdk",
},
"pymongo": {
"package": "pymongo",
"deps": {
"*": ["mockupdb"],
},
},
"redis_py_cluster_legacy": {
"package": "redis-py-cluster",
},
"sqlalchemy": {
"package": "sqlalchemy",
},
"statsig": {
"package": "statsig",
"deps": {
Expand Down
4 changes: 0 additions & 4 deletions scripts/populate_tox/populate_tox.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"bottle",
"celery",
"chalice",
"clickhouse_driver",
"cohere",
"cloud_resource_context",
"cohere",
Expand All @@ -81,19 +80,16 @@
"openai",
"openai_notiktoken",
"pure_eval",
"pymongo",
"pyramid",
"quart",
"ray",
"redis",
"redis_py_cluster_legacy",
"requests",
"rq",
"sanic",
"spark",
"starlette",
"starlite",
"sqlalchemy",
"tornado",
}

Expand Down
43 changes: 0 additions & 43 deletions scripts/populate_tox/tox.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ envlist =
{py3.6,py3.9}-chalice-v{1.16}
{py3.8,py3.12,py3.13}-chalice-latest

# Clickhouse Driver
{py3.8,py3.11}-clickhouse_driver-v{0.2.0}
{py3.8,py3.12,py3.13}-clickhouse_driver-latest

# Cloud Resource Context
{py3.6,py3.12,py3.13}-cloud_resource_context

Expand Down Expand Up @@ -185,13 +181,6 @@ envlist =
# pure_eval
{py3.6,py3.12,py3.13}-pure_eval

# PyMongo (Mongo DB)
{py3.6}-pymongo-v{3.1}
{py3.6,py3.9}-pymongo-v{3.12}
{py3.6,py3.11}-pymongo-v{4.0}
{py3.7,py3.11,py3.12}-pymongo-v{4.3,4.7}
{py3.7,py3.12,py3.13}-pymongo-latest

# Pyramid
{py3.6,py3.11}-pyramid-v{1.6}
{py3.6,py3.11,py3.12}-pyramid-v{1.10}
Expand All @@ -213,10 +202,6 @@ envlist =
{py3.7,py3.11,py3.12}-redis-v{5}
{py3.7,py3.12,py3.13}-redis-latest

# Redis Cluster
{py3.6,py3.8}-redis_py_cluster_legacy-v{1,2}
# no -latest, not developed anymore

# Requests
{py3.6,py3.8,py3.12,py3.13}-requests

Expand Down Expand Up @@ -247,11 +232,6 @@ envlist =
{py3.8,py3.11}-starlite-v{1.48,1.51}
# 1.51.14 is the last starlite version; the project continues as litestar

# SQL Alchemy
{py3.6,py3.9}-sqlalchemy-v{1.2,1.4}
{py3.7,py3.11}-sqlalchemy-v{2.0}
{py3.7,py3.12,py3.13}-sqlalchemy-latest

# Tornado
{py3.8,py3.11,py3.12}-tornado-v{6.0}
{py3.8,py3.11,py3.12}-tornado-v{6.2}
Expand Down Expand Up @@ -373,10 +353,6 @@ deps =
chalice-v1.16: chalice~=1.16.0
chalice-latest: chalice
# Clickhouse Driver
clickhouse_driver-v0.2.0: clickhouse_driver~=0.2.0
clickhouse_driver-latest: clickhouse_driver
# Cohere
cohere-v5: cohere~=5.3.3
cohere-latest: cohere
Expand Down Expand Up @@ -531,15 +507,6 @@ deps =
# pure_eval
pure_eval: pure_eval
# PyMongo (MongoDB)
pymongo: mockupdb
pymongo-v3.1: pymongo~=3.1.0
pymongo-v3.13: pymongo~=3.13.0
pymongo-v4.0: pymongo~=4.0.0
pymongo-v4.3: pymongo~=4.3.0
pymongo-v4.7: pymongo~=4.7.0
pymongo-latest: pymongo
# Pyramid
pyramid: Werkzeug<2.1.0
pyramid-v1.6: pyramid~=1.6.0
Expand Down Expand Up @@ -574,10 +541,6 @@ deps =
redis-v5: redis~=5.0
redis-latest: redis
# Redis Cluster
redis_py_cluster_legacy-v1: redis-py-cluster~=1.0
redis_py_cluster_legacy-v2: redis-py-cluster~=2.0
# Requests
requests: requests>=2.0
Expand Down Expand Up @@ -646,12 +609,6 @@ deps =
starlite-v{1.48}: starlite~=1.48.0
starlite-v{1.51}: starlite~=1.51.0
# SQLAlchemy
sqlalchemy-v1.2: sqlalchemy~=1.2.0
sqlalchemy-v1.4: sqlalchemy~=1.4.0
sqlalchemy-v2.0: sqlalchemy~=2.0.0
sqlalchemy-latest: sqlalchemy
# Tornado
# Tornado <6.4.1 is incompatible with Pytest ≥8.2
# See https://github.com/tornadoweb/tornado/pull/3382.
Expand Down
80 changes: 37 additions & 43 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ envlist =
{py3.6,py3.9}-chalice-v{1.16}
{py3.8,py3.12,py3.13}-chalice-latest

# Clickhouse Driver
{py3.8,py3.11}-clickhouse_driver-v{0.2.0}
{py3.8,py3.12,py3.13}-clickhouse_driver-latest

# Cloud Resource Context
{py3.6,py3.12,py3.13}-cloud_resource_context

Expand Down Expand Up @@ -185,13 +181,6 @@ envlist =
# pure_eval
{py3.6,py3.12,py3.13}-pure_eval

# PyMongo (Mongo DB)
{py3.6}-pymongo-v{3.1}
{py3.6,py3.9}-pymongo-v{3.12}
{py3.6,py3.11}-pymongo-v{4.0}
{py3.7,py3.11,py3.12}-pymongo-v{4.3,4.7}
{py3.7,py3.12,py3.13}-pymongo-latest

# Pyramid
{py3.6,py3.11}-pyramid-v{1.6}
{py3.6,py3.11,py3.12}-pyramid-v{1.10}
Expand All @@ -213,10 +202,6 @@ envlist =
{py3.7,py3.11,py3.12}-redis-v{5}
{py3.7,py3.12,py3.13}-redis-latest

# Redis Cluster
{py3.6,py3.8}-redis_py_cluster_legacy-v{1,2}
# no -latest, not developed anymore

# Requests
{py3.6,py3.8,py3.12,py3.13}-requests

Expand Down Expand Up @@ -247,11 +232,6 @@ envlist =
{py3.8,py3.11}-starlite-v{1.48,1.51}
# 1.51.14 is the last starlite version; the project continues as litestar

# SQL Alchemy
{py3.6,py3.9}-sqlalchemy-v{1.2,1.4}
{py3.7,py3.11}-sqlalchemy-v{2.0}
{py3.7,py3.12,py3.13}-sqlalchemy-latest

# Tornado
{py3.8,py3.11,py3.12}-tornado-v{6.0}
{py3.8,py3.11,py3.12}-tornado-v{6.2}
Expand All @@ -261,6 +241,24 @@ envlist =
# These come from the populate_tox.py script. Eventually we should move all
# integration tests there.

# ~~~ DBs ~~~
{py3.7,py3.11,py3.12}-clickhouse_driver-v0.2.9

{py3.6}-pymongo-v3.5.1
{py3.6,py3.10,py3.11}-pymongo-v3.13.0
{py3.6,py3.9,py3.10}-pymongo-v4.0.2
{py3.9,py3.12,py3.13}-pymongo-v4.11.1

{py3.6}-redis_py_cluster_legacy-v1.3.6
{py3.6,py3.7}-redis_py_cluster_legacy-v2.0.0
{py3.6,py3.7,py3.8}-redis_py_cluster_legacy-v2.1.3

{py3.6,py3.7}-sqlalchemy-v1.3.9
{py3.6,py3.11,py3.12}-sqlalchemy-v1.4.54
{py3.7,py3.10,py3.11}-sqlalchemy-v2.0.9
{py3.7,py3.12,py3.13}-sqlalchemy-v2.0.38


# ~~~ Flags ~~~
{py3.8,py3.12,py3.13}-launchdarkly-v9.8.1
{py3.8,py3.12,py3.13}-launchdarkly-v9.9.0
Expand Down Expand Up @@ -408,10 +406,6 @@ deps =
chalice-v1.16: chalice~=1.16.0
chalice-latest: chalice

# Clickhouse Driver
clickhouse_driver-v0.2.0: clickhouse_driver~=0.2.0
clickhouse_driver-latest: clickhouse_driver

# Cohere
cohere-v5: cohere~=5.3.3
cohere-latest: cohere
Expand Down Expand Up @@ -566,15 +560,6 @@ deps =
# pure_eval
pure_eval: pure_eval

# PyMongo (MongoDB)
pymongo: mockupdb
pymongo-v3.1: pymongo~=3.1.0
pymongo-v3.13: pymongo~=3.13.0
pymongo-v4.0: pymongo~=4.0.0
pymongo-v4.3: pymongo~=4.3.0
pymongo-v4.7: pymongo~=4.7.0
pymongo-latest: pymongo

# Pyramid
pyramid: Werkzeug<2.1.0
pyramid-v1.6: pyramid~=1.6.0
Expand Down Expand Up @@ -609,10 +594,6 @@ deps =
redis-v5: redis~=5.0
redis-latest: redis

# Redis Cluster
redis_py_cluster_legacy-v1: redis-py-cluster~=1.0
redis_py_cluster_legacy-v2: redis-py-cluster~=2.0

# Requests
requests: requests>=2.0

Expand Down Expand Up @@ -681,12 +662,6 @@ deps =
starlite-v{1.48}: starlite~=1.48.0
starlite-v{1.51}: starlite~=1.51.0

# SQLAlchemy
sqlalchemy-v1.2: sqlalchemy~=1.2.0
sqlalchemy-v1.4: sqlalchemy~=1.4.0
sqlalchemy-v2.0: sqlalchemy~=2.0.0
sqlalchemy-latest: sqlalchemy

# Tornado
# Tornado <6.4.1 is incompatible with Pytest ≥8.2
# See https://github.com/tornadoweb/tornado/pull/3382.
Expand All @@ -699,6 +674,25 @@ deps =
# These come from the populate_tox.py script. Eventually we should move all
# integration tests there.

# ~~~ DBs ~~~
clickhouse_driver-v0.2.9: clickhouse-driver==0.2.9

pymongo-v3.5.1: pymongo==3.5.1
pymongo-v3.13.0: pymongo==3.13.0
pymongo-v4.0.2: pymongo==4.0.2
pymongo-v4.11.1: pymongo==4.11.1
pymongo: mockupdb

redis_py_cluster_legacy-v1.3.6: redis-py-cluster==1.3.6
redis_py_cluster_legacy-v2.0.0: redis-py-cluster==2.0.0
redis_py_cluster_legacy-v2.1.3: redis-py-cluster==2.1.3

sqlalchemy-v1.3.9: sqlalchemy==1.3.9
sqlalchemy-v1.4.54: sqlalchemy==1.4.54
sqlalchemy-v2.0.9: sqlalchemy==2.0.9
sqlalchemy-v2.0.38: sqlalchemy==2.0.38


# ~~~ Flags ~~~
launchdarkly-v9.8.1: launchdarkly-server-sdk==9.8.1
launchdarkly-v9.9.0: launchdarkly-server-sdk==9.9.0
Expand Down

0 comments on commit feb642b

Please sign in to comment.