langgraph-cli 0.3.1__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/PKG-INFO +1 -1
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs/storm.py +4 -4
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/langgraph_cli/config.py +27 -2
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/pyproject.toml +1 -1
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/schemas/schema.json +22 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/schemas/schema.v0.json +22 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/test_config.py +126 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/uv.lock +1 -1
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/.gitignore +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/LICENSE +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/Makefile +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/README.md +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/.env.example +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/.gitignore +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/Makefile +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs/agent.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs/langgraph.json +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_a/__init__.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_a/graphs_submod/__init__.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_a/graphs_submod/agent.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_a/graphs_submod/subprompt.txt +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_a/hello.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_a/langgraph.json +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_a/prompt.txt +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_a/requirements.txt +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_b/graphs_submod/agent.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_b/graphs_submod/subprompt.txt +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_b/hello.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_b/langgraph.json +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_b/prompt.txt +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_b/requirements.txt +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_b/utils/__init__.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_b/utils/greeter.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/langgraph.json +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/my_app.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/pipconf.txt +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/poetry.lock +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/pyproject.toml +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/generate_schema.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/.dockerignore +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/.env.example +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/.eslintrc.cjs +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/.gitignore +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/LICENSE +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/README.md +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/jest.config.js +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/langgraph.json +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/package.json +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/src/agent/graph.ts +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/src/agent/state.ts +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/static/studio.png +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/tests/agent.test.ts +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/tests/graph.int.test.ts +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/tsconfig.json +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/js-examples/yarn.lock +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/langgraph_cli/__init__.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/langgraph_cli/__main__.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/langgraph_cli/analytics.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/langgraph_cli/cli.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/langgraph_cli/constants.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/langgraph_cli/docker.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/langgraph_cli/exec.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/langgraph_cli/progress.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/langgraph_cli/py.typed +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/langgraph_cli/templates.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/langgraph_cli/util.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/langgraph_cli/version.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/__init__.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/integration_tests/__init__.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/integration_tests/test_cli.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/__init__.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/agent.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/cli/__init__.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/cli/langgraph.json +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/cli/pyproject.toml +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/cli/test_cli.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/cli/test_templates.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/conftest.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/graphs/agent.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/helpers.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/multiplatform/js.mts +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/multiplatform/python.py +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/pipconfig.txt +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/test_config.json +0 -0
- {langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/tests/unit_tests/test_docker.py +0 -0
|
@@ -22,10 +22,10 @@ from langgraph.graph import END, StateGraph
|
|
|
22
22
|
from pydantic import BaseModel, Field
|
|
23
23
|
from typing_extensions import TypedDict
|
|
24
24
|
|
|
25
|
-
fast_llm = ChatOpenAI(model="gpt-
|
|
25
|
+
fast_llm = ChatOpenAI(model="gpt-4o-mini")
|
|
26
26
|
# Uncomment for a Fireworks model
|
|
27
27
|
# fast_llm = ChatFireworks(model="accounts/fireworks/models/firefunction-v1", max_tokens=32_000)
|
|
28
|
-
long_context_llm = ChatOpenAI(model="gpt-
|
|
28
|
+
long_context_llm = ChatOpenAI(model="gpt-4o")
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
direct_gen_outline_prompt = ChatPromptTemplate.from_messages(
|
|
@@ -144,7 +144,7 @@ gen_perspectives_prompt = ChatPromptTemplate.from_messages(
|
|
|
144
144
|
)
|
|
145
145
|
|
|
146
146
|
gen_perspectives_chain = gen_perspectives_prompt | ChatOpenAI(
|
|
147
|
-
model="gpt-
|
|
147
|
+
model="gpt-4o-mini"
|
|
148
148
|
).with_structured_output(Perspectives)
|
|
149
149
|
|
|
150
150
|
|
|
@@ -270,7 +270,7 @@ gen_queries_prompt = ChatPromptTemplate.from_messages(
|
|
|
270
270
|
]
|
|
271
271
|
)
|
|
272
272
|
gen_queries_chain = gen_queries_prompt | ChatOpenAI(
|
|
273
|
-
model="gpt-
|
|
273
|
+
model="gpt-4o-mini"
|
|
274
274
|
).with_structured_output(Queries, include_raw=True)
|
|
275
275
|
|
|
276
276
|
|
|
@@ -383,6 +383,14 @@ class Config(TypedDict, total=False):
|
|
|
383
383
|
Only relevant if Python dependencies are installed via pip. If omitted, default pip settings are used.
|
|
384
384
|
"""
|
|
385
385
|
|
|
386
|
+
pip_installer: Optional[str]
|
|
387
|
+
"""Optional. Python package installer to use ('auto', 'pip', 'uv').
|
|
388
|
+
|
|
389
|
+
- 'auto' (default): Use uv for supported base images, otherwise pip
|
|
390
|
+
- 'pip': Force use of pip regardless of base image support
|
|
391
|
+
- 'uv': Force use of uv (will fail if base image doesn't support it)
|
|
392
|
+
"""
|
|
393
|
+
|
|
386
394
|
dockerfile_lines: list[str]
|
|
387
395
|
"""Optional. Additional Docker instructions that will be appended to your base Dockerfile.
|
|
388
396
|
|
|
@@ -536,6 +544,7 @@ def validate_config(config: Config) -> Config:
|
|
|
536
544
|
"node_version": node_version,
|
|
537
545
|
"python_version": python_version,
|
|
538
546
|
"pip_config_file": config.get("pip_config_file"),
|
|
547
|
+
"pip_installer": config.get("pip_installer", "auto"),
|
|
539
548
|
"_INTERNAL_docker_tag": config.get("_INTERNAL_docker_tag"),
|
|
540
549
|
"base_image": config.get("base_image"),
|
|
541
550
|
"image_distro": image_distro,
|
|
@@ -600,6 +609,13 @@ def validate_config(config: Config) -> Config:
|
|
|
600
609
|
"Must be either 'debian' or 'wolfi'."
|
|
601
610
|
)
|
|
602
611
|
|
|
612
|
+
if pip_installer := config.get("pip_installer"):
|
|
613
|
+
if pip_installer not in ["auto", "pip", "uv"]:
|
|
614
|
+
raise click.UsageError(
|
|
615
|
+
f"Invalid pip_installer: '{pip_installer}'. "
|
|
616
|
+
"Must be 'auto', 'pip', or 'uv'."
|
|
617
|
+
)
|
|
618
|
+
|
|
603
619
|
# Validate auth config
|
|
604
620
|
if auth_conf := config.get("auth"):
|
|
605
621
|
if "path" in auth_conf:
|
|
@@ -1114,12 +1130,21 @@ def python_config_to_docker(
|
|
|
1114
1130
|
base_image: str,
|
|
1115
1131
|
) -> tuple[str, dict[str, str]]:
|
|
1116
1132
|
"""Generate a Dockerfile from the configuration."""
|
|
1117
|
-
|
|
1133
|
+
pip_installer = config.get("pip_installer", "auto")
|
|
1134
|
+
|
|
1135
|
+
if pip_installer == "uv":
|
|
1118
1136
|
install_cmd = "uv pip install --system"
|
|
1119
1137
|
uv_removal = "RUN uv pip uninstall --system pip setuptools wheel && rm /usr/bin/uv /usr/bin/uvx"
|
|
1120
|
-
|
|
1138
|
+
elif pip_installer == "pip":
|
|
1121
1139
|
install_cmd = "pip install"
|
|
1122
1140
|
uv_removal = ""
|
|
1141
|
+
else:
|
|
1142
|
+
if _image_supports_uv(base_image):
|
|
1143
|
+
install_cmd = "uv pip install --system"
|
|
1144
|
+
uv_removal = "RUN uv pip uninstall --system pip setuptools wheel && rm /usr/bin/uv /usr/bin/uvx"
|
|
1145
|
+
else:
|
|
1146
|
+
install_cmd = "pip install"
|
|
1147
|
+
uv_removal = ""
|
|
1123
1148
|
|
|
1124
1149
|
# configure pip
|
|
1125
1150
|
pip_install = f"PYTHONDONTWRITEBYTECODE=1 {install_cmd} --no-cache-dir -c /api/constraints.txt"
|
|
@@ -134,6 +134,17 @@
|
|
|
134
134
|
],
|
|
135
135
|
"description": "Optional. Linux distribution for the base image.\n\nMust be either 'debian' or 'wolfi'. If omitted, defaults to 'debian'.\n"
|
|
136
136
|
},
|
|
137
|
+
"pip_installer": {
|
|
138
|
+
"anyOf": [
|
|
139
|
+
{
|
|
140
|
+
"type": "string"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"type": "null"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"description": "Optional. Python package installer to use ('auto', 'pip', 'uv').\n\n"
|
|
147
|
+
},
|
|
137
148
|
"store": {
|
|
138
149
|
"anyOf": [
|
|
139
150
|
{
|
|
@@ -287,6 +298,17 @@
|
|
|
287
298
|
],
|
|
288
299
|
"description": "Optional. Linux distribution for the base image.\n\nMust be either 'debian' or 'wolfi'. If omitted, defaults to 'debian'.\n"
|
|
289
300
|
},
|
|
301
|
+
"pip_installer": {
|
|
302
|
+
"anyOf": [
|
|
303
|
+
{
|
|
304
|
+
"type": "string"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"type": "null"
|
|
308
|
+
}
|
|
309
|
+
],
|
|
310
|
+
"description": "Optional. Python package installer to use ('auto', 'pip', 'uv').\n\n"
|
|
311
|
+
},
|
|
290
312
|
"store": {
|
|
291
313
|
"anyOf": [
|
|
292
314
|
{
|
|
@@ -134,6 +134,17 @@
|
|
|
134
134
|
],
|
|
135
135
|
"description": "Optional. Linux distribution for the base image.\n\nMust be either 'debian' or 'wolfi'. If omitted, defaults to 'debian'.\n"
|
|
136
136
|
},
|
|
137
|
+
"pip_installer": {
|
|
138
|
+
"anyOf": [
|
|
139
|
+
{
|
|
140
|
+
"type": "string"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"type": "null"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"description": "Optional. Python package installer to use ('auto', 'pip', 'uv').\n\n"
|
|
147
|
+
},
|
|
137
148
|
"store": {
|
|
138
149
|
"anyOf": [
|
|
139
150
|
{
|
|
@@ -287,6 +298,17 @@
|
|
|
287
298
|
],
|
|
288
299
|
"description": "Optional. Linux distribution for the base image.\n\nMust be either 'debian' or 'wolfi'. If omitted, defaults to 'debian'.\n"
|
|
289
300
|
},
|
|
301
|
+
"pip_installer": {
|
|
302
|
+
"anyOf": [
|
|
303
|
+
{
|
|
304
|
+
"type": "string"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"type": "null"
|
|
308
|
+
}
|
|
309
|
+
],
|
|
310
|
+
"description": "Optional. Python package installer to use ('auto', 'pip', 'uv').\n\n"
|
|
311
|
+
},
|
|
290
312
|
"store": {
|
|
291
313
|
"anyOf": [
|
|
292
314
|
{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import copy
|
|
1
2
|
import json
|
|
2
3
|
import os
|
|
3
4
|
import pathlib
|
|
@@ -40,6 +41,7 @@ def test_validate_config():
|
|
|
40
41
|
"python_version": "3.11",
|
|
41
42
|
"node_version": None,
|
|
42
43
|
"pip_config_file": None,
|
|
44
|
+
"pip_installer": "auto",
|
|
43
45
|
"image_distro": "debian",
|
|
44
46
|
"dockerfile_lines": [],
|
|
45
47
|
"env": {},
|
|
@@ -61,6 +63,7 @@ def test_validate_config():
|
|
|
61
63
|
"python_version": "3.12",
|
|
62
64
|
"node_version": None,
|
|
63
65
|
"pip_config_file": "pipconfig.txt",
|
|
66
|
+
"pip_installer": "auto",
|
|
64
67
|
"image_distro": "debian",
|
|
65
68
|
"dockerfile_lines": ["ARG meow"],
|
|
66
69
|
"dependencies": [".", "langchain"],
|
|
@@ -216,6 +219,74 @@ def test_validate_config_image_distro():
|
|
|
216
219
|
assert config["image_distro"] == "debian"
|
|
217
220
|
|
|
218
221
|
|
|
222
|
+
def test_validate_config_pip_installer():
|
|
223
|
+
"""Test validation of pip_installer field."""
|
|
224
|
+
# Valid pip_installer values should work
|
|
225
|
+
config = validate_config(
|
|
226
|
+
{
|
|
227
|
+
"python_version": "3.11",
|
|
228
|
+
"dependencies": ["."],
|
|
229
|
+
"graphs": {"agent": "./agent.py:graph"},
|
|
230
|
+
"pip_installer": "auto",
|
|
231
|
+
}
|
|
232
|
+
)
|
|
233
|
+
assert config["pip_installer"] == "auto"
|
|
234
|
+
|
|
235
|
+
config = validate_config(
|
|
236
|
+
{
|
|
237
|
+
"python_version": "3.11",
|
|
238
|
+
"dependencies": ["."],
|
|
239
|
+
"graphs": {"agent": "./agent.py:graph"},
|
|
240
|
+
"pip_installer": "pip",
|
|
241
|
+
}
|
|
242
|
+
)
|
|
243
|
+
assert config["pip_installer"] == "pip"
|
|
244
|
+
|
|
245
|
+
config = validate_config(
|
|
246
|
+
{
|
|
247
|
+
"python_version": "3.11",
|
|
248
|
+
"dependencies": ["."],
|
|
249
|
+
"graphs": {"agent": "./agent.py:graph"},
|
|
250
|
+
"pip_installer": "uv",
|
|
251
|
+
}
|
|
252
|
+
)
|
|
253
|
+
assert config["pip_installer"] == "uv"
|
|
254
|
+
|
|
255
|
+
# Missing pip_installer should default to "auto"
|
|
256
|
+
config = validate_config(
|
|
257
|
+
{
|
|
258
|
+
"python_version": "3.11",
|
|
259
|
+
"dependencies": ["."],
|
|
260
|
+
"graphs": {"agent": "./agent.py:graph"},
|
|
261
|
+
}
|
|
262
|
+
)
|
|
263
|
+
assert config["pip_installer"] == "auto"
|
|
264
|
+
|
|
265
|
+
# Invalid pip_installer values should raise error
|
|
266
|
+
with pytest.raises(click.UsageError) as exc_info:
|
|
267
|
+
validate_config(
|
|
268
|
+
{
|
|
269
|
+
"python_version": "3.11",
|
|
270
|
+
"dependencies": ["."],
|
|
271
|
+
"graphs": {"agent": "./agent.py:graph"},
|
|
272
|
+
"pip_installer": "conda",
|
|
273
|
+
}
|
|
274
|
+
)
|
|
275
|
+
assert "Invalid pip_installer: 'conda'" in str(exc_info.value)
|
|
276
|
+
assert "Must be 'auto', 'pip', or 'uv'" in str(exc_info.value)
|
|
277
|
+
|
|
278
|
+
with pytest.raises(click.UsageError) as exc_info:
|
|
279
|
+
validate_config(
|
|
280
|
+
{
|
|
281
|
+
"python_version": "3.11",
|
|
282
|
+
"dependencies": ["."],
|
|
283
|
+
"graphs": {"agent": "./agent.py:graph"},
|
|
284
|
+
"pip_installer": "invalid",
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
assert "Invalid pip_installer: 'invalid'" in str(exc_info.value)
|
|
288
|
+
|
|
289
|
+
|
|
219
290
|
def test_validate_config_file():
|
|
220
291
|
with tempfile.TemporaryDirectory() as tmpdir:
|
|
221
292
|
tmpdir_path = pathlib.Path(tmpdir)
|
|
@@ -799,6 +870,61 @@ WORKDIR /deps/__outer_unit_tests/unit_tests"""
|
|
|
799
870
|
assert additional_contexts == {}
|
|
800
871
|
|
|
801
872
|
|
|
873
|
+
def test_config_to_docker_pip_installer():
|
|
874
|
+
"""Test that pip_installer setting affects the generated Dockerfile."""
|
|
875
|
+
graphs = {"agent": "./graphs/agent.py:graph"}
|
|
876
|
+
base_config = {
|
|
877
|
+
"python_version": "3.11",
|
|
878
|
+
"dependencies": ["."],
|
|
879
|
+
"graphs": graphs,
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
# Test default (auto) behavior with UV-supporting image
|
|
883
|
+
config_auto = validate_config(
|
|
884
|
+
{**copy.deepcopy(base_config), "pip_installer": "auto"}
|
|
885
|
+
)
|
|
886
|
+
docker_auto, _ = config_to_docker(
|
|
887
|
+
PATH_TO_CONFIG, config_auto, "langchain/langgraph-api:0.2.47"
|
|
888
|
+
)
|
|
889
|
+
assert "uv pip install --system" in docker_auto
|
|
890
|
+
assert "rm /usr/bin/uv /usr/bin/uvx" in docker_auto
|
|
891
|
+
|
|
892
|
+
# Test explicit pip setting
|
|
893
|
+
config_pip = validate_config({**copy.deepcopy(base_config), "pip_installer": "pip"})
|
|
894
|
+
docker_pip, _ = config_to_docker(
|
|
895
|
+
PATH_TO_CONFIG, config_pip, "langchain/langgraph-api:0.2.47"
|
|
896
|
+
)
|
|
897
|
+
assert "uv pip install --system" not in docker_pip
|
|
898
|
+
assert "pip install" in docker_pip
|
|
899
|
+
assert "rm /usr/bin/uv" not in docker_pip
|
|
900
|
+
|
|
901
|
+
# Test explicit uv setting
|
|
902
|
+
config_uv = validate_config({**copy.deepcopy(base_config), "pip_installer": "uv"})
|
|
903
|
+
docker_uv, _ = config_to_docker(
|
|
904
|
+
PATH_TO_CONFIG, config_uv, "langchain/langgraph-api:0.2.47"
|
|
905
|
+
)
|
|
906
|
+
assert "uv pip install --system" in docker_uv
|
|
907
|
+
assert "rm /usr/bin/uv /usr/bin/uvx" in docker_uv
|
|
908
|
+
|
|
909
|
+
# Test auto behavior with older image (should use pip)
|
|
910
|
+
config_auto_old = validate_config(
|
|
911
|
+
{**copy.deepcopy(base_config), "pip_installer": "auto"}
|
|
912
|
+
)
|
|
913
|
+
docker_auto_old, _ = config_to_docker(
|
|
914
|
+
PATH_TO_CONFIG, config_auto_old, "langchain/langgraph-api:0.2.46"
|
|
915
|
+
)
|
|
916
|
+
assert "uv pip install --system" not in docker_auto_old
|
|
917
|
+
assert "pip install" in docker_auto_old
|
|
918
|
+
assert "rm /usr/bin/uv" not in docker_auto_old
|
|
919
|
+
|
|
920
|
+
# Test that missing pip_installer defaults to auto behavior
|
|
921
|
+
config_default = validate_config(copy.deepcopy(base_config))
|
|
922
|
+
docker_default, _ = config_to_docker(
|
|
923
|
+
PATH_TO_CONFIG, config_default, "langchain/langgraph-api:0.2.47"
|
|
924
|
+
)
|
|
925
|
+
assert "uv pip install --system" in docker_default
|
|
926
|
+
|
|
927
|
+
|
|
802
928
|
# config_to_compose
|
|
803
929
|
def test_config_to_compose_simple_config():
|
|
804
930
|
graphs = {"agent": "./agent.py:graph"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_a/graphs_submod/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_a/graphs_submod/subprompt.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_cli-0.3.1 → langgraph_cli-0.3.2}/examples/graphs_reqs_b/graphs_submod/subprompt.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|