Skip to content

Commit

Permalink
tests: Generate some of the AI tox entries by toxgen (#3977)
Browse files Browse the repository at this point in the history
- remove hardcoded entries for `huggingface_hub` 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. This group in
particular needs special treatment because of the `notiktoken` versions
of some of the integrations.

---------

Co-authored-by: Daniel Szoke <[email protected]>
  • Loading branch information
sentrivana and szokeasaurusrex authored Feb 14, 2025
1 parent 85879b4 commit 25ddbca
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-ai.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.7","3.9","3.11","3.12","3.13"]
python-version: ["3.7","3.9","3.11","3.12"]
# 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 @@ -101,7 +101,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8","3.9","3.11","3.12","3.13"]
python-version: ["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
3 changes: 3 additions & 0 deletions scripts/populate_tox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
"py3.6": ["aiocontextvars"],
},
},
"huggingface_hub": {
"package": "huggingface_hub",
},
"launchdarkly": {
"package": "launchdarkly-server-sdk",
},
Expand Down
1 change: 0 additions & 1 deletion scripts/populate_tox/populate_tox.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"grpc",
"httpx",
"huey",
"huggingface_hub",
"langchain",
"langchain_notiktoken",
"litestar",
Expand Down
8 changes: 0 additions & 8 deletions scripts/populate_tox/tox.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ envlist =
{py3.6,py3.11,py3.12}-huey-v{2.0}
{py3.6,py3.12,py3.13}-huey-latest

# Huggingface Hub
{py3.9,py3.12,py3.13}-huggingface_hub-{v0.22}
{py3.9,py3.12,py3.13}-huggingface_hub-latest

# Langchain
{py3.9,py3.11,py3.12}-langchain-v0.1
{py3.9,py3.11,py3.12}-langchain-v0.3
Expand Down Expand Up @@ -433,10 +429,6 @@ deps =
huey-v2.0: huey~=2.0.0
huey-latest: huey
# Huggingface Hub
huggingface_hub-v0.22: huggingface_hub~=0.22.2
huggingface_hub-latest: huggingface_hub
# Langchain
langchain-v0.1: openai~=1.0.0
langchain-v0.1: langchain~=0.1.11
Expand Down
22 changes: 14 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ envlist =
{py3.6,py3.11,py3.12}-huey-v{2.0}
{py3.6,py3.12,py3.13}-huey-latest

# Huggingface Hub
{py3.9,py3.12,py3.13}-huggingface_hub-{v0.22}
{py3.9,py3.12,py3.13}-huggingface_hub-latest

# Langchain
{py3.9,py3.11,py3.12}-langchain-v0.1
{py3.9,py3.11,py3.12}-langchain-v0.3
Expand Down Expand Up @@ -229,6 +225,13 @@ envlist =
# These come from the populate_tox.py script. Eventually we should move all
# integration tests there.

# ~~~ AI ~~~
{py3.8,py3.10,py3.11}-huggingface_hub-v0.22.2
{py3.8,py3.10,py3.11}-huggingface_hub-v0.24.7
{py3.8,py3.11,py3.12}-huggingface_hub-v0.26.5
{py3.8,py3.12,py3.13}-huggingface_hub-v0.28.1


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

Expand Down Expand Up @@ -498,10 +501,6 @@ deps =
huey-v2.0: huey~=2.0.0
huey-latest: huey

# Huggingface Hub
huggingface_hub-v0.22: huggingface_hub~=0.22.2
huggingface_hub-latest: huggingface_hub

# Langchain
langchain-v0.1: openai~=1.0.0
langchain-v0.1: langchain~=0.1.11
Expand Down Expand Up @@ -646,6 +645,13 @@ deps =
# These come from the populate_tox.py script. Eventually we should move all
# integration tests there.

# ~~~ AI ~~~
huggingface_hub-v0.22.2: huggingface_hub==0.22.2
huggingface_hub-v0.24.7: huggingface_hub==0.24.7
huggingface_hub-v0.26.5: huggingface_hub==0.26.5
huggingface_hub-v0.28.1: huggingface_hub==0.28.1


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

Expand Down

0 comments on commit 25ddbca

Please sign in to comment.