Skip to content

Commit 350c740

Browse files
committed
tests: Move langchain under toxgen
1 parent 1d473b6 commit 350c740

File tree

5 files changed

+49
-156
lines changed

5 files changed

+49
-156
lines changed

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

Lines changed: 4 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -22,89 +22,6 @@ env:
2222
CACHED_BUILD_PATHS: |
2323
${{ github.workspace }}/dist-serverless
2424
jobs:
25-
test-ai-latest:
26-
name: AI (latest)
27-
timeout-minutes: 30
28-
runs-on: ${{ matrix.os }}
29-
strategy:
30-
fail-fast: false
31-
matrix:
32-
python-version: ["3.9","3.11","3.12"]
33-
# python3.6 reached EOL and is no longer being supported on
34-
# new versions of hosted runners on Github Actions
35-
# ubuntu-20.04 is the last version that supported python3.6
36-
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
37-
os: [ubuntu-22.04]
38-
# Use Docker container only for Python 3.6
39-
container: ${{ matrix.python-version == '3.6' && 'python:3.6' || null }}
40-
steps:
41-
- uses: actions/[email protected]
42-
- uses: actions/setup-python@v5
43-
if: ${{ matrix.python-version != '3.6' }}
44-
with:
45-
python-version: ${{ matrix.python-version }}
46-
allow-prereleases: true
47-
- name: Setup Test Env
48-
run: |
49-
pip install "coverage[toml]" tox
50-
- name: Erase coverage
51-
run: |
52-
coverage erase
53-
- name: Test anthropic latest
54-
run: |
55-
set -x # print commands that are executed
56-
./scripts/runtox.sh "py${{ matrix.python-version }}-anthropic-latest"
57-
- name: Test cohere latest
58-
run: |
59-
set -x # print commands that are executed
60-
./scripts/runtox.sh "py${{ matrix.python-version }}-cohere-latest"
61-
- name: Test langchain latest
62-
run: |
63-
set -x # print commands that are executed
64-
./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-latest"
65-
- name: Test openai_base latest
66-
run: |
67-
set -x # print commands that are executed
68-
./scripts/runtox.sh "py${{ matrix.python-version }}-openai_base-latest"
69-
- name: Test openai_notiktoken latest
70-
run: |
71-
set -x # print commands that are executed
72-
./scripts/runtox.sh "py${{ matrix.python-version }}-openai_notiktoken-latest"
73-
- name: Test openai_agents latest
74-
run: |
75-
set -x # print commands that are executed
76-
./scripts/runtox.sh "py${{ matrix.python-version }}-openai_agents-latest"
77-
- name: Test huggingface_hub latest
78-
run: |
79-
set -x # print commands that are executed
80-
./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub-latest"
81-
- name: Generate coverage XML (Python 3.6)
82-
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
83-
run: |
84-
export COVERAGE_RCFILE=.coveragerc36
85-
coverage combine .coverage-sentry-*
86-
coverage xml --ignore-errors
87-
- name: Generate coverage XML
88-
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
89-
run: |
90-
coverage combine .coverage-sentry-*
91-
coverage xml
92-
- name: Upload coverage to Codecov
93-
if: ${{ !cancelled() }}
94-
uses: codecov/[email protected]
95-
with:
96-
token: ${{ secrets.CODECOV_TOKEN }}
97-
files: coverage.xml
98-
# make sure no plugins alter our coverage reports
99-
plugins: noop
100-
verbose: true
101-
- name: Upload test results to Codecov
102-
if: ${{ !cancelled() }}
103-
uses: codecov/test-results-action@v1
104-
with:
105-
token: ${{ secrets.CODECOV_TOKEN }}
106-
files: .junitxml
107-
verbose: true
10825
test-ai-pinned:
10926
name: AI (pinned)
11027
timeout-minutes: 30
@@ -145,14 +62,14 @@ jobs:
14562
run: |
14663
set -x # print commands that are executed
14764
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langchain"
148-
- name: Test openai_base pinned
65+
- name: Test openai-base pinned
14966
run: |
15067
set -x # print commands that are executed
151-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-openai_base"
152-
- name: Test openai_notiktoken pinned
68+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-openai-base"
69+
- name: Test openai-notiktoken pinned
15370
run: |
15471
set -x # print commands that are executed
155-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-openai_notiktoken"
72+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-openai-notiktoken"
15673
- name: Test openai_agents pinned
15774
run: |
15875
set -x # print commands that are executed

