(d: dict)
| 220 | |
| 221 | @staticmethod |
| 222 | def from_dict(d: dict) -> "WorkflowIR": |
| 223 | return WorkflowIR( |
| 224 | name=d["name"], goal=d["goal"], |
| 225 | parameters=[TypedVar.from_dict(p) for p in d["parameters"]], |
| 226 | nodes=[NodeIR.from_dict(n) for n in d["nodes"]], |
| 227 | edges=[EdgeIR.from_dict(e) for e in d["edges"]], |
| 228 | entry=d["entry"], exits=d["exits"], |
| 229 | submodule_map={k: SubmoduleRef.from_dict(v) for k, v in d["submodule_map"].items()} |
| 230 | if d.get("submodule_map") else None, |
| 231 | ) |
| 232 | |
| 233 | def save_json(self, path: str, indent: int = 2) -> None: |
| 234 | with open(path, "w", encoding="utf-8") as f: |
nothing calls this directly
no test coverage detected