Easy-Graph icon indicating copy to clipboard operation
Easy-Graph copied to clipboard

Add capability discovery API for EasyGraph (你能做什么?)

Open Copilot opened this issue 2 months ago • 0 comments

Pull Request Check List

Resolves: #issue-number-here

  • [x] Added tests for changed code.
  • [x] Updated documentation for changed code.

Description

Implements a capability discovery API to answer "你能做什么?" (What can you do?). Users can now programmatically explore EasyGraph's features without reading extensive documentation.

Changes

Core API

  • easygraph/capabilities.py: New module exposing three functions:
    • show_capabilities(): Formatted console output covering 14 feature categories (centrality, community detection, structural holes, graph embedding, hypergraph, GPU acceleration, etc.)
    • get_capabilities_dict(): Returns structured dict with ~50 algorithms organized by category
    • 能做什么(): Chinese language alias for show_capabilities()

Integration

  • easygraph/__init__.py: Added capabilities module to exports

Testing & Documentation

  • easygraph/tests/test_capabilities.py: 8 unit tests covering all API functions
  • test_capabilities_standalone.py: Standalone test script for environments without C++ extension
  • examples/capabilities_example.py: Usage examples demonstrating all three functions

Usage

import easygraph as eg

# Display formatted overview
eg.show_capabilities()

# Programmatic access
caps = eg.get_capabilities_dict()
print(caps['centrality'])  
# ['degree_centrality', 'betweenness_centrality', 'closeness_centrality', ...]

# Chinese language support
eg.能做什么()

Impact

  • Zero breaking changes, fully backward compatible
  • Reduces onboarding friction for new users
  • Provides programmatic feature introspection for tooling
  • Supports Chinese-speaking users natively
Original prompt

你能做什么?


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot avatar Nov 11 '25 14:11 Copilot