Generalize config path. (#802)

* Generalize config path.

* Fix format.

* Fix typo.

[ROCm/rocprofiler-compute commit: 8585cd8e8f]
Dieser Commit ist enthalten in:
xuchen-amd
2025-07-09 18:57:21 -04:00
committet von GitHub
Ursprung f730199ef7
Commit 9ebbf4bb03
2 geänderte Dateien mit 182 neuen und 128 gelöschten Zeilen
@@ -4,7 +4,8 @@ Panel Widget Modules
Contains the panel widgets used in the main layout.
"""
from typing import Any, Dict
from importlib import resources
from typing import Any, Dict, Optional
from textual.containers import ScrollableContainer
from textual.widgets import Label
@@ -15,12 +16,16 @@ from rocprof_compute_tui.widgets.collapsibles import build_all_sections
class AnalyzeView(ScrollableContainer):
"""Center panel with analysis results."""
def __init__(
self, config_path: str = "src/rocprof_compute_tui/utils/analyze_config.yaml"
):
def __init__(self, config_path: Optional[str] = None):
super().__init__(id="analyze-view")
self.dfs = {}
self.config_path = config_path
if config_path is None:
config_path = (
resources.files("rocprof_compute_tui.utils") / "analyze_config.yaml"
)
self.config_path = str(config_path)
def compose(self):
"""