scripts/populate_tox/config.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,22 @@
126126
"huggingface_hub": {
127127
"package": "huggingface_hub",
128128
},
129+
"langchain-base": {
130+
"package": "langchain",
131+
"integration_name": "langchain",
132+
"deps": {
133+
"*": ["openai", "tiktoken"],
134+
"<=0.1": ["httpx<0.28.0"],
135+
},
136+
},
137+
"langchain-notiktoken": {
138+
"package": "langchain",
139+
"integration_name": "langchain",
140+
"deps": {
141+
"*": ["openai"],
142+
"<=0.1": ["httpx<0.28.0"],
143+
},
144+
},
129145
"launchdarkly": {
130146
"package": "launchdarkly-server-sdk",
131147
},
@@ -139,7 +155,7 @@
139155
"loguru": {
140156
"package": "loguru",
141157
},
142-
"openai_base": {
158+
"openai-base": {
143159
"package": "openai",
144160
"integration_name": "openai",
145161
"deps": {
@@ -148,7 +164,7 @@
148164
},
149165
"python": ">=3.8",
150166
},
151-
"openai_notiktoken": {
167+
"openai-notiktoken": {
152168
"package": "openai",
153169
"integration_name": "openai",
154170
"deps": {

scripts/populate_tox/tox.jinja

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ envlist =
7777
{py3.9,py3.11,py3.12}-httpx-v{0.25,0.27}
7878
{py3.9,py3.12,py3.13}-httpx-latest
7979

80-
# Langchain
81-
{py3.9,py3.11,py3.12}-langchain-v0.1
82-
{py3.9,py3.11,py3.12}-langchain-v0.3
83-
{py3.9,py3.11,py3.12}-langchain-latest
84-
{py3.9,py3.11,py3.12}-langchain-notiktoken
85-
8680
# OpenTelemetry (OTel)
8781
{py3.7,py3.9,py3.12,py3.13}-opentelemetry
8882

@@ -231,20 +225,6 @@ deps =
231225
httpx-v0.27: httpx~=0.27.0
232226
httpx-latest: httpx
233227
234-
# Langchain
235-
langchain-v0.1: openai~=1.0.0
236-
langchain-v0.1: langchain~=0.1.11
237-
langchain-v0.1: tiktoken~=0.6.0
238-
langchain-v0.1: httpx<0.28.0
239-
langchain-v0.3: langchain~=0.3.0
240-
langchain-v0.3: langchain-community
241-
langchain-v0.3: tiktoken
242-
langchain-v0.3: openai
243-
langchain-{latest,notiktoken}: langchain
244-
langchain-{latest,notiktoken}: langchain-openai
245-
langchain-{latest,notiktoken}: openai>=1.6.1
246-
langchain-latest: tiktoken~=0.6.0
247-
248228
# OpenTelemetry (OTel)
249229
opentelemetry: opentelemetry-distro
250230

scripts/split_tox_gh_actions/split_tox_gh_actions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
"anthropic",
6363
"cohere",
6464
"langchain",
65-
"openai_base",
66-
"openai_notiktoken",
65+
"openai-base",
66+
"openai-notiktoken",
6767
"openai_agents",
6868
"huggingface_hub",
6969
],

tox.ini

Lines changed: 25 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# The file (and all resulting CI YAMLs) then need to be regenerated via
1111
# "scripts/generate-test-files.sh".
1212
#
13-
# Last generated: 2025-09-01T14:09:50.564158+00:00
13+
# Last generated: 2025-09-02T09:02:57.313336+00:00
1414

1515
[tox]
1616
requires =
@@ -77,12 +77,6 @@ envlist =
7777
{py3.9,py3.11,py3.12}-httpx-v{0.25,0.27}
7878
{py3.9,py3.12,py3.13}-httpx-latest
7979

80-
# Langchain
81-
{py3.9,py3.11,py3.12}-langchain-v0.1
82-
{py3.9,py3.11,py3.12}-langchain-v0.3
83-
{py3.9,py3.11,py3.12}-langchain-latest
84-
{py3.9,py3.11,py3.12}-langchain-notiktoken
85-
8680
# OpenTelemetry (OTel)
8781
{py3.7,py3.9,py3.12,py3.13}-opentelemetry
8882

@@ -138,15 +132,15 @@ envlist =
138132
{py3.9,py3.11,py3.12}-cohere-v5.13.12
139133
{py3.9,py3.11,py3.12}-cohere-v5.17.0
140134

141-
{py3.8,py3.11,py3.12}-openai_base-v1.0.1
142-
{py3.8,py3.11,py3.12}-openai_base-v1.35.15
143-
{py3.8,py3.11,py3.12}-openai_base-v1.69.0
144-
{py3.8,py3.12,py3.13}-openai_base-v1.102.0
135+
{py3.8,py3.11,py3.12}-openai-base-v1.0.1
136+
{py3.8,py3.11,py3.12}-openai-base-v1.35.15
137+
{py3.8,py3.11,py3.12}-openai-base-v1.69.0
138+
{py3.8,py3.12,py3.13}-openai-base-v1.102.0
145139

146-
{py3.8,py3.11,py3.12}-openai_notiktoken-v1.0.1
147-
{py3.8,py3.11,py3.12}-openai_notiktoken-v1.35.15
148-
{py3.8,py3.11,py3.12}-openai_notiktoken-v1.69.0
149-
{py3.8,py3.12,py3.13}-openai_notiktoken-v1.102.0
140+
{py3.8,py3.11,py3.12}-openai-notiktoken-v1.0.1
141+
{py3.8,py3.11,py3.12}-openai-notiktoken-v1.35.15
142+
{py3.8,py3.11,py3.12}-openai-notiktoken-v1.69.0
143+
{py3.8,py3.12,py3.13}-openai-notiktoken-v1.102.0
150144

151145
{py3.10,py3.11,py3.12}-openai_agents-v0.0.19
152146
{py3.10,py3.12,py3.13}-openai_agents-v0.1.0
@@ -412,20 +406,6 @@ deps =
412406
httpx-v0.27: httpx~=0.27.0
413407
httpx-latest: httpx
414408

415-
# Langchain
416-
langchain-v0.1: openai~=1.0.0
417-
langchain-v0.1: langchain~=0.1.11
418-
langchain-v0.1: tiktoken~=0.6.0
419-
langchain-v0.1: httpx<0.28.0
420-
langchain-v0.3: langchain~=0.3.0
421-
langchain-v0.3: langchain-community
422-
langchain-v0.3: tiktoken
423-
langchain-v0.3: openai
424-
langchain-{latest,notiktoken}: langchain
425-
langchain-{latest,notiktoken}: langchain-openai
426-
langchain-{latest,notiktoken}: openai>=1.6.1
427-
langchain-latest: tiktoken~=0.6.0
428-
429409
# OpenTelemetry (OTel)
430410
opentelemetry: opentelemetry-distro
431411

@@ -516,22 +496,22 @@ deps =
516496
cohere-v5.13.12: cohere==5.13.12
517497
cohere-v5.17.0: cohere==5.17.0
518498

519-
openai_base-v1.0.1: openai==1.0.1
520-
openai_base-v1.35.15: openai==1.35.15
521-
openai_base-v1.69.0: openai==1.69.0
522-
openai_base-v1.102.0: openai==1.102.0
523-
openai_base: pytest-asyncio
524-
openai_base: tiktoken
525-
openai_base-v1.0.1: httpx<0.28
526-
openai_base-v1.35.15: httpx<0.28
527-
528-
openai_notiktoken-v1.0.1: openai==1.0.1
529-
openai_notiktoken-v1.35.15: openai==1.35.15
530-
openai_notiktoken-v1.69.0: openai==1.69.0
531-
openai_notiktoken-v1.102.0: openai==1.102.0
532-
openai_notiktoken: pytest-asyncio
533-
openai_notiktoken-v1.0.1: httpx<0.28
534-
openai_notiktoken-v1.35.15: httpx<0.28
499+
openai-base-v1.0.1: openai==1.0.1
500+
openai-base-v1.35.15: openai==1.35.15
501+
openai-base-v1.69.0: openai==1.69.0
502+
openai-base-v1.102.0: openai==1.102.0
503+
openai-base: pytest-asyncio
504+
openai-base: tiktoken
505+
openai-base-v1.0.1: httpx<0.28
506+
openai-base-v1.35.15: httpx<0.28
507+
508+
openai-notiktoken-v1.0.1: openai==1.0.1
509+
openai-notiktoken-v1.35.15: openai==1.35.15
510+
openai-notiktoken-v1.69.0: openai==1.69.0
511+
openai-notiktoken-v1.102.0: openai==1.102.0
512+
openai-notiktoken: pytest-asyncio
513+
openai-notiktoken-v1.0.1: httpx<0.28
514+
openai-notiktoken-v1.35.15: httpx<0.28
535515

536516
openai_agents-v0.0.19: openai-agents==0.0.19
537517
openai_agents-v0.1.0: openai-agents==0.1.0

0 commit comments

Comments
 (0)