Skip to content

tests: Move langchain under toxgen #4349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/test-integrations-ai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-latest"
- name: Test langchain-notiktoken latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-notiktoken-latest"
- name: Test openai latest
run: |
set -x # print commands that are executed
Expand Down Expand Up @@ -137,6 +141,10 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langchain"
- name: Test langchain-notiktoken pinned
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langchain-notiktoken"
- name: Test openai pinned
run: |
set -x # print commands that are executed
Expand Down
27 changes: 27 additions & 0 deletions scripts/populate_tox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,33 @@
"huggingface_hub": {
"package": "huggingface_hub",
},
# Langchain
# langchain-v0.1: openai~=1.0.0
# langchain-v0.1: langchain~=0.1.11
# langchain-v0.1: tiktoken~=0.6.0
# langchain-v0.1: httpx<0.28.0
# langchain-v0.3: langchain~=0.3.0
# langchain-v0.3: langchain-community
# langchain-v0.3: tiktoken
# langchain-v0.3: openai
# langchain-{latest,notiktoken}: langchain
# langchain-{latest,notiktoken}: langchain-openai
# langchain-{latest,notiktoken}: openai>=1.6.1
# langchain-latest: tiktoken~=0.6.0
"langchain": {
"package": "langchain",
"deps": {
"*": ["openai", "tiktoken"],
"<0.2": ["httpx<0.28.0"],
">0.2": ["langchain-community"],
},
},
"langchain-notiktoken": {
"package": "langchain",
"deps": {
"*": ["langchain-openai"],
},
},
"launchdarkly": {
"package": "launchdarkly-server-sdk",
},
Expand Down
2 changes: 0 additions & 2 deletions scripts/populate_tox/populate_tox.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@
"chalice",
"gcp",
"httpx",
"langchain",
"langchain_notiktoken",
"openai",
"openai_notiktoken",
"pure_eval",
Expand Down
20 changes: 0 additions & 20 deletions scripts/populate_tox/tox.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ envlist =
{py3.9,py3.11,py3.12}-httpx-v{0.25,0.27}
{py3.9,py3.12,py3.13}-httpx-latest

# Langchain
{py3.9,py3.11,py3.12}-langchain-v0.1
{py3.9,py3.11,py3.12}-langchain-v0.3
{py3.9,py3.11,py3.12}-langchain-latest
{py3.9,py3.11,py3.12}-langchain-notiktoken

# OpenAI
{py3.9,py3.11,py3.12}-openai-v1.0
{py3.9,py3.11,py3.12}-openai-v1.22
Expand Down Expand Up @@ -236,20 +230,6 @@ deps =
httpx-v0.27: httpx~=0.27.0
httpx-latest: httpx

# Langchain
langchain-v0.1: openai~=1.0.0
langchain-v0.1: langchain~=0.1.11
langchain-v0.1: tiktoken~=0.6.0
langchain-v0.1: httpx<0.28.0
langchain-v0.3: langchain~=0.3.0
langchain-v0.3: langchain-community
langchain-v0.3: tiktoken
langchain-v0.3: openai
langchain-{latest,notiktoken}: langchain
langchain-{latest,notiktoken}: langchain-openai
langchain-{latest,notiktoken}: openai>=1.6.1
langchain-latest: tiktoken~=0.6.0

# OpenAI
openai: pytest-asyncio
openai-v1.0: openai~=1.0.0
Expand Down
1 change: 1 addition & 0 deletions scripts/split_tox_gh_actions/split_tox_gh_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"anthropic",
"cohere",
"langchain",
"langchain-notiktoken",
"openai",
"huggingface_hub",
],
Expand Down
49 changes: 28 additions & 21 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# The file (and all resulting CI YAMLs) then need to be regenerated via
# "scripts/generate-test-files.sh".
#
# Last generated: 2025-04-29T08:35:44.624881+00:00
# Last generated: 2025-04-29T10:30:10.128741+00:00

[tox]
requires =
Expand Down Expand Up @@ -77,12 +77,6 @@ envlist =
{py3.9,py3.11,py3.12}-httpx-v{0.25,0.27}
{py3.9,py3.12,py3.13}-httpx-latest

# Langchain
{py3.9,py3.11,py3.12}-langchain-v0.1
{py3.9,py3.11,py3.12}-langchain-v0.3
{py3.9,py3.11,py3.12}-langchain-latest
{py3.9,py3.11,py3.12}-langchain-notiktoken

# OpenAI
{py3.9,py3.11,py3.12}-openai-v1.0
{py3.9,py3.11,py3.12}-openai-v1.22
Expand Down Expand Up @@ -145,6 +139,16 @@ envlist =
{py3.9,py3.11,py3.12}-cohere-v5.11.4
{py3.9,py3.11,py3.12}-cohere-v5.15.0

{py3.9,py3.10,py3.11}-langchain-v0.0.354
{py3.9,py3.11,py3.12}-langchain-v0.1.20
{py3.9,py3.11,py3.12}-langchain-v0.2.17
{py3.9,py3.12,py3.13}-langchain-v0.3.24

{py3.9,py3.10,py3.11}-langchain-notiktoken-v0.0.354
{py3.9,py3.11,py3.12}-langchain-notiktoken-v0.1.20
{py3.9,py3.11,py3.12}-langchain-notiktoken-v0.2.17
{py3.9,py3.12,py3.13}-langchain-notiktoken-v0.3.24

{py3.8,py3.10,py3.11}-huggingface_hub-v0.22.2
{py3.8,py3.10,py3.11}-huggingface_hub-v0.25.2
{py3.8,py3.12,py3.13}-huggingface_hub-v0.28.1
Expand Down Expand Up @@ -397,20 +401,6 @@ deps =
httpx-v0.27: httpx~=0.27.0
httpx-latest: httpx

# Langchain
langchain-v0.1: openai~=1.0.0
langchain-v0.1: langchain~=0.1.11
langchain-v0.1: tiktoken~=0.6.0
langchain-v0.1: httpx<0.28.0
langchain-v0.3: langchain~=0.3.0
langchain-v0.3: langchain-community
langchain-v0.3: tiktoken
langchain-v0.3: openai
langchain-{latest,notiktoken}: langchain
langchain-{latest,notiktoken}: langchain-openai
langchain-{latest,notiktoken}: openai>=1.6.1
langchain-latest: tiktoken~=0.6.0

# OpenAI
openai: pytest-asyncio
openai-v1.0: openai~=1.0.0
Expand Down Expand Up @@ -513,6 +503,23 @@ deps =
cohere-v5.11.4: cohere==5.11.4
cohere-v5.15.0: cohere==5.15.0

langchain-v0.0.354: langchain==0.0.354
langchain-v0.1.20: langchain==0.1.20
langchain-v0.2.17: langchain==0.2.17
langchain-v0.3.24: langchain==0.3.24
langchain: openai
langchain: tiktoken
langchain-v0.0.354: httpx<0.28.0
langchain-v0.1.20: httpx<0.28.0
langchain-v0.2.17: langchain-community
langchain-v0.3.24: langchain-community

langchain-notiktoken-v0.0.354: langchain==0.0.354
langchain-notiktoken-v0.1.20: langchain==0.1.20
langchain-notiktoken-v0.2.17: langchain==0.2.17
langchain-notiktoken-v0.3.24: langchain==0.3.24
langchain-notiktoken: langchain-openai

huggingface_hub-v0.22.2: huggingface_hub==0.22.2
huggingface_hub-v0.25.2: huggingface_hub==0.25.2
huggingface_hub-v0.28.1: huggingface_hub==0.28.1
Expand Down
Loading