## Migrate graph
Migrate graph.py from labpy sutil/biblio to projio biblio¶
sutil/biblio/graph.py in labpy contains expand_openalex_reference_graph() — an iterative multi-hop reference graph expansion via OpenAlex, seeded from known citekeys. This is the only unique functionality in labpy's legacy biblio module that projio doesn't yet cover.
Task¶
- Read
/storage2/arash/sirocampus/code/labpy/src/sutil/biblio/graph.pyto understand the API - Read the projio biblio package structure to find the right location (likely under the biblio package)
- Port the graph expansion logic into projio's biblio package, adapting it to use projio's existing OpenAlex client and citekey resolution
- Add an MCP tool
biblio_graph_expand(citekeys, max_hops)or similar that exposes this functionality - Write a basic smoke test
Context¶
- labpy audit confirmed this is the only piece worth migrating before deleting legacy modules
paper_absent_refs()in projio handles single-paper unresolved refs but not multi-hop graph traversal- After this migration, labpy's entire sutil/biblio/ can be deleted
Source context: labpy¶
Labpy (labpy): sirota lab main python package; initiated as a translation of labbox Matlab code into python
Recent commits:
9404ac9 Add labbox↔labpy correspondence map and audit notes
3fe54eb Fix timefrequency API inconsistencies and add smoke tests
2c0ebb2 Add labbox ↔ labpy correspondence map
Related Notes¶
- [[issue-arash-20260326-232746-941302.md]] — Both involve migrating/implementing biblio functionality in projio
- [[issue-arash-20260326-142709-728239.md]] — Both relate to biblio package features in projio