simplest categorical addition
This commit is contained in:
@@ -5,6 +5,7 @@ from .catalog import (
|
||||
)
|
||||
from .factory import create_workflow_artifact_from_plan
|
||||
from .models import (
|
||||
ArtifactKind,
|
||||
AvailableCapability,
|
||||
AvailableSource,
|
||||
DependencyDiagnostic,
|
||||
@@ -19,6 +20,7 @@ from .validation import validate_deployment_dependencies
|
||||
|
||||
__all__ = [
|
||||
"AvailableCapability",
|
||||
"ArtifactKind",
|
||||
"AvailableSource",
|
||||
"DependencyDiagnostic",
|
||||
"DiagnosticSeverity",
|
||||
|
||||
@@ -4,7 +4,7 @@ from collections.abc import Mapping
|
||||
|
||||
from wf_core import Workflow
|
||||
|
||||
from .models import JsonObject, RequiredCapability, WorkflowArtifact
|
||||
from .models import ArtifactKind, JsonObject, RequiredCapability, WorkflowArtifact
|
||||
|
||||
|
||||
def create_workflow_artifact_from_plan(
|
||||
@@ -14,6 +14,7 @@ def create_workflow_artifact_from_plan(
|
||||
title: str,
|
||||
plan: JsonObject,
|
||||
outcomes: tuple[str, ...],
|
||||
kind: ArtifactKind = "workflow",
|
||||
description: str | None = None,
|
||||
required_capabilities: Mapping[str, RequiredCapability] | None = None,
|
||||
created_from_catalog_version: str | None = None,
|
||||
@@ -24,6 +25,7 @@ def create_workflow_artifact_from_plan(
|
||||
id=artifact_id,
|
||||
version=version,
|
||||
title=title,
|
||||
kind=kind,
|
||||
description=description,
|
||||
input_schema=_required_object_field(plan, "input_schema"),
|
||||
output_schema=_required_object_field(plan, "output_schema"),
|
||||
|
||||
@@ -6,6 +6,7 @@ from typing import Any, Literal
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
JsonObject = dict[str, Any]
|
||||
ArtifactKind = Literal["workflow", "wrapper"]
|
||||
|
||||
|
||||
class DriftPolicy(StrEnum):
|
||||
@@ -71,6 +72,7 @@ class WorkflowArtifact(BaseModel):
|
||||
id: str
|
||||
version: int = Field(ge=1)
|
||||
title: str
|
||||
kind: ArtifactKind = "workflow"
|
||||
description: str | None = None
|
||||
input_schema: JsonObject
|
||||
output_schema: JsonObject
|
||||
|
||||
Reference in New Issue
Block a user