reno.explorer.PanesSet#

class reno.explorer.PanesSet(model, **params)#

Bases: Viewer

Container for the modifiable GridStack of model exploration widgets, with controls for configuring.

Methods

__init__(model, **params)

add_config_pane()

Create a config comparison widget and add it to the tab interface.

add_diagram_pane()

Create a new stock and flow diagram widget and add it to the tab interface.

add_pane(pane_to_add)

Add the passed model explorer widget and modify the gstack size.

add_plots_pane()

Create a new plots widget and add it to the tab interface.

add_text_pane()

Create a new editable text widget and add it to the tab interface.

export()

Save all necessary data about current tab in workspace (including a copy of the model and any simulation data) and use the tab_exporter to produce an HTML and PDF in the .doccache path.

fire_on_name_changed(*args)

Trigger the callbacks for the name_changed event.

fire_on_new_controls_needed(controls_layout, ...)

Trigger the callbacks for the new_controls_needed event.

from_dict(data[, traces])

Deserialize all config and widgets from data _into current instance_.

get_pane_delete_button(pane)

Create a button for the passed pane that will remove said pane when clicked.

invalidate_downloads()

If something important has changed since the last time the tab was exported, visually highlight on all the relevant buttons.

make_new_pane_from_data(data)

Create a pane based on a dictionary specifying type and coniguration.

on_name_changed(callback)

Register a function to execute when the tab title is changed.

on_new_controls_needed(callback)

Register a function to execute whenever a widget within the tab requests a new set of helper controls be displayed in the sidebar.

remove_pane(*args, pane_to_remove)

Remove the passed dashboard pane from the current pane grid.

servable([title, location, area, target])

Serves the object or adds it to the configured pn.state.template if in a panel serve context, writes to the DOM if in a pyodide context and returns the Panel object to allow it to display itself in a notebook context.

show([title, port, address, ...])

Starts a Bokeh server and displays the Viewable in a new tab.

to_dict([include_traces])

Serialize tab and all contained widgets into a dictionary so can be saved to file and reproduced later.

Attributes

name

param

tab_name

Parameters:
  • model (reno.Model)

  • params (dict)

__annotations__ = {}#
__module__ = 'reno.explorer'#
__panel__()#

Required function to return the actual frontend component.

Return type:

Viewable

add_config_pane()#

Create a config comparison widget and add it to the tab interface.

Return type:

None

add_diagram_pane()#

Create a new stock and flow diagram widget and add it to the tab interface.

Return type:

None

add_pane(pane_to_add)#

Add the passed model explorer widget and modify the gstack size. This allows a constantly growing interface, though this is currently a bit simplistic and doesn’t allow manually setting or reducing yet.

Parameters:

pane_to_add (DashboardPane)

Return type:

None

add_plots_pane()#

Create a new plots widget and add it to the tab interface.

Return type:

None

add_text_pane()#

Create a new editable text widget and add it to the tab interface.

Return type:

None

export()#

Save all necessary data about current tab in workspace (including a copy of the model and any simulation data) and use the tab_exporter to produce an HTML and PDF in the .doccache path.

This then updates tab controls to include buttons for downloading these.

Return type:

None

fire_on_name_changed(*args)#

Trigger the callbacks for the name_changed event.

Parameters:

args (list)

Return type:

None

fire_on_new_controls_needed(controls_layout, pane)#

Trigger the callbacks for the new_controls_needed event.

Parameters:
Return type:

None

from_dict(data, traces=None)#

Deserialize all config and widgets from data _into current instance_.

Parameters:
  • data (dict)

  • traces (dict)

Return type:

None

get_pane_delete_button(pane)#

Create a button for the passed pane that will remove said pane when clicked.

Parameters:

pane (DashboardPane)

Return type:

Button

invalidate_downloads()#

If something important has changed since the last time the tab was exported, visually highlight on all the relevant buttons.

Return type:

None

make_new_pane_from_data(data)#

Create a pane based on a dictionary specifying type and coniguration.

Used both by the from_dict as well as REST API handling.

Parameters:

data (dict)

Return type:

DashboardPane

name = 'PanesSet'#
on_name_changed(callback)#

Register a function to execute when the tab title is changed.

Callbacks should take the new string name.

Parameters:

callback (Callable)

Return type:

None

on_new_controls_needed(callback)#

Register a function to execute whenever a widget within the tab requests a new set of helper controls be displayed in the sidebar.

Callbacks should take a list of panel viewables.

Parameters:

callback (Callable)

Return type:

None

remove_pane(*args, pane_to_remove)#

Remove the passed dashboard pane from the current pane grid.

Parameters:
Return type:

None

tab_name = 'Tab 1'#
to_dict(include_traces=True)#

Serialize tab and all contained widgets into a dictionary so can be saved to file and reproduced later.

Parameters:

include_traces (bool)

Return type:

dict