Skip to content

Add CSV export for graph statistics #2

@dentity007

Description

@dentity007

What needs to be done

Add a GET /api/graph/stats/export endpoint that returns graph statistics (node counts, edge counts, expert rankings) as a downloadable CSV file.

Why this matters

Researchers want to analyze their knowledge graph metrics in Excel/Sheets.

Where to look

  • forge/api/routes/graph.py (add new endpoint)
  • forge/graph/engine.py (get_stats already exists)

How to test

pytest tests/test_api_graph.py -v

Acceptance criteria

  • New endpoint returns valid CSV
  • Tests added for the new endpoint
  • Existing tests still pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions