Skip to content

v0.0.13

New: lyth CLI

Command-line interface for running the lythonic compose engine.

  • lyth start — load lyth.yaml, activate triggers, run poll loop with PID file and SIGTERM handling.
  • lyth stop — send SIGTERM to a running engine instance.
  • lyth run <nsref> — one-shot DAG or callable execution.
  • lyth fire <trigger> — manually fire a trigger.
  • lyth status — show running state, trigger activations, last runs.
  • File loggingdata/lyth.log with NodeRunLogFilter injecting run_id and node_label into every log record.

New: Namespace Serialization

  • Namespace.to_dict() — serialize all node configs to a list of dicts (YAML/JSON-ready).
  • Namespace.from_dict(entries) — build a namespace from serialized node configs, resolving grefs.

Changed

  • Flat Namespace — removed hierarchical branches. Namespace is now a flat dict[str, NamespaceNode] keyed by full nsref. Dot-access matches by leaf name only.
  • NsNodeConfig always present — every NamespaceNode has a config: NsNodeConfig (auto-created if not provided). nsref and tags are now properties delegating to config.
  • NsCacheConfig — structured config for cached callables, replaces ad-hoc metadata["cache"] dict.
  • Type discriminatorNsNodeConfig.type field ("auto", "cache") for Pydantic deserialization to the right subclass.
  • Triggers on nodesTriggerConfig is now a list on NsNodeConfig.triggers (zero or many per node). Removed Namespace.register_trigger(), TriggerDef.
  • TriggerConfig.payload — optional default payload for triggers. fire(payload=None) uses config default; explicit payload overrides.
  • engine.pyStorageConfig (cache_db, dag_db, trigger_db, log_file) and EngineConfig (storage + namespace entries).

Fixes

  • GRef accepts both str and GlobalRef in Pydantic models.
  • TriggerManager.fire() handles non-DAG callables (wraps result in synthetic DagRunResult).
  • CLI help handles string annotations from from __future__ import annotations.

Removed

  • namespace_config.py — deleted along with tests and reference page. Replaced by NsNodeConfig + Namespace.to_dict()/from_dict().
  • Namespace branches_branches, _get_or_create_branch, _get_branch removed.

Documentation

  • Rewritten README and index page with data-flow framing.
  • Added lyth quickstart tutorial.
  • Added make docs to default make target.