From 92f9d956af2db5816d175a50c355d5b5668a2ca6 Mon Sep 17 00:00:00 2001 From: Mason Date: Thu, 7 Aug 2025 12:17:59 +0800 Subject: [PATCH] Remove cluster4npu_ui package prefix and remove export/analysis buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update all imports to use relative imports instead of cluster4npu_ui.* prefix - Remove export configuration functionality from dashboard menu - Remove performance analysis action from pipeline menu - Update dependencies in pyproject.toml to include NodeGraphQt and PyQt5 - Maintain clean import structure across all modules šŸ¤– Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- __init__.py | 6 +-- config/__init__.py | 2 +- config/settings.py | 2 +- config/theme.py | 2 +- core/__init__.py | 4 +- core/nodes/__init__.py | 2 +- core/nodes/base_node.py | 2 +- core/nodes/input_node.py | 2 +- core/nodes/model_node.py | 2 +- core/nodes/output_node.py | 2 +- core/nodes/postprocess_node.py | 2 +- core/nodes/preprocess_node.py | 2 +- core/pipeline.py | 2 +- main.py | 6 +-- pyproject.toml | 5 +- resources/__init__.py | 2 +- tests/test_integration.py | 8 +-- tests/test_stage_improvements.py | 8 +-- tests/test_status_bar_fixes.py | 10 ++-- tests/test_ui_fixes.py | 10 ++-- ui/__init__.py | 6 +-- ui/components/__init__.py | 2 +- ui/dialogs/__init__.py | 2 +- ui/dialogs/deployment.py | 8 +-- ui/windows/__init__.py | 2 +- ui/windows/dashboard.py | 28 +++++----- ui/windows/login.py | 8 +-- ui/windows/pipeline_editor.py | 16 +++--- utils/__init__.py | 2 +- uv.lock | 90 ++++++++++++++++++++++++++++++++ 30 files changed, 169 insertions(+), 76 deletions(-) diff --git a/__init__.py b/__init__.py index b51f946..65e07f5 100644 --- a/__init__.py +++ b/__init__.py @@ -21,12 +21,12 @@ Key Features: Usage: # Run the application - from cluster4npu_ui.main import main + from main import main main() # Or use individual components - from cluster4npu_ui.core.nodes import ModelNode, InputNode - from cluster4npu_ui.config.theme import apply_theme + from core.nodes import ModelNode, InputNode + from config.theme import apply_theme Author: Cluster4NPU Team Version: 1.0.0 diff --git a/config/__init__.py b/config/__init__.py index 7f70c75..a308ae5 100644 --- a/config/__init__.py +++ b/config/__init__.py @@ -9,7 +9,7 @@ Available Components: - settings: Application settings and preferences management Usage: - from cluster4npu_ui.config import apply_theme, get_settings + from config import apply_theme, get_settings # Apply theme to application apply_theme(app) diff --git a/config/settings.py b/config/settings.py index 774f80c..788dc7d 100644 --- a/config/settings.py +++ b/config/settings.py @@ -12,7 +12,7 @@ Main Components: - Configuration validation Usage: - from cluster4npu_ui.config.settings import Settings + from config.settings import Settings settings = Settings() recent_files = settings.get_recent_files() diff --git a/config/theme.py b/config/theme.py index a0fcb49..58dc963 100644 --- a/config/theme.py +++ b/config/theme.py @@ -11,7 +11,7 @@ Main Components: - Consistent styling for all UI components Usage: - from cluster4npu_ui.config.theme import HARMONIOUS_THEME_STYLESHEET + from config.theme import HARMONIOUS_THEME_STYLESHEET app.setStyleSheet(HARMONIOUS_THEME_STYLESHEET) """ diff --git a/core/__init__.py b/core/__init__.py index 99aefce..cff7d27 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -9,8 +9,8 @@ Available Components: - pipeline: Pipeline management and orchestration (future) Usage: - from cluster4npu_ui.core.nodes import ModelNode, InputNode, OutputNode - from cluster4npu_ui.core.nodes import NODE_TYPES, NODE_CATEGORIES + from core.nodes import ModelNode, InputNode, OutputNode + from core.nodes import NODE_TYPES, NODE_CATEGORIES # Create nodes input_node = InputNode() diff --git a/core/nodes/__init__.py b/core/nodes/__init__.py index 46e91a1..ae6d55b 100644 --- a/core/nodes/__init__.py +++ b/core/nodes/__init__.py @@ -13,7 +13,7 @@ Available Nodes: - OutputNode: Data sink and export operations Usage: - from cluster4npu_ui.core.nodes import InputNode, ModelNode, OutputNode + from core.nodes import InputNode, ModelNode, OutputNode # Create a simple pipeline input_node = InputNode() diff --git a/core/nodes/base_node.py b/core/nodes/base_node.py index 0bef9fd..068b303 100644 --- a/core/nodes/base_node.py +++ b/core/nodes/base_node.py @@ -10,7 +10,7 @@ Main Components: - Common node operations and interfaces Usage: - from cluster4npu_ui.core.nodes.base_node import BaseNodeWithProperties + from core.nodes.base_node import BaseNodeWithProperties class MyNode(BaseNodeWithProperties): def __init__(self): diff --git a/core/nodes/input_node.py b/core/nodes/input_node.py index e5b3b2f..0a467ce 100644 --- a/core/nodes/input_node.py +++ b/core/nodes/input_node.py @@ -10,7 +10,7 @@ Main Components: - Stream management and configuration Usage: - from cluster4npu_ui.core.nodes.input_node import InputNode + from core.nodes.input_node import InputNode node = InputNode() node.set_property('source_type', 'Camera') diff --git a/core/nodes/model_node.py b/core/nodes/model_node.py index ef1429c..5c2bac0 100644 --- a/core/nodes/model_node.py +++ b/core/nodes/model_node.py @@ -11,7 +11,7 @@ Main Components: - Hardware dongle management Usage: - from cluster4npu_ui.core.nodes.model_node import ModelNode + from core.nodes.model_node import ModelNode node = ModelNode() node.set_property('model_path', '/path/to/model.onnx') diff --git a/core/nodes/output_node.py b/core/nodes/output_node.py index 65a32c9..8bea968 100644 --- a/core/nodes/output_node.py +++ b/core/nodes/output_node.py @@ -10,7 +10,7 @@ Main Components: - Format conversion and export functionality Usage: - from cluster4npu_ui.core.nodes.output_node import OutputNode + from core.nodes.output_node import OutputNode node = OutputNode() node.set_property('output_type', 'File') diff --git a/core/nodes/postprocess_node.py b/core/nodes/postprocess_node.py index 55929f0..6d859b4 100644 --- a/core/nodes/postprocess_node.py +++ b/core/nodes/postprocess_node.py @@ -11,7 +11,7 @@ Main Components: - Output format conversion Usage: - from cluster4npu_ui.core.nodes.postprocess_node import PostprocessNode + from core.nodes.postprocess_node import PostprocessNode node = PostprocessNode() node.set_property('output_format', 'JSON') diff --git a/core/nodes/preprocess_node.py b/core/nodes/preprocess_node.py index 6d69429..5464869 100644 --- a/core/nodes/preprocess_node.py +++ b/core/nodes/preprocess_node.py @@ -11,7 +11,7 @@ Main Components: - Preprocessing configuration and validation Usage: - from cluster4npu_ui.core.nodes.preprocess_node import PreprocessNode + from core.nodes.preprocess_node import PreprocessNode node = PreprocessNode() node.set_property('resize_width', 640) diff --git a/core/pipeline.py b/core/pipeline.py index be57552..b037781 100644 --- a/core/pipeline.py +++ b/core/pipeline.py @@ -12,7 +12,7 @@ Main Components: - Connection path analysis Usage: - from cluster4npu_ui.core.pipeline import analyze_pipeline_stages, get_stage_count + from core.pipeline import analyze_pipeline_stages, get_stage_count stage_count = get_stage_count(node_graph) stages = analyze_pipeline_stages(node_graph) diff --git a/main.py b/main.py index cc62cb4..52f55a9 100644 --- a/main.py +++ b/main.py @@ -15,7 +15,7 @@ Usage: python -m cluster4npu_ui.main # Or directly: - from cluster4npu_ui.main import main + from main import main main() """ @@ -28,8 +28,8 @@ from PyQt5.QtCore import Qt # Add the parent directory to the path for imports sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from cluster4npu_ui.config.theme import apply_theme -from cluster4npu_ui.ui.windows.login import DashboardLogin +from config.theme import apply_theme +from ui.windows.login import DashboardLogin def setup_application(): diff --git a/pyproject.toml b/pyproject.toml index 38b0783..a60e5ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,4 +4,7 @@ version = "0.0.3" description = "Add your description here" readme = "README.md" requires-python = ">=3.9, <3.12" -dependencies = [] +dependencies = [ + "nodegraphqt>=0.6.40", + "pyqt5>=5.15.11", +] diff --git a/resources/__init__.py b/resources/__init__.py index 17af5d9..d68ff2d 100644 --- a/resources/__init__.py +++ b/resources/__init__.py @@ -10,7 +10,7 @@ Available Resources: - assets/: Other static resources Usage: - from cluster4npu_ui.resources import get_icon_path, get_style_path + from resources import get_icon_path, get_style_path icon_path = get_icon_path('node_model.png') style_path = get_style_path('dark_theme.qss') diff --git a/tests/test_integration.py b/tests/test_integration.py index 83a3ca8..8f56b89 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -19,7 +19,7 @@ def test_imports(): print("šŸ” Testing imports...") try: - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard, StageCountWidget + from ui.windows.dashboard import IntegratedPipelineDashboard, StageCountWidget print("āœ… Dashboard components imported successfully") # Test PyQt5 imports @@ -38,7 +38,7 @@ def test_stage_count_widget(): try: from PyQt5.QtWidgets import QApplication - from cluster4npu_ui.ui.windows.dashboard import StageCountWidget + from ui.windows.dashboard import StageCountWidget # Create application if needed app = QApplication.instance() @@ -77,7 +77,7 @@ def test_dashboard_methods(): print("\nšŸ” Testing Dashboard methods...") try: - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard + from ui.windows.dashboard import IntegratedPipelineDashboard # Check critical methods exist required_methods = [ @@ -113,7 +113,7 @@ def test_pipeline_analysis_functions(): print("\nšŸ” Testing pipeline analysis functions...") try: - from cluster4npu_ui.ui.windows.dashboard import get_pipeline_summary, get_stage_count, analyze_pipeline_stages + from ui.windows.dashboard import get_pipeline_summary, get_stage_count, analyze_pipeline_stages print("āœ… Pipeline analysis functions imported (or fallbacks created)") # Test fallback functions with None input diff --git a/tests/test_stage_improvements.py b/tests/test_stage_improvements.py index 7de70b4..88dd0bb 100644 --- a/tests/test_stage_improvements.py +++ b/tests/test_stage_improvements.py @@ -18,7 +18,7 @@ def test_stage_calculation_improvements(): print("šŸ” Testing stage calculation improvements...") try: - from cluster4npu_ui.core.pipeline import analyze_pipeline_stages, is_node_connected_to_pipeline + from core.pipeline import analyze_pipeline_stages, is_node_connected_to_pipeline print("āœ… Pipeline analysis functions imported successfully") # Test that stage calculation functions exist @@ -47,7 +47,7 @@ def test_ui_improvements(): print("\nšŸ” Testing UI improvements...") try: - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard, StageCountWidget + from ui.windows.dashboard import IntegratedPipelineDashboard, StageCountWidget # Test new methods exist ui_methods = [ @@ -96,7 +96,7 @@ def test_removed_functionality(): print("\nšŸ” Testing removed functionality...") try: - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard + from ui.windows.dashboard import IntegratedPipelineDashboard # These methods should not exist anymore removed_methods = [ @@ -120,7 +120,7 @@ def test_new_status_bar(): print("\nšŸ” Testing status bar functionality...") try: - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard + from ui.windows.dashboard import IntegratedPipelineDashboard from PyQt5.QtWidgets import QApplication app = QApplication.instance() diff --git a/tests/test_status_bar_fixes.py b/tests/test_status_bar_fixes.py index 0daddc1..31e4e2d 100644 --- a/tests/test_status_bar_fixes.py +++ b/tests/test_status_bar_fixes.py @@ -18,7 +18,7 @@ def test_stage_count_visibility(): print("šŸ” Testing stage count widget visibility...") try: - from cluster4npu_ui.ui.windows.dashboard import StageCountWidget + from ui.windows.dashboard import StageCountWidget from PyQt5.QtWidgets import QApplication app = QApplication.instance() @@ -66,7 +66,7 @@ def test_stage_count_updates(): print("\nšŸ” Testing stage count updates...") try: - from cluster4npu_ui.ui.windows.dashboard import StageCountWidget + from ui.windows.dashboard import StageCountWidget from PyQt5.QtWidgets import QApplication app = QApplication.instance() @@ -106,7 +106,7 @@ def test_ui_cleanup_functionality(): print("\nšŸ” Testing UI cleanup functionality...") try: - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard + from ui.windows.dashboard import IntegratedPipelineDashboard # Check if cleanup method exists if hasattr(IntegratedPipelineDashboard, 'cleanup_node_graph_ui'): @@ -140,7 +140,7 @@ def test_status_bar_integration(): print("\nšŸ” Testing status bar integration...") try: - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard + from ui.windows.dashboard import IntegratedPipelineDashboard # Check if create_status_bar_widget exists if hasattr(IntegratedPipelineDashboard, 'create_status_bar_widget'): @@ -175,7 +175,7 @@ def test_node_graph_configuration(): print("\nšŸ” Testing node graph configuration...") try: - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard + from ui.windows.dashboard import IntegratedPipelineDashboard # Check if setup_node_graph has UI cleanup code import inspect diff --git a/tests/test_ui_fixes.py b/tests/test_ui_fixes.py index 5382b40..8918cd6 100644 --- a/tests/test_ui_fixes.py +++ b/tests/test_ui_fixes.py @@ -18,7 +18,7 @@ def test_connection_counting(): print("šŸ” Testing connection counting improvements...") try: - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard + from ui.windows.dashboard import IntegratedPipelineDashboard # Check if the updated analyze_pipeline method exists if hasattr(IntegratedPipelineDashboard, 'analyze_pipeline'): @@ -52,7 +52,7 @@ def test_canvas_cleanup(): print("\nšŸ” Testing canvas cleanup...") try: - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard + from ui.windows.dashboard import IntegratedPipelineDashboard # Check if the setup_node_graph method has logo removal code if hasattr(IntegratedPipelineDashboard, 'setup_node_graph'): @@ -84,7 +84,7 @@ def test_global_status_bar(): print("\nšŸ” Testing global status bar...") try: - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard + from ui.windows.dashboard import IntegratedPipelineDashboard # Check if setup_integrated_ui has global status bar if hasattr(IntegratedPipelineDashboard, 'setup_integrated_ui'): @@ -131,7 +131,7 @@ def test_stage_count_widget_updates(): print("\nšŸ” Testing StageCountWidget updates...") try: - from cluster4npu_ui.ui.windows.dashboard import StageCountWidget + from ui.windows.dashboard import StageCountWidget from PyQt5.QtWidgets import QApplication app = QApplication.instance() @@ -169,7 +169,7 @@ def test_layout_structure(): print("\nšŸ” Testing layout structure...") try: - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard + from ui.windows.dashboard import IntegratedPipelineDashboard # Check if create_pipeline_editor_panel no longer has status bar if hasattr(IntegratedPipelineDashboard, 'create_pipeline_editor_panel'): diff --git a/ui/__init__.py b/ui/__init__.py index 1aa2da1..5f2ab20 100644 --- a/ui/__init__.py +++ b/ui/__init__.py @@ -10,9 +10,9 @@ Available Components: - components: Reusable UI components and widgets Usage: - from cluster4npu_ui.ui.windows import DashboardLogin - from cluster4npu_ui.ui.dialogs import CreatePipelineDialog - from cluster4npu_ui.ui.components import NodePalette + from ui.windows import DashboardLogin + from ui.dialogs import CreatePipelineDialog + from ui.components import NodePalette # Create main window dashboard = DashboardLogin() diff --git a/ui/components/__init__.py b/ui/components/__init__.py index d95b3a8..c887c50 100644 --- a/ui/components/__init__.py +++ b/ui/components/__init__.py @@ -10,7 +10,7 @@ Available Components: - CommonWidgets: Shared UI elements and utilities (future) Usage: - from cluster4npu_ui.ui.components import NodePalette, CustomPropertiesWidget + from ui.components import NodePalette, CustomPropertiesWidget palette = NodePalette(graph) properties = CustomPropertiesWidget(graph) diff --git a/ui/dialogs/__init__.py b/ui/dialogs/__init__.py index 978c05a..f5a7be0 100644 --- a/ui/dialogs/__init__.py +++ b/ui/dialogs/__init__.py @@ -12,7 +12,7 @@ Available Dialogs: - SimplePropertiesDialog: Basic property editing (future) Usage: - from cluster4npu_ui.ui.dialogs import CreatePipelineDialog + from ui.dialogs import CreatePipelineDialog dialog = CreatePipelineDialog(parent) if dialog.exec_() == dialog.Accepted: diff --git a/ui/dialogs/deployment.py b/ui/dialogs/deployment.py index 00230b1..e39e9c8 100644 --- a/ui/dialogs/deployment.py +++ b/ui/dialogs/deployment.py @@ -39,16 +39,16 @@ from PyQt5.QtGui import QFont, QColor, QPalette, QImage, QPixmap sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'core', 'functions')) try: - from ...core.functions.mflow_converter import MFlowConverter, PipelineConfig + from core.functions.mflow_converter import MFlowConverter, PipelineConfig CONVERTER_AVAILABLE = True except ImportError as e: print(f"Warning: MFlow converter not available: {e}") CONVERTER_AVAILABLE = False try: - from ...core.functions.Multidongle import MultiDongle - from ...core.functions.InferencePipeline import InferencePipeline - from ...core.functions.workflow_orchestrator import WorkflowOrchestrator + from core.functions.Multidongle import MultiDongle + from core.functions.InferencePipeline import InferencePipeline + from core.functions.workflow_orchestrator import WorkflowOrchestrator # from workflow_orchestrator import WorkflowOrchestrator PIPELINE_AVAILABLE = True except ImportError as e: diff --git a/ui/windows/__init__.py b/ui/windows/__init__.py index 15864e9..d252bd1 100644 --- a/ui/windows/__init__.py +++ b/ui/windows/__init__.py @@ -10,7 +10,7 @@ Available Windows: - PipelineEditor: Alternative pipeline editor window (future) Usage: - from cluster4npu_ui.ui.windows import DashboardLogin + from ui.windows import DashboardLogin dashboard = DashboardLogin() dashboard.show() diff --git a/ui/windows/dashboard.py b/ui/windows/dashboard.py index 83310c2..708fb92 100644 --- a/ui/windows/dashboard.py +++ b/ui/windows/dashboard.py @@ -13,7 +13,7 @@ Main Components: - Pipeline save/load functionality Usage: - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard + from ui.windows.dashboard import IntegratedPipelineDashboard dashboard = IntegratedPipelineDashboard() dashboard.show() @@ -41,10 +41,10 @@ except ImportError: NODEGRAPH_AVAILABLE = False print("Warning: NodeGraphQt not available. Pipeline editor will be disabled.") -from cluster4npu_ui.config.theme import HARMONIOUS_THEME_STYLESHEET -from cluster4npu_ui.config.settings import get_settings +from config.theme import HARMONIOUS_THEME_STYLESHEET +from config.settings import get_settings try: - from cluster4npu_ui.core.nodes import ( + from core.nodes import ( InputNode, ModelNode, PreprocessNode, PostprocessNode, OutputNode, NODE_TYPES, create_node_property_widget ) @@ -53,14 +53,14 @@ except ImportError: ADVANCED_NODES_AVAILABLE = False # Use exact nodes that match original properties -from cluster4npu_ui.core.nodes.exact_nodes import ( +from core.nodes.exact_nodes import ( ExactInputNode, ExactModelNode, ExactPreprocessNode, ExactPostprocessNode, ExactOutputNode, EXACT_NODE_TYPES ) # Import pipeline analysis functions try: - from cluster4npu_ui.core.pipeline import get_stage_count, analyze_pipeline_stages, get_pipeline_summary + from core.pipeline import get_stage_count, analyze_pipeline_stages, get_pipeline_summary except ImportError: # Fallback functions if not available def get_stage_count(graph): @@ -1018,9 +1018,9 @@ class IntegratedPipelineDashboard(QMainWindow): file_menu.addSeparator() # Export - export_action = QAction('&Export Configuration...', self) - export_action.triggered.connect(self.export_configuration) - file_menu.addAction(export_action) + # export_action = QAction('&Export Configuration...', self) + # export_action.triggered.connect(self.export_configuration) + # file_menu.addAction(export_action) # Pipeline menu pipeline_menu = menubar.addMenu('&Pipeline') @@ -1031,9 +1031,9 @@ class IntegratedPipelineDashboard(QMainWindow): pipeline_menu.addAction(validate_action) # Performance estimation - perf_action = QAction('&Performance Analysis', self) - perf_action.triggered.connect(self.update_performance_estimation) - pipeline_menu.addAction(perf_action) + # perf_action = QAction('&Performance Analysis', self) + # perf_action.triggered.connect(self.update_performance_estimation) + # pipeline_menu.addAction(perf_action) def setup_shortcuts(self): """Setup keyboard shortcuts.""" @@ -1679,7 +1679,7 @@ class IntegratedPipelineDashboard(QMainWindow): 'model_path': 'Path to model file', 'destination': 'Output file path', 'resolution': 'e.g., 1920x1080', - 'port_id': 'e.g., 6,7,8 or auto', + 'port_id': 'e.g., 6,7,8', 'operations': 'e.g., resize,normalize' } @@ -1719,7 +1719,7 @@ class IntegratedPipelineDashboard(QMainWindow): try: # Import MultiDongle for device scanning - from cluster4npu_ui.core.functions.Multidongle import MultiDongle + from core.functions.Multidongle import MultiDongle # Scan for available devices devices = MultiDongle.scan_devices() diff --git a/ui/windows/login.py b/ui/windows/login.py index 3303478..07e792b 100644 --- a/ui/windows/login.py +++ b/ui/windows/login.py @@ -12,7 +12,7 @@ Main Components: - Application navigation and routing Usage: - from cluster4npu_ui.ui.windows.login import DashboardLogin + from ui.windows.login import DashboardLogin dashboard = DashboardLogin() dashboard.show() @@ -28,7 +28,7 @@ from PyQt5.QtWidgets import ( from PyQt5.QtCore import Qt, pyqtSignal from PyQt5.QtGui import QFont, QPixmap, QIcon -from cluster4npu_ui.config.settings import get_settings +from config.settings import get_settings class DashboardLogin(QWidget): @@ -363,7 +363,7 @@ class DashboardLogin(QWidget): """Create a new pipeline.""" try: # Import here to avoid circular imports - from cluster4npu_ui.ui.dialogs.create_pipeline import CreatePipelineDialog + from ui.dialogs.create_pipeline import CreatePipelineDialog dialog = CreatePipelineDialog(self) if dialog.exec_() == dialog.Accepted: @@ -424,7 +424,7 @@ class DashboardLogin(QWidget): """Launch the main pipeline editor.""" try: # Import here to avoid circular imports - from cluster4npu_ui.ui.windows.dashboard import IntegratedPipelineDashboard + from ui.windows.dashboard import IntegratedPipelineDashboard self.dashboard_window = IntegratedPipelineDashboard() diff --git a/ui/windows/pipeline_editor.py b/ui/windows/pipeline_editor.py index 34f6a5e..d8ba74f 100644 --- a/ui/windows/pipeline_editor.py +++ b/ui/windows/pipeline_editor.py @@ -11,7 +11,7 @@ # - Pipeline validation and analysis # Usage: -# from cluster4npu_ui.ui.windows.pipeline_editor import PipelineEditor +# from ui.windows.pipeline_editor import PipelineEditor # editor = PipelineEditor() # editor.show() @@ -33,18 +33,18 @@ # NODEGRAPH_AVAILABLE = False # print("NodeGraphQt not available. Install with: pip install NodeGraphQt") -# from ...core.pipeline import get_stage_count, analyze_pipeline_stages, get_pipeline_summary -# from ...core.nodes.exact_nodes import ( +# from core.pipeline import get_stage_count, analyze_pipeline_stages, get_pipeline_summary +# from core.nodes.exact_nodes import ( # ExactInputNode, ExactModelNode, ExactPreprocessNode, # ExactPostprocessNode, ExactOutputNode # ) # # Keep the original imports as fallback # try: -# from ...core.nodes.model_node import ModelNode -# from ...core.nodes.preprocess_node import PreprocessNode -# from ...core.nodes.postprocess_node import PostprocessNode -# from ...core.nodes.input_node import InputNode -# from ...core.nodes.output_node import OutputNode +# from core.nodes.model_node import ModelNode +# from core.nodes.preprocess_node import PreprocessNode +# from core.nodes.postprocess_node import PostprocessNode +# from core.nodes.input_node import InputNode +# from core.nodes.output_node import OutputNode # except ImportError: # # Use ExactNodes as fallback # ModelNode = ExactModelNode diff --git a/utils/__init__.py b/utils/__init__.py index c260525..6a9f101 100644 --- a/utils/__init__.py +++ b/utils/__init__.py @@ -9,7 +9,7 @@ Available Utilities: - ui_utils: UI-related utility functions (future) Usage: - from cluster4npu_ui.utils import file_utils, ui_utils + from utils import file_utils, ui_utils # File operations pipeline_data = file_utils.load_pipeline('path/to/file.mflow') diff --git a/uv.lock b/uv.lock index be041db..61228cb 100644 --- a/uv.lock +++ b/uv.lock @@ -6,3 +6,93 @@ requires-python = ">=3.9, <3.12" name = "cluster4npu" version = "0.0.3" source = { virtual = "." } +dependencies = [ + { name = "nodegraphqt" }, + { name = "pyqt5" }, +] + +[package.metadata] +requires-dist = [ + { name = "nodegraphqt", specifier = ">=0.6.40" }, + { name = "pyqt5", specifier = ">=5.15.11" }, +] + +[[package]] +name = "nodegraphqt" +version = "0.6.40" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "qt-py" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0f/9a/ee0917864f0ae3462eb143d83f8dfc1710d535d8f69a55c194339630a1a4/nodegraphqt-0.6.40.tar.gz", hash = "sha256:6be0eaabc1191b025b6abd36968aa4f2fc2bb268e1dc3465bdde8afc6c1335a9", size = 111443, upload-time = "2025-07-15T21:14:32.534Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/56/f3749f76bd705faa782a02229a9cd87008dc5c544282d749ee996f297836/nodegraphqt-0.6.40-py3-none-any.whl", hash = "sha256:0a4169986ced84df9e58d0fd8cf8e3abd6b0357c602e8971b1f4ea45b15a9e0b", size = 135326, upload-time = "2025-07-15T21:14:31.294Z" }, +] + +[[package]] +name = "pyqt5" +version = "5.15.11" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pyqt5-qt5" }, + { name = "pyqt5-sip" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0e/07/c9ed0bd428df6f87183fca565a79fee19fa7c88c7f00a7f011ab4379e77a/PyQt5-5.15.11.tar.gz", hash = "sha256:fda45743ebb4a27b4b1a51c6d8ef455c4c1b5d610c90d2934c7802b5c1557c52", size = 3216775, upload-time = "2024-07-19T08:39:57.756Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/11/64/42ec1b0bd72d87f87bde6ceb6869f444d91a2d601f2e67cd05febc0346a1/PyQt5-5.15.11-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:c8b03dd9380bb13c804f0bdb0f4956067f281785b5e12303d529f0462f9afdc2", size = 6579776, upload-time = "2024-07-19T08:39:19.775Z" }, + { url = "https://files.pythonhosted.org/packages/49/f5/3fb696f4683ea45d68b7e77302eff173493ac81e43d63adb60fa760b9f91/PyQt5-5.15.11-cp38-abi3-macosx_11_0_x86_64.whl", hash = "sha256:6cd75628f6e732b1ffcfe709ab833a0716c0445d7aec8046a48d5843352becb6", size = 7016415, upload-time = "2024-07-19T08:39:32.977Z" }, + { url = "https://files.pythonhosted.org/packages/b4/8c/4065950f9d013c4b2e588fe33cf04e564c2322842d84dbcbce5ba1dc28b0/PyQt5-5.15.11-cp38-abi3-manylinux_2_17_x86_64.whl", hash = "sha256:cd672a6738d1ae33ef7d9efa8e6cb0a1525ecf53ec86da80a9e1b6ec38c8d0f1", size = 8188103, upload-time = "2024-07-19T08:39:40.561Z" }, + { url = "https://files.pythonhosted.org/packages/f3/f0/ae5a5b4f9b826b29ea4be841b2f2d951bcf5ae1d802f3732b145b57c5355/PyQt5-5.15.11-cp38-abi3-win32.whl", hash = "sha256:76be0322ceda5deecd1708a8d628e698089a1cea80d1a49d242a6d579a40babd", size = 5433308, upload-time = "2024-07-19T08:39:46.932Z" }, + { url = "https://files.pythonhosted.org/packages/56/d5/68eb9f3d19ce65df01b6c7b7a577ad3bbc9ab3a5dd3491a4756e71838ec9/PyQt5-5.15.11-cp38-abi3-win_amd64.whl", hash = "sha256:bdde598a3bb95022131a5c9ea62e0a96bd6fb28932cc1619fd7ba211531b7517", size = 6865864, upload-time = "2024-07-19T08:39:53.572Z" }, +] + +[[package]] +name = "pyqt5-qt5" +version = "5.15.17" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d3/f9/accb06e76e23fb23053d48cc24fd78dec6ed14cb4d5cbadb0fd4a0c1b02e/PyQt5_Qt5-5.15.17-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:d8b8094108e748b4bbd315737cfed81291d2d228de43278f0b8bd7d2b808d2b9", size = 39972275, upload-time = "2025-05-24T11:15:42.259Z" }, + { url = "https://files.pythonhosted.org/packages/87/1a/e1601ad6934cc489b8f1e967494f23958465cf1943712f054c5a306e9029/PyQt5_Qt5-5.15.17-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b68628f9b8261156f91d2f72ebc8dfb28697c4b83549245d9a68195bd2d74f0c", size = 37135109, upload-time = "2025-05-24T11:15:59.786Z" }, + { url = "https://files.pythonhosted.org/packages/ac/e1/13d25a9ff2ac236a264b4603abaa39fa8bb9a7aa430519bb5f545c5b008d/PyQt5_Qt5-5.15.17-py3-none-manylinux2014_x86_64.whl", hash = "sha256:b018f75d1cc61146396fa5af14da1db77c5d6318030e5e366f09ffdf7bd358d8", size = 61112954, upload-time = "2025-05-24T11:16:26.036Z" }, +] + +[[package]] +name = "pyqt5-sip" +version = "12.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/01/79/086b50414bafa71df494398ad277d72e58229a3d1c1b1c766d12b14c2e6d/pyqt5_sip-12.17.0.tar.gz", hash = "sha256:682dadcdbd2239af9fdc0c0628e2776b820e128bec88b49b8d692fe682f90b4f", size = 104042, upload-time = "2025-02-02T17:13:11.268Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6b/23/1da570b7e143b6d216728c919cae2976f7dbff65db94e3d9f5b62df37ba5/PyQt5_sip-12.17.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ec47914cc751608e587c1c2fdabeaf4af7fdc28b9f62796c583bea01c1a1aa3e", size = 122696, upload-time = "2025-02-02T17:12:35.786Z" }, + { url = "https://files.pythonhosted.org/packages/61/d5/506b1c3ad06268c601276572f1cde1c0dffd074b44e023f4d80f5ea49265/PyQt5_sip-12.17.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:2f2a8dcc7626fe0da73a0918e05ce2460c7a14ddc946049310e6e35052105434", size = 270932, upload-time = "2025-02-02T17:12:38.175Z" }, + { url = "https://files.pythonhosted.org/packages/0b/9b/46159d8038374b076244a1930ead460e723453ec73f9b0330390ddfdd0ea/PyQt5_sip-12.17.0-cp310-cp310-win32.whl", hash = "sha256:0c75d28b8282be3c1d7dbc76950d6e6eba1e334783224e9b9835ce1a9c64f482", size = 49085, upload-time = "2025-02-02T17:12:40.146Z" }, + { url = "https://files.pythonhosted.org/packages/fe/66/b3eb937a620ce2a5db5c377beeca870d60fafd87aecc1bcca6921bbcf553/PyQt5_sip-12.17.0-cp310-cp310-win_amd64.whl", hash = "sha256:8c4bc535bae0dfa764e8534e893619fe843ce5a2e25f901c439bcb960114f686", size = 59040, upload-time = "2025-02-02T17:12:41.962Z" }, + { url = "https://files.pythonhosted.org/packages/52/fd/7d6e3deca5ce37413956faf4e933ce6beb87ac0cc7b26d934b5ed998f88a/PyQt5_sip-12.17.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2c912807dd638644168ea8c7a447bfd9d85a19471b98c2c588c4d2e911c09b0a", size = 122748, upload-time = "2025-02-02T17:12:43.831Z" }, + { url = "https://files.pythonhosted.org/packages/29/4d/e5981cde03b091fd83a1ef4ef6a4ca99ce6921d61b80c0222fc8eafdc99a/PyQt5_sip-12.17.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:71514a7d43b44faa1d65a74ad2c5da92c03a251bdc749f009c313f06cceacc9a", size = 276401, upload-time = "2025-02-02T17:12:45.705Z" }, + { url = "https://files.pythonhosted.org/packages/5f/30/4c282896b1e8841639cf2aca59acf57d8b261ed834ae976c959f25fa4a35/PyQt5_sip-12.17.0-cp311-cp311-win32.whl", hash = "sha256:023466ae96f72fbb8419b44c3f97475de6642fa5632520d0f50fc1a52a3e8200", size = 49091, upload-time = "2025-02-02T17:12:47.688Z" }, + { url = "https://files.pythonhosted.org/packages/24/c1/50fc7301aa39a50f451fc1b6b219e778c540a823fe9533a57b4793c859fd/PyQt5_sip-12.17.0-cp311-cp311-win_amd64.whl", hash = "sha256:fb565469d08dcb0a427def0c45e722323beb62db79454260482b6948bfd52d47", size = 59036, upload-time = "2025-02-02T17:12:49.535Z" }, + { url = "https://files.pythonhosted.org/packages/21/f7/3bed2754743ba52b8264c20a1c52df6ff9c5f6465c11ae108be3b841471a/PyQt5_sip-12.17.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:d65a9c1b4cbbd8e856254609f56e897d2cb5c903f77b75fb720cb3a32c76b92b", size = 122688, upload-time = "2025-02-02T17:13:04.617Z" }, + { url = "https://files.pythonhosted.org/packages/23/63/8a934ea1f759eee60b4e0143e5b109d16560bf67593bfed76cca55799a1a/PyQt5_sip-12.17.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:32b03e7e77ecd7b4119eba486b0706fa59b490bcceb585f9b6ddec8a582082db", size = 268531, upload-time = "2025-02-02T17:13:06.005Z" }, + { url = "https://files.pythonhosted.org/packages/34/80/0df0cdb7b25a87346a493cedb20f6eeb0301e7fbc02ed23d9077df998291/PyQt5_sip-12.17.0-cp39-cp39-win32.whl", hash = "sha256:5b6c734f4ad28f3defac4890ed747d391d246af279200935d49953bc7d915b8c", size = 49005, upload-time = "2025-02-02T17:13:07.741Z" }, + { url = "https://files.pythonhosted.org/packages/30/f5/2fd274c4fe9513d750eecfbe0c39937a179534446e148d8b9db4255f429a/PyQt5_sip-12.17.0-cp39-cp39-win_amd64.whl", hash = "sha256:855e8f5787d57e26a48d8c3de1220a8e92ab83be8d73966deac62fdae03ea2f9", size = 59076, upload-time = "2025-02-02T17:13:09.643Z" }, +] + +[[package]] +name = "qt-py" +version = "1.4.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "types-pyside2" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a9/7a/7dfe58082cead77f0600f5244a9f92caab683da99f2a2e36fa24870a41ca/qt_py-1.4.6.tar.gz", hash = "sha256:d26f808a093754f0b44858745965bab138525cffc77c1296a3293171b2e2469f", size = 57847, upload-time = "2025-05-13T04:21:08.36Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bc/0d/3486a49ee1550b048a913fe2004588f84f469714950b073cbf2261d6e349/qt_py-1.4.6-py2.py3-none-any.whl", hash = "sha256:1e0f8da9af74f2b3448904fab313f6f79cad56b82895f1a2c541243f00cc244e", size = 42358, upload-time = "2025-05-13T04:21:06.657Z" }, +] + +[[package]] +name = "types-pyside2" +version = "5.15.2.1.7" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/18/b9/b9691abe89b0dd6f02e52604dda35112e202084970edf1515eba22e45ab8/types_pyside2-5.15.2.1.7.tar.gz", hash = "sha256:1d65072deb97481ad481b3414f94d02fd5da07f5e709c2d439ced14f79b2537c", size = 539112, upload-time = "2024-03-11T19:17:12.962Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c1/19/b093a69c7964ab9abea8130fc4ca7e5f1f0f9c19433e53e2ca41a38d1285/types_pyside2-5.15.2.1.7-py2.py3-none-any.whl", hash = "sha256:a7bec4cb4657179415ca7ec7c70a45f9f9938664e22f385c85fd7cd724b07d4d", size = 572176, upload-time = "2024-03-11T19:17:11.079Z" }, +]