Skip to content

build: make langgraph-cli[inmem] an optional dependency - #354

Open
weed33834 wants to merge 1 commit into
NVIDIA:mainfrom
weed33834:fix/langgraph-cli-optional-343
Open

build: make langgraph-cli[inmem] an optional dependency#354
weed33834 wants to merge 1 commit into
NVIDIA:mainfrom
weed33834:fix/langgraph-cli-optional-343

Conversation

@weed33834

Copy link
Copy Markdown

Summary

Fixes #343.

langgraph-cli[inmem] was declared as a hard runtime dependency in [project.dependencies], but nothing under src/skillspector/ imports it. Its only consumers in the repo 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:

  • langgraph-api + langgraph-runtime-inmem
  • grpcio, grpcio-tools, grpcio-health-checking
  • opentelemetry-api, opentelemetry-sdk, opentelemetry-exporter-otlp-proto-http, opentelemetry-exporter-prometheus
  • uvicorn, starlette, sse-starlette, structlog, cloudpickle, croniter, watchfiles

Changes

  1. pyproject.toml: Move langgraph-cli[inmem]>=0.4.14 from [project.dependencies] to a new [project.optional-dependencies] langgraph-dev extra.
  2. pyproject.toml: Add skillspector[langgraph-dev] to the existing dev extra so make install-dev (uv sync --all-extras / pip install -e ".[dev]") is unaffected.
  3. Makefile: The langgraph-dev target now checks for the langgraph command 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.py imports from langgraph.graph import END, START, StateGraph.
  • Confirmed no src/skillspector/ code imports langgraph_cli or langgraph.cli.
  • pyproject.toml parses correctly (validated with tomllib).
  • CI workflows and Dockerfile do not reference langgraph-cli directly.
  • make install-dev still installs langgraph-cli via the devlanggraph-dev extra chain.

期待多多合作,互相帮助。

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can langgraph-cli[inmem] be an optional dependency?

1 participant