tracdap-runtime 0.6.5__py3-none-any.whl → 0.7.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tracdap/rt/__init__.py +6 -5
- tracdap/rt/_exec/actors.py +6 -5
- tracdap/rt/_exec/context.py +278 -110
- tracdap/rt/_exec/dev_mode.py +237 -143
- tracdap/rt/_exec/engine.py +223 -64
- tracdap/rt/_exec/functions.py +31 -6
- tracdap/rt/_exec/graph.py +15 -5
- tracdap/rt/_exec/graph_builder.py +301 -203
- tracdap/rt/_exec/runtime.py +13 -10
- tracdap/rt/_exec/server.py +6 -5
- tracdap/rt/_impl/__init__.py +6 -5
- tracdap/rt/_impl/config_parser.py +17 -9
- tracdap/rt/_impl/data.py +284 -172
- tracdap/rt/_impl/ext/__init__.py +14 -0
- tracdap/rt/_impl/ext/sql.py +117 -0
- tracdap/rt/_impl/ext/storage.py +58 -0
- tracdap/rt/_impl/grpc/__init__.py +6 -5
- tracdap/rt/_impl/grpc/codec.py +6 -5
- tracdap/rt/_impl/grpc/tracdap/metadata/job_pb2.py +62 -54
- tracdap/rt/_impl/grpc/tracdap/metadata/job_pb2.pyi +37 -2
- tracdap/rt/_impl/guard_rails.py +6 -5
- tracdap/rt/_impl/models.py +6 -5
- tracdap/rt/_impl/repos.py +6 -5
- tracdap/rt/_impl/schemas.py +6 -5
- tracdap/rt/_impl/shim.py +6 -5
- tracdap/rt/_impl/static_api.py +30 -16
- tracdap/rt/_impl/storage.py +8 -7
- tracdap/rt/_impl/type_system.py +6 -5
- tracdap/rt/_impl/util.py +16 -5
- tracdap/rt/_impl/validation.py +72 -18
- tracdap/rt/_plugins/__init__.py +6 -5
- tracdap/rt/_plugins/_helpers.py +6 -5
- tracdap/rt/_plugins/config_local.py +6 -5
- tracdap/rt/_plugins/format_arrow.py +6 -5
- tracdap/rt/_plugins/format_csv.py +6 -5
- tracdap/rt/_plugins/format_parquet.py +6 -5
- tracdap/rt/_plugins/repo_git.py +6 -5
- tracdap/rt/_plugins/repo_local.py +6 -5
- tracdap/rt/_plugins/repo_pypi.py +6 -5
- tracdap/rt/_plugins/storage_aws.py +6 -5
- tracdap/rt/_plugins/storage_azure.py +6 -5
- tracdap/rt/_plugins/storage_gcp.py +6 -5
- tracdap/rt/_plugins/storage_local.py +6 -5
- tracdap/rt/_plugins/storage_sql.py +418 -0
- tracdap/rt/_plugins/storage_sql_dialects.py +118 -0
- tracdap/rt/_version.py +7 -6
- tracdap/rt/api/__init__.py +23 -5
- tracdap/rt/api/experimental.py +85 -37
- tracdap/rt/api/hook.py +16 -5
- tracdap/rt/api/model_api.py +110 -90
- tracdap/rt/api/static_api.py +142 -100
- tracdap/rt/config/common.py +26 -27
- tracdap/rt/config/job.py +5 -6
- tracdap/rt/config/platform.py +41 -42
- tracdap/rt/config/result.py +5 -6
- tracdap/rt/config/runtime.py +6 -7
- tracdap/rt/exceptions.py +13 -7
- tracdap/rt/ext/__init__.py +6 -5
- tracdap/rt/ext/config.py +6 -5
- tracdap/rt/ext/embed.py +6 -5
- tracdap/rt/ext/plugins.py +6 -5
- tracdap/rt/ext/repos.py +6 -5
- tracdap/rt/ext/storage.py +6 -5
- tracdap/rt/launch/__init__.py +10 -5
- tracdap/rt/launch/__main__.py +6 -5
- tracdap/rt/launch/cli.py +6 -5
- tracdap/rt/launch/launch.py +38 -15
- tracdap/rt/metadata/__init__.py +4 -0
- tracdap/rt/metadata/common.py +2 -3
- tracdap/rt/metadata/custom.py +3 -4
- tracdap/rt/metadata/data.py +30 -31
- tracdap/rt/metadata/file.py +6 -7
- tracdap/rt/metadata/flow.py +22 -23
- tracdap/rt/metadata/job.py +89 -45
- tracdap/rt/metadata/model.py +26 -27
- tracdap/rt/metadata/object.py +11 -12
- tracdap/rt/metadata/object_id.py +23 -24
- tracdap/rt/metadata/resource.py +0 -1
- tracdap/rt/metadata/search.py +15 -16
- tracdap/rt/metadata/stoarge.py +22 -23
- tracdap/rt/metadata/tag.py +8 -9
- tracdap/rt/metadata/tag_update.py +11 -12
- tracdap/rt/metadata/type.py +38 -38
- {tracdap_runtime-0.6.5.dist-info → tracdap_runtime-0.7.0rc1.dist-info}/LICENSE +1 -1
- {tracdap_runtime-0.6.5.dist-info → tracdap_runtime-0.7.0rc1.dist-info}/METADATA +4 -2
- tracdap_runtime-0.7.0rc1.dist-info/RECORD +121 -0
- {tracdap_runtime-0.6.5.dist-info → tracdap_runtime-0.7.0rc1.dist-info}/WHEEL +1 -1
- tracdap_runtime-0.6.5.dist-info/RECORD +0 -116
- {tracdap_runtime-0.6.5.dist-info → tracdap_runtime-0.7.0rc1.dist-info}/top_level.txt +0 -0
tracdap/rt/metadata/data.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# Code generated by TRAC
|
2
2
|
|
3
|
-
from __future__ import annotations
|
4
3
|
import typing as _tp # noqa
|
5
4
|
import dataclasses as _dc # noqa
|
6
5
|
import enum as _enum # noqa
|
@@ -17,7 +16,7 @@ class SchemaType(_enum.Enum):
|
|
17
16
|
Currently only table schemas are supported, other schema types may be added later.
|
18
17
|
|
19
18
|
.. seealso::
|
20
|
-
:
|
19
|
+
:py:obj:`SchemaDefinition <SchemaDefinition>`
|
21
20
|
"""
|
22
21
|
|
23
22
|
SCHEMA_TYPE_NOT_SET = 0
|
@@ -51,26 +50,26 @@ class FieldSchema:
|
|
51
50
|
Schema for an individual field in a tabular dataset
|
52
51
|
|
53
52
|
.. seealso::
|
54
|
-
:
|
53
|
+
:py:obj:`TableSchema <TableSchema>`
|
55
54
|
"""
|
56
55
|
|
57
|
-
fieldName: str = ""
|
56
|
+
fieldName: "str" = ""
|
58
57
|
|
59
|
-
fieldOrder: int = 0
|
58
|
+
fieldOrder: "int" = 0
|
60
59
|
|
61
|
-
fieldType: BasicType = BasicType.BASIC_TYPE_NOT_SET
|
60
|
+
fieldType: "BasicType" = BasicType.BASIC_TYPE_NOT_SET
|
62
61
|
|
63
|
-
label: str = ""
|
62
|
+
label: "str" = ""
|
64
63
|
|
65
|
-
businessKey: bool = False
|
64
|
+
businessKey: "bool" = False
|
66
65
|
|
67
|
-
categorical: bool = False
|
66
|
+
categorical: "bool" = False
|
68
67
|
|
69
|
-
notNull: _tp.Optional[bool] = None
|
68
|
+
notNull: "_tp.Optional[bool]" = None
|
70
69
|
|
71
70
|
"""This could become mandatory with the next metadata update"""
|
72
71
|
|
73
|
-
formatCode: _tp.Optional[str] = None
|
72
|
+
formatCode: "_tp.Optional[str]" = None
|
74
73
|
|
75
74
|
|
76
75
|
@_dc.dataclass
|
@@ -78,7 +77,7 @@ class TableSchema:
|
|
78
77
|
|
79
78
|
"""Schema for a tabular dataset"""
|
80
79
|
|
81
|
-
fields: _tp.List[FieldSchema] = _dc.field(default_factory=list)
|
80
|
+
fields: "_tp.List[FieldSchema]" = _dc.field(default_factory=list)
|
82
81
|
|
83
82
|
|
84
83
|
@_dc.dataclass
|
@@ -95,14 +94,14 @@ class SchemaDefinition:
|
|
95
94
|
be added later, e.g. for matrices, tensors, curves, surfaces and structured datasets.
|
96
95
|
|
97
96
|
.. seealso::
|
98
|
-
:
|
97
|
+
:py:obj:`DataDefinition <DataDefinition>`
|
99
98
|
"""
|
100
99
|
|
101
|
-
schemaType: SchemaType = SchemaType.SCHEMA_TYPE_NOT_SET
|
100
|
+
schemaType: "SchemaType" = SchemaType.SCHEMA_TYPE_NOT_SET
|
102
101
|
|
103
|
-
partType: PartType = PartType.PART_ROOT
|
102
|
+
partType: "PartType" = PartType.PART_ROOT
|
104
103
|
|
105
|
-
table: _tp.Optional[TableSchema] = None
|
104
|
+
table: "_tp.Optional[TableSchema]" = None
|
106
105
|
|
107
106
|
|
108
107
|
@_dc.dataclass
|
@@ -110,15 +109,15 @@ class PartKey:
|
|
110
109
|
|
111
110
|
"""Partition key for tabular datasets"""
|
112
111
|
|
113
|
-
opaqueKey: str = ""
|
112
|
+
opaqueKey: "str" = ""
|
114
113
|
|
115
|
-
partType: PartType = PartType.PART_ROOT
|
114
|
+
partType: "PartType" = PartType.PART_ROOT
|
116
115
|
|
117
|
-
partValues: _tp.List[Value] = _dc.field(default_factory=list)
|
116
|
+
partValues: "_tp.List[Value]" = _dc.field(default_factory=list)
|
118
117
|
|
119
|
-
partRangeMin: _tp.Optional[Value] = None
|
118
|
+
partRangeMin: "_tp.Optional[Value]" = None
|
120
119
|
|
121
|
-
partRangeMax: _tp.Optional[Value] = None
|
120
|
+
partRangeMax: "_tp.Optional[Value]" = None
|
122
121
|
|
123
122
|
|
124
123
|
@_dc.dataclass
|
@@ -129,28 +128,28 @@ class DataDefinition:
|
|
129
128
|
@_dc.dataclass
|
130
129
|
class Delta:
|
131
130
|
|
132
|
-
deltaIndex: int = 0
|
131
|
+
deltaIndex: "int" = 0
|
133
132
|
|
134
|
-
dataItem: str = ""
|
133
|
+
dataItem: "str" = ""
|
135
134
|
|
136
135
|
@_dc.dataclass
|
137
136
|
class Snap:
|
138
137
|
|
139
|
-
snapIndex: int = 0
|
138
|
+
snapIndex: "int" = 0
|
140
139
|
|
141
|
-
deltas: _tp.List[DataDefinition.Delta] = _dc.field(default_factory=list)
|
140
|
+
deltas: "_tp.List[DataDefinition.Delta]" = _dc.field(default_factory=list)
|
142
141
|
|
143
142
|
@_dc.dataclass
|
144
143
|
class Part:
|
145
144
|
|
146
|
-
partKey: PartKey = _dc.field(default_factory=lambda: PartKey())
|
145
|
+
partKey: "PartKey" = _dc.field(default_factory=lambda: PartKey())
|
147
146
|
|
148
|
-
snap: DataDefinition.Snap = _dc.field(default_factory=lambda: DataDefinition.Snap())
|
147
|
+
snap: "DataDefinition.Snap" = _dc.field(default_factory=lambda: DataDefinition.Snap())
|
149
148
|
|
150
|
-
schemaId: _tp.Optional[TagSelector] = None
|
149
|
+
schemaId: "_tp.Optional[TagSelector]" = None
|
151
150
|
|
152
|
-
schema: _tp.Optional[SchemaDefinition] = None
|
151
|
+
schema: "_tp.Optional[SchemaDefinition]" = None
|
153
152
|
|
154
|
-
parts: _tp.Dict[str, DataDefinition.Part] = _dc.field(default_factory=dict)
|
153
|
+
parts: "_tp.Dict[str, DataDefinition.Part]" = _dc.field(default_factory=dict)
|
155
154
|
|
156
|
-
storageId: TagSelector = _dc.field(default_factory=lambda: TagSelector())
|
155
|
+
storageId: "TagSelector" = _dc.field(default_factory=lambda: TagSelector())
|
tracdap/rt/metadata/file.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# Code generated by TRAC
|
2
2
|
|
3
|
-
from __future__ import annotations
|
4
3
|
import typing as _tp # noqa
|
5
4
|
import dataclasses as _dc # noqa
|
6
5
|
import enum as _enum # noqa
|
@@ -14,14 +13,14 @@ class FileDefinition:
|
|
14
13
|
|
15
14
|
"""Describes a file object stored in the TRAC platform"""
|
16
15
|
|
17
|
-
name: str = ""
|
16
|
+
name: "str" = ""
|
18
17
|
|
19
|
-
extension: str = ""
|
18
|
+
extension: "str" = ""
|
20
19
|
|
21
|
-
mimeType: str = ""
|
20
|
+
mimeType: "str" = ""
|
22
21
|
|
23
|
-
size: int = 0
|
22
|
+
size: "int" = 0
|
24
23
|
|
25
|
-
storageId: TagSelector = _dc.field(default_factory=lambda: TagSelector())
|
24
|
+
storageId: "TagSelector" = _dc.field(default_factory=lambda: TagSelector())
|
26
25
|
|
27
|
-
dataItem: str = ""
|
26
|
+
dataItem: "str" = ""
|
tracdap/rt/metadata/flow.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# Code generated by TRAC
|
2
2
|
|
3
|
-
from __future__ import annotations
|
4
3
|
import typing as _tp # noqa
|
5
4
|
import dataclasses as _dc # noqa
|
6
5
|
import enum as _enum # noqa
|
@@ -17,7 +16,7 @@ class FlowNodeType(_enum.Enum):
|
|
17
16
|
Specify the type of an individual flow node
|
18
17
|
|
19
18
|
.. seealso::
|
20
|
-
:
|
19
|
+
:py:obj:`FlowNode <FlowNode>`
|
21
20
|
"""
|
22
21
|
|
23
22
|
NODE_TYPE_NOT_SET = 0
|
@@ -48,24 +47,24 @@ class FlowNode:
|
|
48
47
|
Describes an individual node in a flow
|
49
48
|
|
50
49
|
.. seealso::
|
51
|
-
:
|
50
|
+
:py:obj:`FlowDefinition <FlowDefinition>`
|
52
51
|
"""
|
53
52
|
|
54
|
-
nodeType: FlowNodeType = FlowNodeType.NODE_TYPE_NOT_SET
|
53
|
+
nodeType: "FlowNodeType" = FlowNodeType.NODE_TYPE_NOT_SET
|
55
54
|
|
56
|
-
parameters: _tp.List[str] = _dc.field(default_factory=list)
|
55
|
+
parameters: "_tp.List[str]" = _dc.field(default_factory=list)
|
57
56
|
|
58
|
-
inputs: _tp.List[str] = _dc.field(default_factory=list)
|
57
|
+
inputs: "_tp.List[str]" = _dc.field(default_factory=list)
|
59
58
|
|
60
|
-
outputs: _tp.List[str] = _dc.field(default_factory=list)
|
59
|
+
outputs: "_tp.List[str]" = _dc.field(default_factory=list)
|
61
60
|
|
62
|
-
nodeSearch: SearchExpression = _dc.field(default_factory=lambda: SearchExpression())
|
61
|
+
nodeSearch: "SearchExpression" = _dc.field(default_factory=lambda: SearchExpression())
|
63
62
|
|
64
|
-
nodeAttrs: _tp.List[TagUpdate] = _dc.field(default_factory=list)
|
63
|
+
nodeAttrs: "_tp.List[TagUpdate]" = _dc.field(default_factory=list)
|
65
64
|
|
66
|
-
nodeProps: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
65
|
+
nodeProps: "_tp.Dict[str, Value]" = _dc.field(default_factory=dict)
|
67
66
|
|
68
|
-
label: str = ""
|
67
|
+
label: "str" = ""
|
69
68
|
|
70
69
|
|
71
70
|
@_dc.dataclass
|
@@ -82,12 +81,12 @@ class FlowSocket:
|
|
82
81
|
model_input_socket = { "node": "my_model", "socket": "input_1" }.
|
83
82
|
|
84
83
|
.. seealso::
|
85
|
-
:
|
84
|
+
:py:obj:`FlowEdge <FlowEdge>`
|
86
85
|
"""
|
87
86
|
|
88
|
-
node: str = ""
|
87
|
+
node: "str" = ""
|
89
88
|
|
90
|
-
socket: str = ""
|
89
|
+
socket: "str" = ""
|
91
90
|
|
92
91
|
|
93
92
|
@_dc.dataclass
|
@@ -97,12 +96,12 @@ class FlowEdge:
|
|
97
96
|
A connection between two nodes in a flow
|
98
97
|
|
99
98
|
.. seealso::
|
100
|
-
:
|
99
|
+
:py:obj:`FlowSocket <FlowSocket>`
|
101
100
|
"""
|
102
101
|
|
103
|
-
source: FlowSocket = _dc.field(default_factory=lambda: FlowSocket())
|
102
|
+
source: "FlowSocket" = _dc.field(default_factory=lambda: FlowSocket())
|
104
103
|
|
105
|
-
target: FlowSocket = _dc.field(default_factory=lambda: FlowSocket())
|
104
|
+
target: "FlowSocket" = _dc.field(default_factory=lambda: FlowSocket())
|
106
105
|
|
107
106
|
|
108
107
|
@_dc.dataclass
|
@@ -116,15 +115,15 @@ class FlowDefinition:
|
|
116
115
|
matches the flow with a set of models, inputs, outputs and parameters.
|
117
116
|
|
118
117
|
.. seealso::
|
119
|
-
:
|
118
|
+
:py:obj:`JobDefinition <JobDefinition>`
|
120
119
|
"""
|
121
120
|
|
122
|
-
nodes: _tp.Dict[str, FlowNode] = _dc.field(default_factory=dict)
|
121
|
+
nodes: "_tp.Dict[str, FlowNode]" = _dc.field(default_factory=dict)
|
123
122
|
|
124
|
-
edges: _tp.List[FlowEdge] = _dc.field(default_factory=list)
|
123
|
+
edges: "_tp.List[FlowEdge]" = _dc.field(default_factory=list)
|
125
124
|
|
126
|
-
parameters: _tp.Dict[str, ModelParameter] = _dc.field(default_factory=dict)
|
125
|
+
parameters: "_tp.Dict[str, ModelParameter]" = _dc.field(default_factory=dict)
|
127
126
|
|
128
|
-
inputs: _tp.Dict[str, ModelInputSchema] = _dc.field(default_factory=dict)
|
127
|
+
inputs: "_tp.Dict[str, ModelInputSchema]" = _dc.field(default_factory=dict)
|
129
128
|
|
130
|
-
outputs: _tp.Dict[str, ModelOutputSchema] = _dc.field(default_factory=dict)
|
129
|
+
outputs: "_tp.Dict[str, ModelOutputSchema]" = _dc.field(default_factory=dict)
|
tracdap/rt/metadata/job.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# Code generated by TRAC
|
2
2
|
|
3
|
-
from __future__ import annotations
|
4
3
|
import typing as _tp # noqa
|
5
4
|
import dataclasses as _dc # noqa
|
6
5
|
import enum as _enum # noqa
|
@@ -36,6 +35,10 @@ class JobType(_enum.Enum):
|
|
36
35
|
|
37
36
|
"""Export data to external locations"""
|
38
37
|
|
38
|
+
JOB_GROUP = 6
|
39
|
+
|
40
|
+
"""A job built from a collection of other jobs"""
|
41
|
+
|
39
42
|
|
40
43
|
class JobStatusCode(_enum.Enum):
|
41
44
|
|
@@ -84,22 +87,35 @@ class JobStatusCode(_enum.Enum):
|
|
84
87
|
"""The job was cancelled by a user of the platform"""
|
85
88
|
|
86
89
|
|
90
|
+
class JobGroupType(_enum.Enum):
|
91
|
+
|
92
|
+
"""Specify the group type for a JOB_GROUP job"""
|
93
|
+
|
94
|
+
JOB_GROUP_TYPE_NOT_SET = 0
|
95
|
+
|
96
|
+
SEQUENTIAL_JOB_GROUP = 1
|
97
|
+
|
98
|
+
PARALLEL_JOB_GROUP = 2
|
99
|
+
|
100
|
+
|
87
101
|
@_dc.dataclass
|
88
102
|
class JobDefinition:
|
89
103
|
|
90
104
|
"""Define a job to run on the TRAC platform"""
|
91
105
|
|
92
|
-
jobType: JobType = JobType.JOB_TYPE_NOT_SET
|
106
|
+
jobType: "JobType" = JobType.JOB_TYPE_NOT_SET
|
107
|
+
|
108
|
+
runModel: "_tp.Optional[RunModelJob]" = None
|
93
109
|
|
94
|
-
|
110
|
+
runFlow: "_tp.Optional[RunFlowJob]" = None
|
95
111
|
|
96
|
-
|
112
|
+
importModel: "_tp.Optional[ImportModelJob]" = None
|
97
113
|
|
98
|
-
|
114
|
+
importData: "_tp.Optional[ImportDataJob]" = None
|
99
115
|
|
100
|
-
|
116
|
+
exportData: "_tp.Optional[ExportDataJob]" = None
|
101
117
|
|
102
|
-
|
118
|
+
jobGroup: "_tp.Optional[JobGroup]" = None
|
103
119
|
|
104
120
|
|
105
121
|
@_dc.dataclass
|
@@ -107,17 +123,17 @@ class RunModelJob:
|
|
107
123
|
|
108
124
|
"""Specification for a RuN_MODEL job"""
|
109
125
|
|
110
|
-
model: TagSelector = _dc.field(default_factory=lambda: TagSelector())
|
126
|
+
model: "TagSelector" = _dc.field(default_factory=lambda: TagSelector())
|
111
127
|
|
112
|
-
parameters: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
128
|
+
parameters: "_tp.Dict[str, Value]" = _dc.field(default_factory=dict)
|
113
129
|
|
114
|
-
inputs: _tp.Dict[str, TagSelector] = _dc.field(default_factory=dict)
|
130
|
+
inputs: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
115
131
|
|
116
|
-
outputs: _tp.Dict[str, TagSelector] = _dc.field(default_factory=dict)
|
132
|
+
outputs: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
117
133
|
|
118
|
-
priorOutputs: _tp.Dict[str, TagSelector] = _dc.field(default_factory=dict)
|
134
|
+
priorOutputs: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
119
135
|
|
120
|
-
outputAttrs: _tp.List[TagUpdate] = _dc.field(default_factory=list)
|
136
|
+
outputAttrs: "_tp.List[TagUpdate]" = _dc.field(default_factory=list)
|
121
137
|
|
122
138
|
|
123
139
|
@_dc.dataclass
|
@@ -125,19 +141,19 @@ class RunFlowJob:
|
|
125
141
|
|
126
142
|
"""Specification for a RUN_FLOW job"""
|
127
143
|
|
128
|
-
flow: TagSelector = _dc.field(default_factory=lambda: TagSelector())
|
144
|
+
flow: "TagSelector" = _dc.field(default_factory=lambda: TagSelector())
|
129
145
|
|
130
|
-
parameters: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
146
|
+
parameters: "_tp.Dict[str, Value]" = _dc.field(default_factory=dict)
|
131
147
|
|
132
|
-
inputs: _tp.Dict[str, TagSelector] = _dc.field(default_factory=dict)
|
148
|
+
inputs: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
133
149
|
|
134
|
-
outputs: _tp.Dict[str, TagSelector] = _dc.field(default_factory=dict)
|
150
|
+
outputs: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
135
151
|
|
136
|
-
priorOutputs: _tp.Dict[str, TagSelector] = _dc.field(default_factory=dict)
|
152
|
+
priorOutputs: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
137
153
|
|
138
|
-
models: _tp.Dict[str, TagSelector] = _dc.field(default_factory=dict)
|
154
|
+
models: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
139
155
|
|
140
|
-
outputAttrs: _tp.List[TagUpdate] = _dc.field(default_factory=list)
|
156
|
+
outputAttrs: "_tp.List[TagUpdate]" = _dc.field(default_factory=list)
|
141
157
|
|
142
158
|
|
143
159
|
@_dc.dataclass
|
@@ -145,21 +161,21 @@ class ImportModelJob:
|
|
145
161
|
|
146
162
|
"""Specification for an IMPORT_MODEL job"""
|
147
163
|
|
148
|
-
language: str = ""
|
164
|
+
language: "str" = ""
|
149
165
|
|
150
|
-
repository: str = ""
|
166
|
+
repository: "str" = ""
|
151
167
|
|
152
|
-
packageGroup: _tp.Optional[str] = None
|
168
|
+
packageGroup: "_tp.Optional[str]" = None
|
153
169
|
|
154
|
-
package: str = ""
|
170
|
+
package: "str" = ""
|
155
171
|
|
156
|
-
version: str = ""
|
172
|
+
version: "str" = ""
|
157
173
|
|
158
|
-
entryPoint: str = ""
|
174
|
+
entryPoint: "str" = ""
|
159
175
|
|
160
|
-
path: str = ""
|
176
|
+
path: "str" = ""
|
161
177
|
|
162
|
-
modelAttrs: _tp.List[TagUpdate] = _dc.field(default_factory=list)
|
178
|
+
modelAttrs: "_tp.List[TagUpdate]" = _dc.field(default_factory=list)
|
163
179
|
|
164
180
|
|
165
181
|
@_dc.dataclass
|
@@ -167,23 +183,23 @@ class ImportDataJob:
|
|
167
183
|
|
168
184
|
"""Specification for an IMPORT_DATA job"""
|
169
185
|
|
170
|
-
model: TagSelector = _dc.field(default_factory=lambda: TagSelector())
|
186
|
+
model: "TagSelector" = _dc.field(default_factory=lambda: TagSelector())
|
171
187
|
|
172
|
-
parameters: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
188
|
+
parameters: "_tp.Dict[str, Value]" = _dc.field(default_factory=dict)
|
173
189
|
|
174
|
-
inputs: _tp.Dict[str, TagSelector] = _dc.field(default_factory=dict)
|
190
|
+
inputs: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
175
191
|
|
176
|
-
outputs: _tp.Dict[str, TagSelector] = _dc.field(default_factory=dict)
|
192
|
+
outputs: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
177
193
|
|
178
|
-
priorOutputs: _tp.Dict[str, TagSelector] = _dc.field(default_factory=dict)
|
194
|
+
priorOutputs: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
179
195
|
|
180
|
-
storageAccess: _tp.List[str] = _dc.field(default_factory=list)
|
196
|
+
storageAccess: "_tp.List[str]" = _dc.field(default_factory=list)
|
181
197
|
|
182
|
-
imports: _tp.Dict[str, TagSelector] = _dc.field(default_factory=dict)
|
198
|
+
imports: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
183
199
|
|
184
|
-
outputAttrs: _tp.List[TagUpdate] = _dc.field(default_factory=list)
|
200
|
+
outputAttrs: "_tp.List[TagUpdate]" = _dc.field(default_factory=list)
|
185
201
|
|
186
|
-
importAttrs: _tp.List[TagUpdate] = _dc.field(default_factory=list)
|
202
|
+
importAttrs: "_tp.List[TagUpdate]" = _dc.field(default_factory=list)
|
187
203
|
|
188
204
|
|
189
205
|
@_dc.dataclass
|
@@ -191,18 +207,46 @@ class ExportDataJob:
|
|
191
207
|
|
192
208
|
"""Specification for an EXPORT_DATA job"""
|
193
209
|
|
194
|
-
model: TagSelector = _dc.field(default_factory=lambda: TagSelector())
|
210
|
+
model: "TagSelector" = _dc.field(default_factory=lambda: TagSelector())
|
211
|
+
|
212
|
+
parameters: "_tp.Dict[str, Value]" = _dc.field(default_factory=dict)
|
213
|
+
|
214
|
+
inputs: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
215
|
+
|
216
|
+
outputs: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
217
|
+
|
218
|
+
priorOutputs: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
195
219
|
|
196
|
-
|
220
|
+
storageAccess: "_tp.List[str]" = _dc.field(default_factory=list)
|
197
221
|
|
198
|
-
|
222
|
+
exports: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
199
223
|
|
200
|
-
|
224
|
+
outputAttrs: "_tp.List[TagUpdate]" = _dc.field(default_factory=list)
|
201
225
|
|
202
|
-
priorOutputs: _tp.Dict[str, TagSelector] = _dc.field(default_factory=dict)
|
203
226
|
|
204
|
-
|
227
|
+
@_dc.dataclass
|
228
|
+
class JobGroup:
|
229
|
+
|
230
|
+
"""Specification for a JOB_GROUP job, which runs a collection of other jobs"""
|
231
|
+
|
232
|
+
jobGroupType: "JobGroupType" = JobGroupType.JOB_GROUP_TYPE_NOT_SET
|
233
|
+
|
234
|
+
sequential: "_tp.Optional[SequentialJobGroup]" = None
|
235
|
+
|
236
|
+
parallel: "_tp.Optional[ParallelJobGroup]" = None
|
237
|
+
|
238
|
+
|
239
|
+
@_dc.dataclass
|
240
|
+
class SequentialJobGroup:
|
241
|
+
|
242
|
+
"""A job group where each job runs in sequence"""
|
243
|
+
|
244
|
+
jobs: "_tp.List[JobDefinition]" = _dc.field(default_factory=list)
|
245
|
+
|
246
|
+
|
247
|
+
@_dc.dataclass
|
248
|
+
class ParallelJobGroup:
|
205
249
|
|
206
|
-
|
250
|
+
"""A job group where all jobs runs in parallel"""
|
207
251
|
|
208
|
-
|
252
|
+
jobs: "_tp.List[JobDefinition]" = _dc.field(default_factory=list)
|
tracdap/rt/metadata/model.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# Code generated by TRAC
|
2
2
|
|
3
|
-
from __future__ import annotations
|
4
3
|
import typing as _tp # noqa
|
5
4
|
import dataclasses as _dc # noqa
|
6
5
|
import enum as _enum # noqa
|
@@ -31,13 +30,13 @@ class ModelParameter:
|
|
31
30
|
|
32
31
|
"""Describes an individual parameter of a model"""
|
33
32
|
|
34
|
-
paramType: TypeDescriptor = _dc.field(default_factory=lambda: TypeDescriptor())
|
33
|
+
paramType: "TypeDescriptor" = _dc.field(default_factory=lambda: TypeDescriptor())
|
35
34
|
|
36
|
-
label: str = ""
|
35
|
+
label: "str" = ""
|
37
36
|
|
38
|
-
defaultValue: _tp.Optional[Value] = None
|
37
|
+
defaultValue: "_tp.Optional[Value]" = None
|
39
38
|
|
40
|
-
paramProps: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
39
|
+
paramProps: "_tp.Dict[str, Value]" = _dc.field(default_factory=dict)
|
41
40
|
|
42
41
|
|
43
42
|
@_dc.dataclass
|
@@ -55,15 +54,15 @@ class ModelInputSchema:
|
|
55
54
|
other options may be required. These capabilities may be added in future releases.
|
56
55
|
"""
|
57
56
|
|
58
|
-
schema: SchemaDefinition = _dc.field(default_factory=lambda: SchemaDefinition())
|
57
|
+
schema: "SchemaDefinition" = _dc.field(default_factory=lambda: SchemaDefinition())
|
59
58
|
|
60
|
-
label: _tp.Optional[str] = None
|
59
|
+
label: "_tp.Optional[str]" = None
|
61
60
|
|
62
|
-
optional: bool = False
|
61
|
+
optional: "bool" = False
|
63
62
|
|
64
|
-
dynamic: bool = False
|
63
|
+
dynamic: "bool" = False
|
65
64
|
|
66
|
-
inputProps: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
65
|
+
inputProps: "_tp.Dict[str, Value]" = _dc.field(default_factory=dict)
|
67
66
|
|
68
67
|
|
69
68
|
@_dc.dataclass
|
@@ -82,15 +81,15 @@ class ModelOutputSchema:
|
|
82
81
|
added in future releases.
|
83
82
|
"""
|
84
83
|
|
85
|
-
schema: SchemaDefinition = _dc.field(default_factory=lambda: SchemaDefinition())
|
84
|
+
schema: "SchemaDefinition" = _dc.field(default_factory=lambda: SchemaDefinition())
|
86
85
|
|
87
|
-
label: _tp.Optional[str] = None
|
86
|
+
label: "_tp.Optional[str]" = None
|
88
87
|
|
89
|
-
optional: bool = False
|
88
|
+
optional: "bool" = False
|
90
89
|
|
91
|
-
dynamic: bool = False
|
90
|
+
dynamic: "bool" = False
|
92
91
|
|
93
|
-
outputProps: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
92
|
+
outputProps: "_tp.Dict[str, Value]" = _dc.field(default_factory=dict)
|
94
93
|
|
95
94
|
|
96
95
|
@_dc.dataclass
|
@@ -98,28 +97,28 @@ class ModelDefinition:
|
|
98
97
|
|
99
98
|
"""Define a model for execution on the TRAC platform"""
|
100
99
|
|
101
|
-
language: str = ""
|
100
|
+
language: "str" = ""
|
102
101
|
|
103
|
-
repository: str = ""
|
102
|
+
repository: "str" = ""
|
104
103
|
|
105
|
-
packageGroup: _tp.Optional[str] = None
|
104
|
+
packageGroup: "_tp.Optional[str]" = None
|
106
105
|
|
107
|
-
package: str = ""
|
106
|
+
package: "str" = ""
|
108
107
|
|
109
|
-
version: str = ""
|
108
|
+
version: "str" = ""
|
110
109
|
|
111
|
-
entryPoint: str = ""
|
110
|
+
entryPoint: "str" = ""
|
112
111
|
|
113
|
-
path: _tp.Optional[str] = None
|
112
|
+
path: "_tp.Optional[str]" = None
|
114
113
|
|
115
|
-
parameters: _tp.Dict[str, ModelParameter] = _dc.field(default_factory=dict)
|
114
|
+
parameters: "_tp.Dict[str, ModelParameter]" = _dc.field(default_factory=dict)
|
116
115
|
|
117
|
-
inputs: _tp.Dict[str, ModelInputSchema] = _dc.field(default_factory=dict)
|
116
|
+
inputs: "_tp.Dict[str, ModelInputSchema]" = _dc.field(default_factory=dict)
|
118
117
|
|
119
|
-
outputs: _tp.Dict[str, ModelOutputSchema] = _dc.field(default_factory=dict)
|
118
|
+
outputs: "_tp.Dict[str, ModelOutputSchema]" = _dc.field(default_factory=dict)
|
120
119
|
|
121
|
-
staticAttributes: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
120
|
+
staticAttributes: "_tp.Dict[str, Value]" = _dc.field(default_factory=dict)
|
122
121
|
|
123
122
|
"""Static attributes defined in model code"""
|
124
123
|
|
125
|
-
modelType: ModelType = ModelType.STANDARD_MODEL
|
124
|
+
modelType: "ModelType" = ModelType.STANDARD_MODEL
|
tracdap/rt/metadata/object.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# Code generated by TRAC
|
2
2
|
|
3
|
-
from __future__ import annotations
|
4
3
|
import typing as _tp # noqa
|
5
4
|
import dataclasses as _dc # noqa
|
6
5
|
import enum as _enum # noqa
|
@@ -50,25 +49,25 @@ class ObjectDefinition:
|
|
50
49
|
by TRAC's core object definitions.
|
51
50
|
|
52
51
|
.. seealso::
|
53
|
-
:
|
52
|
+
:py:obj:`Tag <Tag>`
|
54
53
|
"""
|
55
54
|
|
56
|
-
objectType: ObjectType = ObjectType.OBJECT_TYPE_NOT_SET
|
55
|
+
objectType: "ObjectType" = ObjectType.OBJECT_TYPE_NOT_SET
|
57
56
|
|
58
|
-
data: _tp.Optional[DataDefinition] = None
|
57
|
+
data: "_tp.Optional[DataDefinition]" = None
|
59
58
|
|
60
|
-
model: _tp.Optional[ModelDefinition] = None
|
59
|
+
model: "_tp.Optional[ModelDefinition]" = None
|
61
60
|
|
62
|
-
flow: _tp.Optional[FlowDefinition] = None
|
61
|
+
flow: "_tp.Optional[FlowDefinition]" = None
|
63
62
|
|
64
|
-
job: _tp.Optional[JobDefinition] = None
|
63
|
+
job: "_tp.Optional[JobDefinition]" = None
|
65
64
|
|
66
|
-
file: _tp.Optional[FileDefinition] = None
|
65
|
+
file: "_tp.Optional[FileDefinition]" = None
|
67
66
|
|
68
|
-
custom: _tp.Optional[CustomDefinition] = None
|
67
|
+
custom: "_tp.Optional[CustomDefinition]" = None
|
69
68
|
|
70
|
-
storage: _tp.Optional[StorageDefinition] = None
|
69
|
+
storage: "_tp.Optional[StorageDefinition]" = None
|
71
70
|
|
72
|
-
schema: _tp.Optional[SchemaDefinition] = None
|
71
|
+
schema: "_tp.Optional[SchemaDefinition]" = None
|
73
72
|
|
74
|
-
objectProps: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
73
|
+
objectProps: "_tp.Dict[str, Value]" = _dc.field(default_factory=dict)
|