Skip to content

taxonomy

taxonomy ¤

Per-method label rules — the source of truth for ocel:activity names.

Every public DataFrame-returning method on every detector class under ts_shape.events.* must have an entry here. The coverage test tests/eventlog/test_adapter_coverage.py enforces this.

A :class:LabelRule describes:

  • template — the ocel:activity value. May contain {field} placeholders that get substituted from legacy DataFrame columns.
  • pack — one of quality, production, engineering, maintenance, supplychain, energy, correlation.
  • shape — how to interpret each legacy row: "point" → single-timestamp event (systime or first datetime), "interval" → has start/end columns, "summary" → a windowed/aggregate row (uses end column or any datetime), "static" → no time semantics; uses ts_shape:fallback_now.
  • produces_objects — object types the adapter auto-extracts from the legacy DataFrame's standard columns (e.g. source_uuid -> asset). Callers can always attach additional contextual object types (batch, shift, operator, ...) via the objects= argument to :func:~ts_shape.eventlog.to_event_log. Empty tuple means "no auto-extraction; objects only appear if the caller binds them".

render_activity ¤

render_activity(
    rule: LabelRule, row: Mapping[str, object]
) -> str

Substitute {field} placeholders in rule.template from row.

Missing fields render as unknown rather than raising — adapters should not crash on partial input data.