diff --git a/queenbee/schema/arguments.py b/queenbee/schema/arguments.py index 9b48ac32..a0ceaa47 100644 --- a/queenbee/schema/arguments.py +++ b/queenbee/schema/arguments.py @@ -191,9 +191,6 @@ class Arguments(BaseModel): Queenbee accepts two types of arguments: parameters and artifacts. A ``parameter`` is a variable that can be passed to a task or a workflow. An ``artifact`` is a file or folder that can be identified by a url or a path. - - There is a third field for ``user_data`` which can be used to assign arbitrary values - to a workflow. """ parameters: List[Parameter] = Field( @@ -209,12 +206,6 @@ class Arguments(BaseModel): 'task or workflow.' ) - user_data: Dict = Field( - None, - description='Optional user data as a dictionary. User data is for user reference' - ' only and will not be used in the execution of the workflow.' - ) - @root_validator def unique_names(cls, values): params = values.get('parameters') @@ -293,3 +284,16 @@ def referenced_values(self): ] return ref_values + + +class WorkflowArguments(Arguments): + """A workflow arguments object. + + The difference between the workflow argument and a standard argument is the extra + field for user_data. + """ + user_data: Dict = Field( + None, + description='Optional user data as a dictionary. User data is for user reference' + ' only and will not be used in the execution of the workflow.' + ) diff --git a/queenbee/schema/workflow.py b/queenbee/schema/workflow.py index 957666c7..edc0f541 100644 --- a/queenbee/schema/workflow.py +++ b/queenbee/schema/workflow.py @@ -11,7 +11,7 @@ from typing import List, Union from queenbee.schema.qutil import BaseModel from queenbee.schema.dag import DAG -from queenbee.schema.arguments import Arguments +from queenbee.schema.arguments import Arguments, WorkflowArguments from queenbee.schema.operator import Operator from queenbee.schema.function import Function from queenbee.schema.artifact_location import RunFolderLocation, InputFolderLocation, \ @@ -36,7 +36,7 @@ class Workflow(BaseModel): description='Workflow metadata information.' ) - inputs: Arguments = Field( + inputs: WorkflowArguments = Field( None, description='Workflow input arguments.' )