Skip to content

Commit 3f400b3

Browse files
authored
fix(cli): install local deps in editable mode (#6294)
**Description** As part of this PR #6156, local deps are no longer installed in editable mode. This change reverts that behaviour and ensures local packages are installed in editable mode. **Issue:** fixes #6288
1 parent 6527df6 commit 3f400b3

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

libs/cli/langgraph_cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.4.3"
1+
__version__ = "0.4.4"

libs/cli/langgraph_cli/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1434,7 +1434,7 @@ def python_config_to_docker(
14341434
echo "Installing $dep"; \
14351435
if [ -d "$dep" ]; then \
14361436
echo "Installing $dep"; \
1437-
(cd "$dep" && {global_reqs_pip_install} .); \
1437+
(cd "$dep" && {global_reqs_pip_install} -e .); \
14381438
fi; \
14391439
done""",
14401440
"# -- End of local dependencies install --",

libs/cli/tests/unit_tests/cli/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def test_prepare_args_and_stdin() -> None:
149149
COPY --from=cli_1 . /deps/cli_1
150150
# -- End of local package ../../.. --
151151
# -- Installing all local dependencies --
152-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
152+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
153153
# -- End of local dependencies install --
154154
ENV LANGSERVE_GRAPHS='{{"agent": "agent.py:graph"}}'
155155
{textwrap.indent(textwrap.dedent(FORMATTED_CLEANUP_LINES), " ")}

libs/cli/tests/unit_tests/test_config.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def test_config_to_docker_simple():
456456
done
457457
# -- End of non-package dependency graphs_reqs_a --
458458
# -- Installing all local dependencies --
459-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
459+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
460460
# -- End of local dependencies install --
461461
ENV LANGGRAPH_HTTP='{{"app": "/deps/examples/my_app.py:app"}}'
462462
ENV LANGSERVE_GRAPHS='{{"agent": "/deps/outer-unit_tests/unit_tests/agent.py:graph"}}'
@@ -512,7 +512,7 @@ def test_config_to_docker_outside_path():
512512
done
513513
# -- End of non-package dependency tests --
514514
# -- Installing all local dependencies --
515-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
515+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
516516
# -- End of local dependencies install --
517517
ENV LANGSERVE_GRAPHS='{"agent": "/deps/outer-unit_tests/unit_tests/agent.py:graph"}'
518518
"""
@@ -559,7 +559,7 @@ def test_config_to_docker_pipconfig():
559559
done
560560
# -- End of non-package dependency unit_tests --
561561
# -- Installing all local dependencies --
562-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PIP_CONFIG_FILE=/pipconfig.txt PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
562+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PIP_CONFIG_FILE=/pipconfig.txt PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
563563
# -- End of local dependencies install --
564564
ENV LANGSERVE_GRAPHS='{"agent": "/deps/outer-unit_tests/unit_tests/agent.py:graph"}'
565565
"""
@@ -621,7 +621,7 @@ def test_config_to_docker_local_deps():
621621
done
622622
# -- End of non-package dependency graphs --
623623
# -- Installing all local dependencies --
624-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
624+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
625625
# -- End of local dependencies install --
626626
ENV LANGSERVE_GRAPHS='{{"agent": "/deps/outer-graphs/src/agent.py:graph"}}'
627627
{FORMATTED_CLEANUP_LINES}\
@@ -657,7 +657,7 @@ def test_config_to_docker_pyproject():
657657
ADD . /deps/unit_tests
658658
# -- End of local package . --
659659
# -- Installing all local dependencies --
660-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
660+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
661661
# -- End of local dependencies install --
662662
ENV LANGSERVE_GRAPHS='{"agent": "/deps/unit_tests/graphs/agent.py:graph"}'
663663
"""
@@ -705,7 +705,7 @@ def test_config_to_docker_end_to_end():
705705
done
706706
# -- End of non-package dependency graphs --
707707
# -- Installing all local dependencies --
708-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PIP_CONFIG_FILE=/pipconfig.txt PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
708+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PIP_CONFIG_FILE=/pipconfig.txt PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
709709
# -- End of local dependencies install --
710710
ENV LANGSERVE_GRAPHS='{{"agent": "/deps/outer-graphs/src/agent.py:graph"}}'
711711
{FORMATTED_CLEANUP_LINES}"""
@@ -811,7 +811,7 @@ def test_config_to_docker_gen_ui_python():
811811
done
812812
# -- End of non-package dependency unit_tests --
813813
# -- Installing all local dependencies --
814-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
814+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
815815
# -- End of local dependencies install --
816816
ENV LANGGRAPH_UI='{{"agent": "./graphs/agent.ui.jsx"}}'
817817
ENV LANGGRAPH_UI_CONFIG='{{"shared": ["nuqs"]}}'
@@ -857,7 +857,7 @@ def test_config_to_docker_multiplatform():
857857
done
858858
# -- End of non-package dependency unit_tests --
859859
# -- Installing all local dependencies --
860-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
860+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
861861
# -- End of local dependencies install --
862862
ENV LANGSERVE_GRAPHS='{{"python": "/deps/outer-unit_tests/unit_tests/multiplatform/python.py:graph", "js": "/deps/outer-unit_tests/unit_tests/multiplatform/js.mts:graph"}}'
863863
# -- Installing JS dependencies --
@@ -998,7 +998,7 @@ def test_config_to_compose_simple_config():
998998
done
999999
# -- End of non-package dependency unit_tests --
10001000
# -- Installing all local dependencies --
1001-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
1001+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
10021002
# -- End of local dependencies install --
10031003
ENV LANGSERVE_GRAPHS='{{"agent": "/deps/outer-unit_tests/unit_tests/agent.py:graph"}}'
10041004
{textwrap.indent(textwrap.dedent(FORMATTED_CLEANUP_LINES), " ")}
@@ -1039,7 +1039,7 @@ def test_config_to_compose_env_vars():
10391039
done
10401040
# -- End of non-package dependency unit_tests --
10411041
# -- Installing all local dependencies --
1042-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
1042+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
10431043
# -- End of local dependencies install --
10441044
ENV LANGSERVE_GRAPHS='{{"agent": "/deps/outer-unit_tests/unit_tests/agent.py:graph"}}'
10451045
{textwrap.indent(textwrap.dedent(FORMATTED_CLEANUP_LINES), " ")}
@@ -1084,7 +1084,7 @@ def test_config_to_compose_env_file():
10841084
done
10851085
# -- End of non-package dependency unit_tests --
10861086
# -- Installing all local dependencies --
1087-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
1087+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
10881088
# -- End of local dependencies install --
10891089
ENV LANGSERVE_GRAPHS='{{"agent": "/deps/outer-unit_tests/unit_tests/agent.py:graph"}}'
10901090
{textwrap.indent(textwrap.dedent(FORMATTED_CLEANUP_LINES), " ")}
@@ -1122,7 +1122,7 @@ def test_config_to_compose_watch():
11221122
done
11231123
# -- End of non-package dependency unit_tests --
11241124
# -- Installing all local dependencies --
1125-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
1125+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
11261126
# -- End of local dependencies install --
11271127
ENV LANGSERVE_GRAPHS='{{"agent": "/deps/outer-unit_tests/unit_tests/agent.py:graph"}}'
11281128
{textwrap.indent(textwrap.dedent(FORMATTED_CLEANUP_LINES), " ")}
@@ -1169,7 +1169,7 @@ def test_config_to_compose_end_to_end():
11691169
done
11701170
# -- End of non-package dependency unit_tests --
11711171
# -- Installing all local dependencies --
1172-
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt .); fi; done
1172+
RUN for dep in /deps/*; do echo "Installing $dep"; if [ -d "$dep" ]; then echo "Installing $dep"; (cd "$dep" && PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e .); fi; done
11731173
# -- End of local dependencies install --
11741174
ENV LANGSERVE_GRAPHS='{{"agent": "/deps/outer-unit_tests/unit_tests/agent.py:graph"}}'
11751175
{textwrap.indent(textwrap.dedent(FORMATTED_CLEANUP_LINES), " ")}

0 commit comments

Comments
 (0)