Explorer

Interactive explorer of platform states.

Created by PlatformState.explore, it is a single widget, displayed natively by Jupyter and Marimo. Requires anywidget, included in the jupyter and marimo extras.

class qibocal_widgets.explorer.Explorer(*args, **kwargs)

Bases: AnyWidget

Explorer of a PlatformState.

Use PlatformState.explore to create one. The navigation bar accepts paths, in any form accepted by PlatformState.resolve (full, within a document, or quoted in pasted code), and searches leaves by path otherwise.

Parameters:
name

How the state is referred to in code snippets.

path

Current canonical path (empty at the root).

query

Current search, when the navigation text is not a path.

crumbs

{label, path} from the root to the current path.

Type:

Breadcrumbs

rows

{key, path, kind, display, raw, changed, before}.

Type:

Displayed entries

editable

Whether leaves can be edited.

comparing

Whether a comparison state is set.

changed_only

Show only entries differing from the comparison state.

error

Last error, if any.

snippet

Code reproducing the last edit.

state

The explored state.

compare

The state differences are highlighted against, if any.

navigate(text)

Go to the path designated by some text, or search for it.

Parameters:

text (str)

Return type:

None

edit(path, text)

Set a leaf from the JSON text of its new value.

Parameters:
Return type:

None

refresh()

Recompute the displayed entries from the current state.

Return type:

None