← Docs hub

05 — Add graph runtime dependencies

Read first

Problem

The graph extra contains only:

graph = ["graphifyy>=0.4.20"]

But the graph pipeline needs two packages that graphifyy does not declare:

Both were installed manually in this environment. A fresh pip install sessionwiki[graph] leaves sessionwiki graph broken: it falls back to the builtin engine with a warning.

Required change

In pyproject.toml update both extras:

graph = [
    "graphifyy>=0.4.20",
    "matplotlib>=3.8",
    "scipy>=1.11",
]
all = [
    "graphifyy>=0.4.20",
    "matplotlib>=3.8",
    "scipy>=1.11",
]

Keep the existing formatting style of the file. Do not add a version pin tighter than the minimums above unless the repository already pins those packages elsewhere.

Test

Update tests/test_graphify_bridge.py::test_pyproject_has_graph_extra:

def test_pyproject_has_graph_extra():
    from sessionwiki import REPO_ROOT

    content = (REPO_ROOT / "pyproject.toml").read_text(encoding="utf-8")
    assert 'graph = [' in content
    assert "graphifyy" in content
    assert "matplotlib" in content
    assert "scipy" in content

The all extra uses the same packages; the test can also assert that the string matplotlib appears at least twice, but a simple presence check is enough.

Verification

.venv/bin/pip install -e '.[graph]'
.venv/bin/python -c "import matplotlib, scipy; print(matplotlib.__version__, scipy.__version__)"
.venv/bin/python -m pytest tests/test_graphify_bridge.py -q
.venv/bin/python -m sessionwiki graph

Expected:

If pip install -e '.[graph]' changes installed versions, record the diff in the PR body. Do not commit a lock file.

Acceptance criteria

Out of scope

Rollback

Revert pyproject.toml and the test.