File tree Expand file tree Collapse file tree 6 files changed +36
-10
lines changed Expand file tree Collapse file tree 6 files changed +36
-10
lines changed Original file line number Diff line number Diff line change 6262 run : |
6363 set -x # print commands that are executed
6464 ./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-latest"
65- - name : Test langchain-notiktoken latest
66- run : |
67- set -x # print commands that are executed
68- ./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-notiktoken-latest"
6965 - name : Test openai latest
7066 run : |
7167 set -x # print commands that are executed
@@ -141,10 +137,6 @@ jobs:
141137 run : |
142138 set -x # print commands that are executed
143139 ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langchain"
144- - name : Test langchain-notiktoken pinned
145- run : |
146- set -x # print commands that are executed
147- ./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langchain-notiktoken"
148140 - name : Test openai pinned
149141 run : |
150142 set -x # print commands that are executed
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ integration_name: {
4646 },
4747 "python": python_version_specifier,
4848 "include": package_version_specifier,
49+ "variants": another_integration_name,
4950}
5051```
5152
@@ -153,6 +154,28 @@ be expressed like so:
153154}
154155```
155156
157+ ### ` variants `
158+
159+ Sometimes we want to test a single integration against two different sets of
160+ dependencies. For example, ` langchain ` should be tested both with and without
161+ ` tiktoken ` . In that case, add the variant as its own entry in ` TEST_SUITE_CONFIG `
162+ and link it from the base variant by referencing its name in ` variants ` of the
163+ original variant:
164+
165+ ``` python
166+ {
167+ " langchain" : {
168+ " variants" : [" langchain-notiktoken" ],
169+ ...
170+ },
171+ " langchain-notiktoken" : {
172+ ...
173+ }
174+ }
175+ ```
176+
177+ This will result in both ` langchain ` and ` langchain-notiktoken ` being run under
178+ the Langchain CI workflow.
156179
157180## How-Tos
158181
Original file line number Diff line number Diff line change 146146 "<0.2" : ["httpx<0.28.0" , "openai~=1.0.0" ],
147147 ">0.2" : ["langchain-community" ],
148148 },
149+ "variants" : ["langchain-notiktoken" ],
149150 },
150151 "langchain-notiktoken" : {
151152 "package" : "langchain" ,
Original file line number Diff line number Diff line change @@ -646,6 +646,17 @@ def main(fail_on_changes: bool = False) -> None:
646646 }
647647 )
648648
649+ variants = TEST_SUITE_CONFIG [integration ].get ("variants" ) or []
650+ for variant in variants :
651+ packages [group ].append (
652+ {
653+ "name" : variant ,
654+ "package" : package ,
655+ "extra" : extra ,
656+ "releases" : test_releases ,
657+ }
658+ )
659+
649660 if fail_on_changes :
650661 old_file_hash = get_file_hash ()
651662
Original file line number Diff line number Diff line change 5858 "anthropic" ,
5959 "cohere" ,
6060 "langchain" ,
61- "langchain-notiktoken" ,
6261 "openai" ,
6362 "huggingface_hub" ,
6463 ],
Original file line number Diff line number Diff line change 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-05-06T10:28:08.299635 +00:00
13+ # Last generated: 2025-05-06T10:37:25.618827 +00:00
1414
1515[tox]
1616requires =
You can’t perform that action at this time.
0 commit comments