Masonmason 080eb5b887 Add intelligent pipeline topology analysis and comprehensive UI framework
Major Features:
• Advanced topological sorting algorithm with cycle detection and resolution
• Intelligent pipeline optimization with parallelization analysis
• Critical path analysis and performance metrics calculation
• Comprehensive .mflow file converter for seamless UI-to-API integration
• Complete modular UI framework with node-based pipeline editor
• Enhanced model node properties (scpu_fw_path, ncpu_fw_path)
• Professional output formatting without emoji decorations

Technical Improvements:
• Graph theory algorithms (DFS, BFS, topological sort)
• Automatic dependency resolution and conflict prevention
• Multi-criteria pipeline optimization
• Real-time stage count calculation and validation
• Comprehensive configuration validation and error handling
• Modular architecture with clean separation of concerns

New Components:
• MFlow converter with topology analysis (core/functions/mflow_converter.py)
• Complete node system with exact property matching
• Pipeline editor with visual node connections
• Performance estimation and dongle management panels
• Comprehensive test suite and demonstration scripts

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 12:58:47 +08:00

63 lines
1.5 KiB
Python

"""
Static resources and assets for the Cluster4NPU application.
This module manages static resources including icons, images, stylesheets,
and other assets used throughout the application.
Available Resources:
- icons/: Application icons and graphics
- styles/: Additional stylesheet files
- assets/: Other static resources
Usage:
from cluster4npu_ui.resources import get_icon_path, get_style_path
icon_path = get_icon_path('node_model.png')
style_path = get_style_path('dark_theme.qss')
"""
import os
from pathlib import Path
def get_resource_path(resource_name: str) -> str:
"""
Get the full path to a resource file.
Args:
resource_name: Name of the resource file
Returns:
Full path to the resource file
"""
resources_dir = Path(__file__).parent
return str(resources_dir / resource_name)
def get_icon_path(icon_name: str) -> str:
"""
Get the full path to an icon file.
Args:
icon_name: Name of the icon file
Returns:
Full path to the icon file
"""
return get_resource_path(f"icons/{icon_name}")
def get_style_path(style_name: str) -> str:
"""
Get the full path to a stylesheet file.
Args:
style_name: Name of the stylesheet file
Returns:
Full path to the stylesheet file
"""
return get_resource_path(f"styles/{style_name}")
__all__ = [
"get_resource_path",
"get_icon_path",
"get_style_path"
]