Skip to content

Workflow definition cli and api - #18

Merged
kriben merged 4 commits into
mainfrom
workflow-definition-cli-and-api
Oct 23, 2026
Merged

kriben merged 4 commits into
mainfrom
workflow-definition-cli-and-api

Conversation

@kriben

@kriben kriben commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Fixes #14.

Move generic workflow-definition logic from ResInsight's taskmaestro helper
into taskmaestro so editors can use public API instead of private internals:

- definition: convert workflow.yaml/input.yaml to and from an editable graph
  definition, from registered workflows, with atomic writes, backups and a
  value filter for saved inputs
- introspection: describe workflows and task schemas, with a schema
  generator hook for extra type annotations; the CLI now uses it
- discovery.load_registry: load all entry points, reporting broken ones
- yaml_config: public yaml_load, load_workflow_only, resolve_task and
  workflow_imports
- DefinitionError exception

Bump version to 0.4.0.
Accept a registered workflow name wherever a workflow YAML path is
accepted (run, validate, graph, workflow describe), add 'workflow list',
and report the workflow 'source' in 'workflow describe' output.

New public API: load_registered_workflow, load_input_configuration,
registered_workflow, describe_registered_workflow and
WorkflowLookupError, whose message lists the registered workflows.

Closes #14
pydantic 2.14 also stores a module-level parametrized model such as
ObjectModel[str] in the caller's globals under its bracketed name, so the
alias lookup could return 'ObjectModel[str]' instead of the alias.
error_payload calls ValidationError.errors(include_input=False), which
pydantic added in 2.4. The test suite fails on 2.0-2.3 and passes on
2.4 and later.
@kriben
kriben merged commit dcde178 into main Oct 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: support workflows registered via the taskmaestro.workflows entry point

1 participant