reno.viz.ReferenceEditor#

class reno.viz.ReferenceEditor(model, ref_name, is_init, control=None)#

Bases: object

A textbox associated with a reference, used for modifying an equation in a visual interface.

Primarily only used in explorer now.

Methods

__init__(model, ref_name, is_init[, control])

assign_value_from_control()

Set the underlying reference's equation based on the current string in the control.

get_eq()

Get the equation from the TrackedReference, (takes into account if this is describing the init or the eq itself).

get_eq_str()

Get the string version of the current equation.

get_ref()

Get the underling TrackedReference object associated with this editor.

parse_str_to_eq()

Get the equivalent EquationPart equation for the string in the control.

Attributes

Parameters:
  • model (Model)

  • ref_name (str)

  • is_init (bool)

  • control (Text | TextInput)

__annotations__ = {'control': ipywidgets.widgets.widget_string.Text | panel.widgets.input.TextInput, 'is_init': <class 'bool'>, 'model': 'reno.model.Model', 'ref_name': <class 'str'>}#
__dataclass_fields__ = {'control': Field(name='control',type=ipywidgets.widgets.widget_string.Text | panel.widgets.input.TextInput,default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'is_init': Field(name='is_init',type=<class 'bool'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'model': Field(name='model',type='reno.model.Model',default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'ref_name': Field(name='ref_name',type=<class 'str'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}#
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False)#
__dict__ = mappingproxy({'__module__': 'reno.viz', '__annotations__': {'model': 'reno.model.Model', 'ref_name': <class 'str'>, 'is_init': <class 'bool'>, 'control': ipywidgets.widgets.widget_string.Text | panel.widgets.input.TextInput}, '__doc__': 'A textbox associated with a reference, used for modifying an equation\n    in a visual interface.\n\n    Primarily only used in explorer now.\n    ', 'control': None, 'get_ref': <function ReferenceEditor.get_ref>, 'get_eq': <function ReferenceEditor.get_eq>, 'get_eq_str': <function ReferenceEditor.get_eq_str>, 'parse_str_to_eq': <function ReferenceEditor.parse_str_to_eq>, 'assign_value_from_control': <function ReferenceEditor.assign_value_from_control>, '__dict__': <attribute '__dict__' of 'ReferenceEditor' objects>, '__weakref__': <attribute '__weakref__' of 'ReferenceEditor' objects>, '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False), '__dataclass_fields__': {'model': Field(name='model',type='reno.model.Model',default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'ref_name': Field(name='ref_name',type=<class 'str'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'is_init': Field(name='is_init',type=<class 'bool'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'control': Field(name='control',type=ipywidgets.widgets.widget_string.Text | panel.widgets.input.TextInput,default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}, '__init__': <function ReferenceEditor.__init__>, '__repr__': <function ReferenceEditor.__repr__>, '__eq__': <function ReferenceEditor.__eq__>, '__hash__': None, '__match_args__': ('model', 'ref_name', 'is_init', 'control')})#
__eq__(other)#

Return self==value.

__hash__ = None#
__match_args__ = ('model', 'ref_name', 'is_init', 'control')#
__module__ = 'reno.viz'#
__repr__()#

Return repr(self).

__weakref__#

list of weak references to the object

assign_value_from_control()#

Set the underlying reference’s equation based on the current string in the control.

control: Text | TextInput = None#
get_eq()#

Get the equation from the TrackedReference, (takes into account if this is describing the init or the eq itself).

Return type:

EquationPart

get_eq_str()#

Get the string version of the current equation.

Return type:

str

get_ref()#

Get the underling TrackedReference object associated with this editor.

Return type:

TrackedReference

is_init: bool#
model: Model#
parse_str_to_eq()#

Get the equivalent EquationPart equation for the string in the control.

Return type:

EquationPart

ref_name: str#