sway(integrations): stub dlm autogen (full impl lands in P8)
- SHA
ceff0eaf8d9542c1d6f4739d185e4d2c9c0f00ab- Parents
-
a108cb8 - Tree
98864de
ceff0ea
ceff0eaf8d9542c1d6f4739d185e4d2c9c0f00aba108cb8
98864de| Status | File | + | - |
|---|---|---|---|
| A |
src/dlm_sway/integrations/dlm/autogen.py
|
27 | 0 |
src/dlm_sway/integrations/dlm/autogen.pyadded@@ -0,0 +1,27 @@ | ||
| 1 | +"""Auto-generate a ``sway.yaml`` from a ``.dlm`` document. | |
| 2 | + | |
| 3 | +Populated by P8 (the .dlm bridge). This module is imported lazily by | |
| 4 | +``dlm-sway autogen`` so its presence doesn't fail the HF-only path. The | |
| 5 | +real implementation maps :mod:`dlm.doc.sections` to sway's | |
| 6 | +:class:`~dlm_sway.core.sections.Section` and emits a spec with every | |
| 7 | +shipped primitive wired up. | |
| 8 | +""" | |
| 9 | + | |
| 10 | +from __future__ import annotations | |
| 11 | + | |
| 12 | +from pathlib import Path | |
| 13 | + | |
| 14 | +from dlm_sway.core.errors import SwayError | |
| 15 | + | |
| 16 | + | |
| 17 | +def write_sway_yaml(dlm_path: Path, out: Path) -> None: | |
| 18 | + """Write a generated sway.yaml to ``out`` based on the .dlm at ``dlm_path``. | |
| 19 | + | |
| 20 | + Not yet implemented — the .dlm bridge lands in a later milestone. | |
| 21 | + """ | |
| 22 | + del dlm_path, out | |
| 23 | + raise SwayError( | |
| 24 | + "dlm-sway autogen is not yet implemented — the .dlm bridge is " | |
| 25 | + "scheduled for the next milestone. Track progress at " | |
| 26 | + "https://github.com/tenseleyFlow/DocumentLanguageModel" | |
| 27 | + ) | |