Skip to content
Projects

scope_profiler.tui

Interactive Textual browser for scope-profiler HDF5 files.

Classes

NameDescription
BrowserModelLoaded data and navigation tree for one HDF5 profile.
BrowserNodeOne selectable item in the TUI navigation tree.

Functions

NameDescription
build_browser_modelLoad one HDF5 profile and build the selectable TUI navigation tree.
build_parserNo description.
mainNo description.
node_detail_textReturn a plain-text detail view for a selected navigation node.
render_plotRender one TUI plot node through the existing plotting functions.
render_plotext_textRender a Plotext chart while protecting its process-global state.

BrowserModelclassdataclass#

class BrowserModel(file_path: Path, results: Any, root: BrowserNode)

Loaded data and navigation tree for one HDF5 profile.

file_pathattributeinstance attribute#

file_path: Path

resultsattributeinstance attribute#

results: Any

rootattributeinstance attribute#

root: BrowserNode

BrowserNodeclassdataclass#

class BrowserNode(label: str, kind: str, payload: dict[str, Any] = dict(), children: list[BrowserNode] = list())

One selectable item in the TUI navigation tree.

childrenattributeclass attributeinstance attribute#

children: list[BrowserNode] = field(default_factory=list)

kindattributeinstance attribute#

kind: str

labelattributeinstance attribute#

label: str

payloadattributeclass attributeinstance attribute#

payload: dict[str, Any] = field(default_factory=dict)

build_browser_modelfunction#

def build_browser_model(file_path: str | Path) -> BrowserModel

Load one HDF5 profile and build the selectable TUI navigation tree.

build_parserfunction#

def build_parser() -> argparse.ArgumentParser

mainfunction#

def main(argv: list[str] | None = None)

node_detail_textfunction#

def node_detail_text(node: BrowserNode) -> str

Return a plain-text detail view for a selected navigation node.

render_plotfunction#

def render_plot(node: BrowserNode, *, filepath: str | Path | None = None, show: bool = False, settings: dict[str, Any] | None = None) -> str | None

Render one TUI plot node through the existing plotting functions.

render_plotext_textfunction#

def render_plotext_text(node: BrowserNode, *, settings: dict[str, Any] | None = None, width: int = 100, height: int = 35) -> str

Render a Plotext chart while protecting its process-global state.