MCPcopy Index your code
hub / github.com/github/spec-kit / from_yaml

Method from_yaml

src/specify_cli/workflows/engine.py:79–86  ·  view source on GitHub ↗

Load a workflow definition from a YAML file.

(cls, path: Path)

Source from the content-addressed store, hash-verified

77
78 @classmethod
79 def from_yaml(cls, path: Path) -> WorkflowDefinition:
80 """Load a workflow definition from a YAML file."""
81 with open(path, encoding="utf-8") as f:
82 data = yaml.safe_load(f)
83 if not isinstance(data, dict):
84 msg = f"Workflow YAML must be a mapping, got {type(data).__name__}."
85 raise ValueError(msg)
86 return cls(data, source_path=path)
87
88 @classmethod
89 def from_string(cls, content: str) -> WorkflowDefinition:

Callers 6

initFunction · 0.80
load_workflowMethod · 0.80
resumeMethod · 0.80
workflow_addFunction · 0.80
test_from_yamlMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_from_yamlMethod · 0.64