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_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 session (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_

invalidate_downloads()

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

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.

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

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

Subclasses should return a Panel component to be rendered.

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. This allows a constantly growing interface, though this is currently a bit simplistic and doesn’t allow manually setting or reducing yet.

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 session (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.

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=None)#

Deserialize all config and widgets from data _into current instance_

Parameters:
  • data (dict)

  • traces (dict)

invalidate_downloads()#

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

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)

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 panel widget.

Parameters:

callback (Callable)

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