Skip to content

Add graphifyy optional dependency and pytest marker #6

@verkligheten

Description

@verkligheten

Parent Epic

Part of #5 — Integrate Graphify for zero-cost code entity extraction

Task

Add graphifyy as an optional dependency and configure pytest to skip Graphify-dependent tests when not installed.

Changes

pyproject.toml

Add optional dependency group (after line 35):

[project.optional-dependencies]
dev = ["pytest>=7.0"]
graph = ["graphifyy>=0.7.0"]

Add pytest marker (after line 58):

markers = [
    "requires_network: test needs internet — deselect from default suite",
    "requires_clean_repo: test needs a clean working tree — deselect from default suite",
    "requires_build: test needs python -m build (wheel build) — deselect from default suite",
    "requires_graphify: test needs graphifyy installed — deselect from default suite",
]
addopts = "-m 'not requires_network and not requires_clean_repo and not requires_build and not requires_graphify'"

Installation

Users install with: pip install agent-notes[graph]

Without it, all Graphify features gracefully degrade — the code_graph.py module (issue #_2) handles this via try/except ImportError.

Verification

  1. pip install -e . still works without graphifyy
  2. pip install -e ".[graph]" installs graphifyy and its transitive deps (tree-sitter, networkx, etc.)
  3. pytest default run skips requires_graphify tests
  4. pytest -m requires_graphify runs only Graphify tests (when installed)
  5. python -c "import agent_notes" works without graphifyy installed

Potential Issues

  • Graphify's transitive dependencies: graphifyy pulls in networkx, tree-sitter, and multiple tree-sitter-* language grammars. These are substantial (~50-100MB). This is fine for optional deps but important to keep out of the base install.
  • Version pinning: Pin >=0.7.0 to match v7 branch API. Graphify is actively developed; major API changes between versions could break integration. If graphifyy doesn't have a 0.7.x release yet, verify the actual version on PyPI and adjust.
  • Python version: Both agent-notes and graphifyy require Python ≥ 3.10, no conflict.

Dependencies

None — this is the first sub-issue to implement.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions