瀏覽代碼

fix: exports

Sam Jaffe 5 月之前
父節點
當前提交
9015450610
共有 2 個文件被更改,包括 8 次插入2 次删除
  1. 3 1
      src/cipy/__init__.py
  2. 5 1
      src/cipy/workflow.py

+ 3 - 1
src/cipy/__init__.py

@@ -9,13 +9,15 @@ import pydantic
 from cipy.action import Composite, NodeScript, Script
 from cipy.action import Composite, NodeScript, Script
 from cipy.common import Context, Factory, Inputs, Outputs, Ref, Status
 from cipy.common import Context, Factory, Inputs, Outputs, Ref, Status
 from cipy.shell import Shell
 from cipy.shell import Shell
-from cipy.workflow import Job, Workflow
+from cipy.workflow import Job, Matrix, MatrixParams, Workflow
 
 
 __all__ = [
 __all__ = [
     "Composite",
     "Composite",
     "Context",
     "Context",
     "Inputs",
     "Inputs",
     "Job",
     "Job",
+    "Matrix",
+    "MatrixParams",
     "NodeScript",
     "NodeScript",
     "Outputs",
     "Outputs",
     "Script",
     "Script",

+ 5 - 1
src/cipy/workflow.py

@@ -70,11 +70,15 @@ class Workflow(Action):
         return status
         return status
 
 
 
 
+type MatrixParams = dict[str, list[Scalar | Ref]] | list[dict[str, Scalar | Ref]]
+
+
 class Matrix(Action):
 class Matrix(Action):
     """
     """
     Actions that represent running a single Workflow/Action across multiple configurations
     Actions that represent running a single Workflow/Action across multiple configurations
     """
     """
-    matrix: dict[str, list[Scalar | Ref]] | list[dict[str, Scalar | Ref]]
+    name: str = ""
+    matrix: MatrixParams
     uses: Action
     uses: Action
     fail_fast: bool = True
     fail_fast: bool = True