Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
luiztauffer committed May 26, 2023
1 parent f9efaaa commit 7140964
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ REPOSITORY_LABEL = "Default Pieces Repository"

# The version of this Pieces release
# Attention: changing this will create a new release
VERSION = "0.3.6"
VERSION = "0.3.7"
22 changes: 15 additions & 7 deletions pieces/CustomPythonPiece/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,32 @@ class OutputArgsType(str, Enum):
class OutputArgsModel(BaseModel):
name: str = Field(
default=None,
description='Name of the output arg.',
description='Name of the output argument.',
from_upstream="never"
)
type: OutputArgsType = Field(
default=OutputArgsType.string,
description='Type of the output arg.',
description='Type of the output argument.',
from_upstream="never"
)


class InputArgsModel(BaseModel):
input_arg: str = Field(
default=None,
description='Input argument.',
from_upstream="always"
)


class InputModel(BaseModel):
"""
CustomPythonPiece Input Model
"""
input_args: list = Field(
default=[],
description='Input args.',
from_upstream="always"
input_args: List[InputArgsModel] = Field(
default=[InputArgsModel(input_arg="")],
description='Input arguments.',
from_upstream="never"
)
script: str = Field(
default="""# Do not modify the function definition line
Expand All @@ -58,7 +66,7 @@ def custom_function(input_args: list):
OutputArgsModel(name="output_arg_1", type=OutputArgsType.string),
OutputArgsModel(name="output_arg_2", type=OutputArgsType.integer),
],
description='Output args.',
description='Output arguments.',
from_upstream="never"
)

Expand Down

0 comments on commit 7140964

Please sign in to comment.