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

Method from_string

src/specify_cli/workflows/engine.py:89–95  ·  view source on GitHub ↗

Load a workflow definition from a YAML string.

(cls, content: str)

Source from the content-addressed store, hash-verified

87
88 @classmethod
89 def from_string(cls, content: str) -> WorkflowDefinition:
90 """Load a workflow definition from a YAML string."""
91 data = yaml.safe_load(content)
92 if not isinstance(data, dict):
93 msg = f"Workflow YAML must be a mapping, got {type(data).__name__}."
94 raise ValueError(msg)
95 return cls(data)
96
97
98# -- Workflow Validation --------------------------------------------------

Callers 15

_errorsMethod · 0.80
test_from_stringMethod · 0.80
test_inputs_parsedMethod · 0.80
test_valid_workflowMethod · 0.80
test_missing_idMethod · 0.80
test_no_stepsMethod · 0.80

Calls

no outgoing calls

Tested by 15

_errorsMethod · 0.64
test_from_stringMethod · 0.64
test_inputs_parsedMethod · 0.64
test_valid_workflowMethod · 0.64
test_missing_idMethod · 0.64
test_no_stepsMethod · 0.64