reno.diagrams.RenderConfig#
- class reno.diagrams.RenderConfig(show=None, hide=None, show_groups=None, hide_groups=None, universe=None, vars=True, metrics=False, group_colors=None, var_sparklines=False, flow_sparklines=False, stock_sparklines=False, metric_sparklines=False, sparklines=None, traces=None, theme='light', lr=False)#
Bases:
objectSettings for what gets rendered in a stock and flow diagram.
Methods
__init__([show, hide, show_groups, ...])Attributes
Include sparklines next to flows.
Modify existing group colors or define new groups and associated colors to render with.
List of individual references to exclude, this takes priority over groups.
List of group names, any references part of any groups listed here will be excluded.
Render the diagram top-bottom (default, if
False) or left-right.Include sparklines next to metrics.
Whether to include metrics in the diagram (
Falseby default.)List of individual references to include, this takes priority over groups.
List of group names to show, any references part of any groups listed here will be displayed.
List of specific components to include sparkline plots for.
Include sparklines next to stocks.
Whether to render the diagram in
"light"or"dark"theme.The set of xarray datasets from simulation runs (numpy or pymc) to use in the sparklines.
Limit the possible set of references to draw from when rendering.
Include sparklines next to variables.
Whether to include variables in the diagram (
Trueby default.)- Parameters:
show (list[Reference])
hide (list[Reference])
show_groups (list[str])
hide_groups (list[str])
universe (list[Reference])
vars (bool)
metrics (bool)
group_colors (dict[str | tuple[TrackedReference], str])
var_sparklines (bool)
flow_sparklines (bool)
stock_sparklines (bool)
metric_sparklines (bool)
sparklines (list[Reference])
traces (list[Dataset])
theme (str)
lr (bool)
- __annotations__ = {'flow_sparklines': 'bool', 'group_colors': 'dict[str | tuple[reno.components.TrackedReference], str]', 'hide': 'list[reno.components.Reference]', 'hide_groups': 'list[str]', 'lr': 'bool', 'metric_sparklines': 'bool', 'metrics': 'bool', 'show': 'list[reno.components.Reference]', 'show_groups': 'list[str]', 'sparklines': 'list[reno.components.Reference]', 'stock_sparklines': 'bool', 'theme': 'str', 'traces': 'list[xr.Dataset]', 'universe': 'list[reno.components.Reference]', 'var_sparklines': 'bool', 'vars': 'bool'}#
- __dataclass_fields__ = {'flow_sparklines': Field(name='flow_sparklines',type='bool',default=False,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'group_colors': Field(name='group_colors',type='dict[str | tuple[reno.components.TrackedReference], str]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'hide': Field(name='hide',type='list[reno.components.Reference]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'hide_groups': Field(name='hide_groups',type='list[str]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'lr': Field(name='lr',type='bool',default=False,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'metric_sparklines': Field(name='metric_sparklines',type='bool',default=False,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'metrics': Field(name='metrics',type='bool',default=False,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'show': Field(name='show',type='list[reno.components.Reference]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'show_groups': Field(name='show_groups',type='list[str]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'sparklines': Field(name='sparklines',type='list[reno.components.Reference]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'stock_sparklines': Field(name='stock_sparklines',type='bool',default=False,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'theme': Field(name='theme',type='str',default='light',default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'traces': Field(name='traces',type='list[xr.Dataset]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'universe': Field(name='universe',type='list[reno.components.Reference]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'var_sparklines': Field(name='var_sparklines',type='bool',default=False,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'vars': Field(name='vars',type='bool',default=True,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.diagrams', '__annotations__': {'show': 'list[reno.components.Reference]', 'hide': 'list[reno.components.Reference]', 'show_groups': 'list[str]', 'hide_groups': 'list[str]', 'universe': 'list[reno.components.Reference]', 'vars': 'bool', 'metrics': 'bool', 'group_colors': 'dict[str | tuple[reno.components.TrackedReference], str]', 'var_sparklines': 'bool', 'flow_sparklines': 'bool', 'stock_sparklines': 'bool', 'metric_sparklines': 'bool', 'sparklines': 'list[reno.components.Reference]', 'traces': 'list[xr.Dataset]', 'theme': 'str', 'lr': 'bool'}, '__doc__': 'Settings for what gets rendered in a stock and flow diagram.', 'show': None, 'hide': None, 'show_groups': None, 'hide_groups': None, 'universe': None, 'vars': True, 'metrics': False, 'group_colors': None, 'var_sparklines': False, 'flow_sparklines': False, 'stock_sparklines': False, 'metric_sparklines': False, 'sparklines': None, 'traces': None, 'theme': 'light', 'lr': False, '__post_init__': <function RenderConfig.__post_init__>, '__dict__': <attribute '__dict__' of 'RenderConfig' objects>, '__weakref__': <attribute '__weakref__' of 'RenderConfig' 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__': {'show': Field(name='show',type='list[reno.components.Reference]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'hide': Field(name='hide',type='list[reno.components.Reference]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'show_groups': Field(name='show_groups',type='list[str]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'hide_groups': Field(name='hide_groups',type='list[str]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'universe': Field(name='universe',type='list[reno.components.Reference]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'vars': Field(name='vars',type='bool',default=True,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'metrics': Field(name='metrics',type='bool',default=False,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'group_colors': Field(name='group_colors',type='dict[str | tuple[reno.components.TrackedReference], str]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'var_sparklines': Field(name='var_sparklines',type='bool',default=False,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'flow_sparklines': Field(name='flow_sparklines',type='bool',default=False,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'stock_sparklines': Field(name='stock_sparklines',type='bool',default=False,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'metric_sparklines': Field(name='metric_sparklines',type='bool',default=False,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'sparklines': Field(name='sparklines',type='list[reno.components.Reference]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'traces': Field(name='traces',type='list[xr.Dataset]',default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'theme': Field(name='theme',type='str',default='light',default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'lr': Field(name='lr',type='bool',default=False,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}, '__init__': <function RenderConfig.__init__>, '__repr__': <function RenderConfig.__repr__>, '__eq__': <function RenderConfig.__eq__>, '__hash__': None, '__match_args__': ('show', 'hide', 'show_groups', 'hide_groups', 'universe', 'vars', 'metrics', 'group_colors', 'var_sparklines', 'flow_sparklines', 'stock_sparklines', 'metric_sparklines', 'sparklines', 'traces', 'theme', 'lr')})#
- __eq__(other)#
Return self==value.
- __hash__ = None#
- __match_args__ = ('show', 'hide', 'show_groups', 'hide_groups', 'universe', 'vars', 'metrics', 'group_colors', 'var_sparklines', 'flow_sparklines', 'stock_sparklines', 'metric_sparklines', 'sparklines', 'traces', 'theme', 'lr')#
- __module__ = 'reno.diagrams'#
- __post_init__()#
- __repr__()#
Return repr(self).
- __weakref__#
list of weak references to the object
- flow_sparklines: bool = False#
Include sparklines next to flows.
- group_colors: dict[str | tuple[TrackedReference], str] = None#
Modify existing group colors or define new groups and associated colors to render with. String keys refer to existing cgroup/group names. Tuples of references create new ad-hoc groups.
- hide: list[Reference] = None#
List of individual references to exclude, this takes priority over groups.
- hide_groups: list[str] = None#
List of group names, any references part of any groups listed here will be excluded.
- lr: bool = False#
Render the diagram top-bottom (default, if
False) or left-right.
- metric_sparklines: bool = False#
Include sparklines next to metrics.
- metrics: bool = False#
Whether to include metrics in the diagram (
Falseby default.)
- show: list[Reference] = None#
List of individual references to include, this takes priority over groups.
- show_groups: list[str] = None#
List of group names to show, any references part of any groups listed here will be displayed.
- stock_sparklines: bool = False#
Include sparklines next to stocks.
- theme: str = 'light'#
Whether to render the diagram in
"light"or"dark"theme.
- traces: list[Dataset] = None#
The set of xarray datasets from simulation runs (numpy or pymc) to use in the sparklines.
- universe: list[Reference] = None#
Limit the possible set of references to draw from when rendering. Specifying this applies restrictions to the other show*/hide* functions. The default of
Noneplaces no restrictions.
- var_sparklines: bool = False#
Include sparklines next to variables.
- vars: bool = True#
Whether to include variables in the diagram (
Trueby default.)