shyft.dashboard.time_series.sources.ts_adapter

Classes

BasicTsAdapter(data, unit_registry, unit)

This class is the most basic implementation of a TsAdapter which takes a TimeSeries and returns its evaluation when called

TsAdapter()

This object defines the data for a data source.

class shyft.dashboard.time_series.sources.ts_adapter.TsAdapter[source]

Bases: ABC

This object defines the data for a data source. With the __call__ data for a given time axis and unit can be provided to be viewed by the ts viewer. The call method must return a Unit annotated TsVector with the time series to show.

abstract __call__(*, time_axis: ~shyft.time_series._time_series.TimeAxis, unit: str | ~pint.unit.build_unit_class.<locals>.Unit) Quantity[TsVector][source]

Call self as a function.

class shyft.dashboard.time_series.sources.ts_adapter.BasicTsAdapter(data: ~shyft.time_series._time_series.TimeSeries | ~shyft.time_series._time_series.TsVector | ~pint.quantity.build_quantity_class.<locals>.Quantity, unit_registry, unit: str)[source]

Bases: TsAdapter

This class is the most basic implementation of a TsAdapter which takes a TimeSeries and returns its evaluation when called

__init__(data: ~shyft.time_series._time_series.TimeSeries | ~shyft.time_series._time_series.TsVector | ~pint.quantity.build_quantity_class.<locals>.Quantity, unit_registry, unit: str)[source]
__call__(*, time_axis: ~shyft.time_series._time_series.TimeAxis, unit: str | ~pint.unit.build_unit_class.<locals>.Unit) Quantity[TsVector][source]

Call self as a function.