Skip to content

Commit 25ddbca

Browse files
tests: Generate some of the AI tox entries by toxgen (#3977)
- 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]>
1 parent 85879b4 commit 25ddbca

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

.github/workflows/test-integrations-ai.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
python-version: ["3.7","3.9","3.11","3.12","3.13"]
32+
python-version: ["3.7","3.9","3.11","3.12"]
3333
# python3.6 reached EOL and is no longer being supported on
3434
# new versions of hosted runners on Github Actions
3535
# ubuntu-20.04 is the last version that supported python3.6
@@ -101,7 +101,7 @@ jobs:
101101
strategy:
102102
fail-fast: false
103103
matrix:
104-
python-version: ["3.8","3.9","3.11","3.12","3.13"]
104+
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13"]
105105
# python3.6 reached EOL and is no longer being supported on
106106
# new versions of hosted runners on Github Actions
107107
# ubuntu-20.04 is the last version that supported python3.6

scripts/populate_tox/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
"py3.6": ["aiocontextvars"],
3434
},
3535
},
36+
"huggingface_hub": {
37+
"package": "huggingface_hub",
38+
},
3639
"launchdarkly": {
3740
"package": "launchdarkly-server-sdk",
3841
},

scripts/populate_tox/populate_tox.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"grpc",
7373
"httpx",
7474
"huey",
75-
"huggingface_hub",
7675
"langchain",
7776
"langchain_notiktoken",
7877
"litestar",

scripts/populate_tox/tox.jinja

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,6 @@ envlist =
143143
{py3.6,py3.11,py3.12}-huey-v{2.0}
144144
{py3.6,py3.12,py3.13}-huey-latest
145145

146-
# Huggingface Hub
147-
{py3.9,py3.12,py3.13}-huggingface_hub-{v0.22}
148-
{py3.9,py3.12,py3.13}-huggingface_hub-latest
149-
150146
# Langchain
151147
{py3.9,py3.11,py3.12}-langchain-v0.1
152148
{py3.9,py3.11,py3.12}-langchain-v0.3
@@ -433,10 +429,6 @@ deps =
433429
huey-v2.0: huey~=2.0.0
434430
huey-latest: huey
435431
436-
# Huggingface Hub
437-
huggingface_hub-v0.22: huggingface_hub~=0.22.2
438-
huggingface_hub-latest: huggingface_hub
439-
440432
# Langchain
441433
langchain-v0.1: openai~=1.0.0
442434
langchain-v0.1: langchain~=0.1.11

tox.ini

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,6 @@ envlist =
143143
{py3.6,py3.11,py3.12}-huey-v{2.0}
144144
{py3.6,py3.12,py3.13}-huey-latest
145145

146-
# Huggingface Hub
147-
{py3.9,py3.12,py3.13}-huggingface_hub-{v0.22}
148-
{py3.9,py3.12,py3.13}-huggingface_hub-latest
149-
150146
# Langchain
151147
{py3.9,py3.11,py3.12}-langchain-v0.1
152148
{py3.9,py3.11,py3.12}-langchain-v0.3
@@ -229,6 +225,13 @@ envlist =
229225
# These come from the populate_tox.py script. Eventually we should move all
230226
# integration tests there.
231227

228+
# ~~~ AI ~~~
229+
{py3.8,py3.10,py3.11}-huggingface_hub-v0.22.2
230+
{py3.8,py3.10,py3.11}-huggingface_hub-v0.24.7
231+
{py3.8,py3.11,py3.12}-huggingface_hub-v0.26.5
232+
{py3.8,py3.12,py3.13}-huggingface_hub-v0.28.1
233+
234+
232235
# ~~~ DBs ~~~
233236
{py3.7,py3.11,py3.12}-clickhouse_driver-v0.2.9
234237

@@ -498,10 +501,6 @@ deps =
498501
huey-v2.0: huey~=2.0.0
499502
huey-latest: huey
500503

501-
# Huggingface Hub
502-
huggingface_hub-v0.22: huggingface_hub~=0.22.2
503-
huggingface_hub-latest: huggingface_hub
504-
505504
# Langchain
506505
langchain-v0.1: openai~=1.0.0
507506
langchain-v0.1: langchain~=0.1.11
@@ -646,6 +645,13 @@ deps =
646645
# These come from the populate_tox.py script. Eventually we should move all
647646
# integration tests there.
648647

648+
# ~~~ AI ~~~
649+
huggingface_hub-v0.22.2: huggingface_hub==0.22.2
650+
huggingface_hub-v0.24.7: huggingface_hub==0.24.7
651+
huggingface_hub-v0.26.5: huggingface_hub==0.26.5
652+
huggingface_hub-v0.28.1: huggingface_hub==0.28.1
653+
654+
649655
# ~~~ DBs ~~~
650656
clickhouse_driver-v0.2.9: clickhouse-driver==0.2.9
651657

0 commit comments

Comments
 (0)