|
@@ -1,4 +1,5 @@
|
|
|
"""Module containing basic Action definitions, which perform linear operations"""
|
|
"""Module containing basic Action definitions, which perform linear operations"""
|
|
|
|
|
+
|
|
|
import pathlib
|
|
import pathlib
|
|
|
import shutil
|
|
import shutil
|
|
|
import subprocess
|
|
import subprocess
|
|
@@ -15,6 +16,7 @@ from cipy.common import Action, Context, Outputs, Status, _validate
|
|
|
|
|
|
|
|
class Shell(StrEnum):
|
|
class Shell(StrEnum):
|
|
|
"""Enumeration of shells that this tool knows how to run natively"""
|
|
"""Enumeration of shells that this tool knows how to run natively"""
|
|
|
|
|
+
|
|
|
SH = auto()
|
|
SH = auto()
|
|
|
BASH = auto()
|
|
BASH = auto()
|
|
|
PYTHON = auto()
|
|
PYTHON = auto()
|
|
@@ -25,6 +27,7 @@ class NodeScript(Action):
|
|
|
A special script that is run as a node.js file, with optional post-script
|
|
A special script that is run as a node.js file, with optional post-script
|
|
|
for cleaning up the environment.
|
|
for cleaning up the environment.
|
|
|
"""
|
|
"""
|
|
|
|
|
+
|
|
|
version: str = Field(default="node24", pattern="node\\d+")
|
|
version: str = Field(default="node24", pattern="node\\d+")
|
|
|
main: pathlib.Path
|
|
main: pathlib.Path
|
|
|
post: pathlib.Path | None = None
|
|
post: pathlib.Path | None = None
|
|
@@ -50,6 +53,7 @@ class NodeScript(Action):
|
|
|
|
|
|
|
|
class Script(Action):
|
|
class Script(Action):
|
|
|
"""Action descriptor for a generic shell runner"""
|
|
"""Action descriptor for a generic shell runner"""
|
|
|
|
|
+
|
|
|
shell: Shell | None = None
|
|
shell: Shell | None = None
|
|
|
script: str
|
|
script: str
|
|
|
|
|
|
|
@@ -99,6 +103,7 @@ class Composite(Action):
|
|
|
Inputs are isolated from the individual steps by default, and Outputs are
|
|
Inputs are isolated from the individual steps by default, and Outputs are
|
|
|
synthesized from the step outputs by defining an output object.
|
|
synthesized from the step outputs by defining an output object.
|
|
|
"""
|
|
"""
|
|
|
|
|
+
|
|
|
name: str = ""
|
|
name: str = ""
|
|
|
steps: list[Action] = Field(frozen=True)
|
|
steps: list[Action] = Field(frozen=True)
|
|
|
_counter: int = PrivateAttr(default=0)
|
|
_counter: int = PrivateAttr(default=0)
|