refactor(schedule): extract execution/ + runners in layered refactor (stage 4)

- Move worker.py -> execution/worker.py, executor.py -> execution/executor.py
  (byte-identical copies; import sites updated)
- Merge old execution.py + notebook_runner.py into
  execution/runners/notebook.py: subprocess CLI (main/emit_outputs) plus the
  in-process helpers (_execute_notebook/_execute_python/execute_artifact)
- schedule/notebook_runner.py becomes a compatibility shim so
  `python -m schedule.notebook_runner` (the worker's stable -m string) still works
- Delete flat execution.py (shadowed by the new execution/ package)
- Zero behavior change; schedule/pyproject.toml untouched

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
tao.chen
2026-08-21 14:33:43 +08:00
co-authored by Claude
parent 5501b26628
commit c45a7a50a1
9 changed files with 679 additions and 101 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ def _make_executor() -> tuple[SimpleNamespace, MagicMock, MagicMock]:
construction time; it must be returned untouched by ``_store_for`` for
the global version bucket.
"""
from schedule.worker import NodeExecutor
from schedule.execution.worker import NodeExecutor
default_store = MagicMock(name="default_store")
storage_client = MagicMock(name="storage_client")