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
| Name | Description |
|---|---|
describe | Return everything ts-shape knows about a detector method. |
describe
describe(detector: str) -> dict[str, Any]
Return everything ts-shape knows about a detector method.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
detector | str | "ClassName.method_name" -- the key accepted by :func:~ts_shape.eventlog.to_event_log. | required |
Returns
| Type | Description |
|---|---|
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
| Type | Description |
|---|---|
ValueError | If detector is not "ClassName.method_name". |
KeyError | If the method has no taxonomy entry. |