Generalize config path. (#802)
* Generalize config path.
* Fix format.
* Fix typo.
[ROCm/rocprofiler-compute commit: 8585cd8e8f]
This commit is contained in:
+10
-5
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user