Coverage for src/romfarmer/planner/lowering/__init__.py: 100%

2 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-09-05 02:19 -0700

1"""romfarmer.planner.lowering — platform-specific action-DAG lowering rules. 

2 

3Each lowering rule translates a ``GameUnit`` + ``FormatChain`` into a typed 

4``UnitPlan`` (the action DAG for one game). 

5 

6The lowering layer is the structural replacement for the eight 

7``_*_stages()`` factory functions in ``stages/builder.py``. Unlike those 

8functions, lowering rules are **pure**: they produce data (``Action`` 

9objects), they never invoke tools or touch the filesystem. 

10 

11Public API: 

12 FormatChain — ordered tuple of format-step names, e.g. ``("chd",)`` 

13 LoweringRule — protocol: ``lower(unit, chain, manifest) -> UnitPlan`` 

14 lower — dispatch: pick the right rule for a resolved config 

15""" 

16 

17from .base import FormatChain, LoweringRule, lower 

18 

19__all__ = ["FormatChain", "LoweringRule", "lower"]