Skip to main content
Version: 0.0.98

ts_shape.eventlog.introspect

Introspection: answer "what does this detector method emit?".

One call instead of crawling the registry, the archetype table and the override table by hand::

from ts_shape.eventlog import describe
describe("OEEEvents.oee")
Functions
NameDescription
describeReturn everything ts-shape knows about a detector method.

describe​

functionsource
describe(detector: str) -> dict[str, Any]

Return everything ts-shape knows about a detector method.

Parameters
NameTypeDescriptionDefault
detectorstr"ClassName.method_name" -- the key accepted by :func:~ts_shape.eventlog.to_event_log.required
Returns
TypeDescription
dict[str, Any]A dict with class_name, method_name, the registered
dict[str, Any]class:~ts_shape.eventlog.taxonomy.LabelRule fields (pack,
dict[str, Any]shape, activity_template, produces_objects,
dict[str, Any]severity_field, severity_thresholds, value_field,
dict[str, Any]drop_fields, standard_attrs), the conceptual archetype and
dict[str, Any]has_override.
Raises
TypeDescription
ValueErrorIf detector is not "ClassName.method_name".
KeyErrorIf the method has no taxonomy entry.