build: make langgraph-cli[inmem] an optional dependency - #354
Open
weed33834 wants to merge 1 commit into
Open
Conversation
langgraph-cli[inmem] was declared as a hard runtime dependency, but nothing under src/skillspector/ imports it. Its only consumers are the `make langgraph-dev` target and langgraph.json — both developer tooling for LangGraph Studio. Because it is a runtime dependency, every install of the skillspector CLI — including ones that never run the dev server — pulls in the full LangGraph API server stack (grpcio, opentelemetry-*, uvicorn, starlette, sse-starlette, structlog, cloudpickle, croniter, watchfiles, ...). Move it to a new `langgraph-dev` optional extra so a plain `pip install skillspector` stays lightweight. The `dev` extra pulls it in transitively via `skillspector[langgraph-dev]` so `make install-dev` is unaffected. The `langgraph-dev` Makefile target now prints a helpful install hint if the `langgraph` command is missing. Fixes NVIDIA#343
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #343.
langgraph-cli[inmem]was declared as a hard runtime dependency in[project.dependencies], but nothing undersrc/skillspector/imports it. Its only consumers in the repo are themake langgraph-devtarget andlanggraph.json— both developer tooling for LangGraph Studio.Because it is a runtime dependency, every install of the skillspector CLI — including ones that never run the dev server — pulls in the full LangGraph API server stack:
langgraph-api+langgraph-runtime-inmemgrpcio,grpcio-tools,grpcio-health-checkingopentelemetry-api,opentelemetry-sdk,opentelemetry-exporter-otlp-proto-http,opentelemetry-exporter-prometheusuvicorn,starlette,sse-starlette,structlog,cloudpickle,croniter,watchfilesChanges
langgraph-cli[inmem]>=0.4.14from[project.dependencies]to a new[project.optional-dependencies] langgraph-devextra.skillspector[langgraph-dev]to the existingdevextra somake install-dev(uv sync --all-extras/pip install -e ".[dev]") is unaffected.langgraph-devtarget now checks for thelanggraphcommand and prints a helpful install hint (pip install 'skillspector[langgraph-dev]') if it is missing.Verification
langgraph(the graph library) remains a hard dependency —src/skillspector/graph.pyimportsfrom langgraph.graph import END, START, StateGraph.src/skillspector/code importslanggraph_cliorlanggraph.cli.pyproject.tomlparses correctly (validated withtomllib).langgraph-clidirectly.make install-devstill installs langgraph-cli via thedev→langgraph-devextra chain.期待多多合作,互相帮助。