tracdap-runtime 0.6.3__py3-none-any.whl → 0.6.4__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/_exec/context.py +207 -100
- tracdap/rt/_exec/dev_mode.py +43 -3
- tracdap/rt/_exec/functions.py +14 -17
- tracdap/rt/_impl/data.py +70 -5
- tracdap/rt/_impl/grpc/tracdap/metadata/data_pb2.py +18 -18
- tracdap/rt/_impl/grpc/tracdap/metadata/model_pb2.py +18 -18
- tracdap/rt/_impl/grpc/tracdap/metadata/model_pb2.pyi +8 -4
- tracdap/rt/_impl/static_api.py +26 -10
- tracdap/rt/_impl/validation.py +37 -4
- tracdap/rt/_version.py +1 -1
- tracdap/rt/api/hook.py +2 -4
- tracdap/rt/api/model_api.py +50 -7
- tracdap/rt/api/static_api.py +14 -6
- tracdap/rt/config/common.py +17 -17
- tracdap/rt/config/job.py +2 -2
- tracdap/rt/config/platform.py +25 -25
- tracdap/rt/config/result.py +2 -2
- tracdap/rt/config/runtime.py +3 -3
- tracdap/rt/launch/cli.py +7 -4
- tracdap/rt/launch/launch.py +19 -3
- tracdap/rt/metadata/common.py +2 -2
- tracdap/rt/metadata/custom.py +3 -3
- tracdap/rt/metadata/data.py +12 -12
- tracdap/rt/metadata/file.py +6 -6
- tracdap/rt/metadata/flow.py +6 -6
- tracdap/rt/metadata/job.py +8 -8
- tracdap/rt/metadata/model.py +15 -11
- tracdap/rt/metadata/object_id.py +8 -8
- tracdap/rt/metadata/search.py +5 -5
- tracdap/rt/metadata/stoarge.py +6 -6
- tracdap/rt/metadata/tag.py +1 -1
- tracdap/rt/metadata/tag_update.py +1 -1
- tracdap/rt/metadata/type.py +4 -4
- {tracdap_runtime-0.6.3.dist-info → tracdap_runtime-0.6.4.dist-info}/METADATA +1 -1
- {tracdap_runtime-0.6.3.dist-info → tracdap_runtime-0.6.4.dist-info}/RECORD +38 -38
- {tracdap_runtime-0.6.3.dist-info → tracdap_runtime-0.6.4.dist-info}/LICENSE +0 -0
- {tracdap_runtime-0.6.3.dist-info → tracdap_runtime-0.6.4.dist-info}/WHEEL +0 -0
- {tracdap_runtime-0.6.3.dist-info → tracdap_runtime-0.6.4.dist-info}/top_level.txt +0 -0
tracdap/rt/config/common.py
CHANGED
@@ -15,7 +15,7 @@ class _ConfigFile:
|
|
15
15
|
@_dc.dataclass
|
16
16
|
class PluginConfig:
|
17
17
|
|
18
|
-
protocol: str =
|
18
|
+
protocol: str = ""
|
19
19
|
|
20
20
|
properties: _tp.Dict[str, str] = _dc.field(default_factory=dict)
|
21
21
|
|
@@ -25,9 +25,9 @@ class PluginConfig:
|
|
25
25
|
@_dc.dataclass
|
26
26
|
class PlatformInfo:
|
27
27
|
|
28
|
-
environment: str =
|
28
|
+
environment: str = ""
|
29
29
|
|
30
|
-
production: bool =
|
30
|
+
production: bool = False
|
31
31
|
|
32
32
|
deploymentInfo: _tp.Dict[str, str] = _dc.field(default_factory=dict)
|
33
33
|
|
@@ -35,27 +35,27 @@ class PlatformInfo:
|
|
35
35
|
@_dc.dataclass
|
36
36
|
class AuthenticationConfig:
|
37
37
|
|
38
|
-
jwtIssuer: str =
|
38
|
+
jwtIssuer: str = ""
|
39
39
|
|
40
|
-
jwtExpiry: int =
|
40
|
+
jwtExpiry: int = 0
|
41
41
|
|
42
|
-
jwtLimit: int =
|
42
|
+
jwtLimit: int = 0
|
43
43
|
|
44
|
-
jwtRefresh: int =
|
44
|
+
jwtRefresh: int = 0
|
45
45
|
|
46
46
|
provider: _tp.Optional[PluginConfig] = None
|
47
47
|
|
48
|
-
disableAuth: bool =
|
48
|
+
disableAuth: bool = False
|
49
49
|
|
50
|
-
disableSigning: bool =
|
50
|
+
disableSigning: bool = False
|
51
51
|
|
52
|
-
systemUserId: str =
|
52
|
+
systemUserId: str = ""
|
53
53
|
|
54
|
-
systemUserName: str =
|
54
|
+
systemUserName: str = ""
|
55
55
|
|
56
|
-
systemTicketDuration: int =
|
56
|
+
systemTicketDuration: int = 0
|
57
57
|
|
58
|
-
systemTicketRefresh: int =
|
58
|
+
systemTicketRefresh: int = 0
|
59
59
|
|
60
60
|
|
61
61
|
@_dc.dataclass
|
@@ -63,9 +63,9 @@ class StorageConfig:
|
|
63
63
|
|
64
64
|
buckets: _tp.Dict[str, PluginConfig] = _dc.field(default_factory=dict)
|
65
65
|
|
66
|
-
defaultBucket: str =
|
66
|
+
defaultBucket: str = ""
|
67
67
|
|
68
|
-
defaultFormat: str =
|
68
|
+
defaultFormat: str = ""
|
69
69
|
|
70
70
|
|
71
71
|
@_dc.dataclass
|
@@ -73,6 +73,6 @@ class ServiceConfig:
|
|
73
73
|
|
74
74
|
enabled: _tp.Optional[bool] = None
|
75
75
|
|
76
|
-
alias: str =
|
76
|
+
alias: str = ""
|
77
77
|
|
78
|
-
port: int =
|
78
|
+
port: int = 0
|
tracdap/rt/config/job.py
CHANGED
@@ -12,9 +12,9 @@ import tracdap.rt.metadata as metadata
|
|
12
12
|
@_dc.dataclass
|
13
13
|
class JobConfig:
|
14
14
|
|
15
|
-
jobId: metadata.TagHeader =
|
15
|
+
jobId: metadata.TagHeader = _dc.field(default_factory=lambda: metadata.TagHeader())
|
16
16
|
|
17
|
-
job: metadata.JobDefinition =
|
17
|
+
job: metadata.JobDefinition = _dc.field(default_factory=lambda: metadata.JobDefinition())
|
18
18
|
|
19
19
|
resources: _tp.Dict[str, metadata.ObjectDefinition] = _dc.field(default_factory=dict)
|
20
20
|
|
tracdap/rt/config/platform.py
CHANGED
@@ -38,19 +38,19 @@ class PlatformConfig:
|
|
38
38
|
|
39
39
|
config: _tp.Dict[str, str] = _dc.field(default_factory=dict)
|
40
40
|
|
41
|
-
platformInfo: PlatformInfo =
|
41
|
+
platformInfo: PlatformInfo = _dc.field(default_factory=lambda: PlatformInfo())
|
42
42
|
|
43
|
-
authentication: AuthenticationConfig =
|
43
|
+
authentication: AuthenticationConfig = _dc.field(default_factory=lambda: AuthenticationConfig())
|
44
44
|
|
45
|
-
metadata: MetadataConfig =
|
45
|
+
metadata: MetadataConfig = _dc.field(default_factory=lambda: MetadataConfig())
|
46
46
|
|
47
|
-
storage: StorageConfig =
|
47
|
+
storage: StorageConfig = _dc.field(default_factory=lambda: StorageConfig())
|
48
48
|
|
49
49
|
repositories: _tp.Dict[str, PluginConfig] = _dc.field(default_factory=dict)
|
50
50
|
|
51
|
-
executor: PluginConfig =
|
51
|
+
executor: PluginConfig = _dc.field(default_factory=lambda: PluginConfig())
|
52
52
|
|
53
|
-
jobCache: PluginConfig =
|
53
|
+
jobCache: PluginConfig = _dc.field(default_factory=lambda: PluginConfig())
|
54
54
|
|
55
55
|
tenants: _tp.Dict[str, TenantConfig] = _dc.field(default_factory=dict)
|
56
56
|
|
@@ -60,13 +60,13 @@ class PlatformConfig:
|
|
60
60
|
|
61
61
|
services: _tp.Dict[str, ServiceConfig] = _dc.field(default_factory=dict)
|
62
62
|
|
63
|
-
deployment: DeploymentConfig =
|
63
|
+
deployment: DeploymentConfig = _dc.field(default_factory=lambda: DeploymentConfig())
|
64
64
|
|
65
65
|
|
66
66
|
@_dc.dataclass
|
67
67
|
class MetadataConfig:
|
68
68
|
|
69
|
-
database: PluginConfig =
|
69
|
+
database: PluginConfig = _dc.field(default_factory=lambda: PluginConfig())
|
70
70
|
|
71
71
|
format: metadata.MetadataFormat = metadata.MetadataFormat.METADATA_FORMAT_NOT_SET
|
72
72
|
|
@@ -82,9 +82,9 @@ class TenantConfig:
|
|
82
82
|
@_dc.dataclass
|
83
83
|
class WebServerConfig:
|
84
84
|
|
85
|
-
enabled: bool =
|
85
|
+
enabled: bool = False
|
86
86
|
|
87
|
-
contentRoot: PluginConfig =
|
87
|
+
contentRoot: PluginConfig = _dc.field(default_factory=lambda: PluginConfig())
|
88
88
|
|
89
89
|
rewriteRules: _tp.List[WebServerRewriteRule] = _dc.field(default_factory=list)
|
90
90
|
|
@@ -94,25 +94,25 @@ class WebServerConfig:
|
|
94
94
|
@_dc.dataclass
|
95
95
|
class WebServerRewriteRule:
|
96
96
|
|
97
|
-
source: str =
|
97
|
+
source: str = ""
|
98
98
|
|
99
|
-
target: str =
|
99
|
+
target: str = ""
|
100
100
|
|
101
101
|
|
102
102
|
@_dc.dataclass
|
103
103
|
class WebServerRedirect:
|
104
104
|
|
105
|
-
source: str =
|
105
|
+
source: str = ""
|
106
106
|
|
107
|
-
target: str =
|
107
|
+
target: str = ""
|
108
108
|
|
109
|
-
status: int =
|
109
|
+
status: int = 0
|
110
110
|
|
111
111
|
|
112
112
|
@_dc.dataclass
|
113
113
|
class GatewayConfig:
|
114
114
|
|
115
|
-
idleTimeout: int =
|
115
|
+
idleTimeout: int = 0
|
116
116
|
|
117
117
|
routes: _tp.List[RouteConfig] = _dc.field(default_factory=list)
|
118
118
|
|
@@ -122,35 +122,35 @@ class GatewayConfig:
|
|
122
122
|
@_dc.dataclass
|
123
123
|
class RouteConfig:
|
124
124
|
|
125
|
-
routeName: str =
|
125
|
+
routeName: str = ""
|
126
126
|
|
127
127
|
routeType: RoutingProtocol = RoutingProtocol.PROTOCOL_NOT_SET
|
128
128
|
|
129
129
|
protocols: _tp.List[RoutingProtocol] = _dc.field(default_factory=list)
|
130
130
|
|
131
|
-
match: RoutingMatch =
|
131
|
+
match: RoutingMatch = _dc.field(default_factory=lambda: RoutingMatch())
|
132
132
|
|
133
|
-
target: RoutingTarget =
|
133
|
+
target: RoutingTarget = _dc.field(default_factory=lambda: RoutingTarget())
|
134
134
|
|
135
135
|
|
136
136
|
@_dc.dataclass
|
137
137
|
class RoutingMatch:
|
138
138
|
|
139
|
-
host: str =
|
139
|
+
host: str = ""
|
140
140
|
|
141
|
-
path: str =
|
141
|
+
path: str = ""
|
142
142
|
|
143
143
|
|
144
144
|
@_dc.dataclass
|
145
145
|
class RoutingTarget:
|
146
146
|
|
147
|
-
scheme: str =
|
147
|
+
scheme: str = ""
|
148
148
|
|
149
|
-
host: str =
|
149
|
+
host: str = ""
|
150
150
|
|
151
|
-
port: int =
|
151
|
+
port: int = 0
|
152
152
|
|
153
|
-
path: str =
|
153
|
+
path: str = ""
|
154
154
|
|
155
155
|
|
156
156
|
@_dc.dataclass
|
tracdap/rt/config/result.py
CHANGED
@@ -18,10 +18,10 @@ class TagUpdateList:
|
|
18
18
|
@_dc.dataclass
|
19
19
|
class JobResult:
|
20
20
|
|
21
|
-
jobId: metadata.TagHeader =
|
21
|
+
jobId: metadata.TagHeader = _dc.field(default_factory=lambda: metadata.TagHeader())
|
22
22
|
|
23
23
|
statusCode: metadata.JobStatusCode = metadata.JobStatusCode.JOB_STATUS_CODE_NOT_SET
|
24
24
|
|
25
|
-
statusMessage: str =
|
25
|
+
statusMessage: str = ""
|
26
26
|
|
27
27
|
results: _tp.Dict[str, metadata.ObjectDefinition] = _dc.field(default_factory=dict)
|
tracdap/rt/config/runtime.py
CHANGED
@@ -14,13 +14,13 @@ class RuntimeConfig:
|
|
14
14
|
|
15
15
|
config: _tp.Dict[str, str] = _dc.field(default_factory=dict)
|
16
16
|
|
17
|
-
storage: StorageConfig =
|
17
|
+
storage: StorageConfig = _dc.field(default_factory=lambda: StorageConfig())
|
18
18
|
|
19
19
|
repositories: _tp.Dict[str, PluginConfig] = _dc.field(default_factory=dict)
|
20
20
|
|
21
|
-
sparkSettings: SparkSettings =
|
21
|
+
sparkSettings: SparkSettings = _dc.field(default_factory=lambda: SparkSettings())
|
22
22
|
|
23
|
-
runtimeApi: ServiceConfig =
|
23
|
+
runtimeApi: ServiceConfig = _dc.field(default_factory=lambda: ServiceConfig())
|
24
24
|
|
25
25
|
|
26
26
|
@_dc.dataclass
|
tracdap/rt/launch/cli.py
CHANGED
@@ -16,18 +16,18 @@ import argparse
|
|
16
16
|
import pathlib
|
17
17
|
|
18
18
|
|
19
|
-
def _cli_args():
|
19
|
+
def _cli_args(programmatic_args = None):
|
20
20
|
|
21
21
|
parser = argparse.ArgumentParser(
|
22
22
|
prog="python -m tracdap.rt.launch",
|
23
23
|
description="TRAC D.A.P. Runtime for Python")
|
24
24
|
|
25
25
|
parser.add_argument(
|
26
|
-
"--sys-config", dest="sys_config", type=
|
26
|
+
"--sys-config", dest="sys_config", type=str, required=True,
|
27
27
|
help="Path to the system configuration file for the TRAC runtime")
|
28
28
|
|
29
29
|
parser.add_argument(
|
30
|
-
"--job-config", dest="job_config", type=
|
30
|
+
"--job-config", dest="job_config", type=str, required=True,
|
31
31
|
help="Path to the job configuration for the job to be executed")
|
32
32
|
|
33
33
|
parser.add_argument(
|
@@ -55,4 +55,7 @@ def _cli_args():
|
|
55
55
|
"--plugin-package", dest="plugin_packages", type=str, action="append",
|
56
56
|
help="Do not clean up the scratch location on exit")
|
57
57
|
|
58
|
-
|
58
|
+
if programmatic_args:
|
59
|
+
return parser.parse_args(programmatic_args)
|
60
|
+
else:
|
61
|
+
return parser.parse_args()
|
tracdap/rt/launch/launch.py
CHANGED
@@ -29,7 +29,15 @@ from .cli import _cli_args
|
|
29
29
|
def _resolve_config_file(
|
30
30
|
config_path: _tp.Union[str, _pathlib.Path],
|
31
31
|
model_dir: _tp.Optional[_pathlib.Path] = None) \
|
32
|
-
-> _pathlib.Path:
|
32
|
+
-> _tp.Union[_pathlib.Path, str]:
|
33
|
+
|
34
|
+
# If the config path is a URL, do not convert it into a path
|
35
|
+
if isinstance(config_path, str):
|
36
|
+
scheme_sep = config_path.find(":")
|
37
|
+
# Single letter scheme is a Windows file path (C:\...)
|
38
|
+
scheme = scheme = config_path[:scheme_sep] if scheme_sep > 1 else "file"
|
39
|
+
if scheme != "file":
|
40
|
+
return config_path
|
33
41
|
|
34
42
|
if _pathlib.Path(config_path).is_absolute():
|
35
43
|
return config_path
|
@@ -136,13 +144,21 @@ def launch_job(
|
|
136
144
|
rt.wait_for_job(job.jobId)
|
137
145
|
|
138
146
|
|
139
|
-
def launch_cli():
|
147
|
+
def launch_cli(programmatic_args: _tp.Optional[_tp.List[str]] = None):
|
140
148
|
|
141
149
|
"""
|
142
150
|
Launch the TRAC runtime using the command line interface
|
151
|
+
|
152
|
+
CLI arguments are read from the process command line by default. To pass CLI args
|
153
|
+
explicitly, provide the list of arguments using the programmatic_args parameter.
|
154
|
+
|
155
|
+
:param programmatic_args: Optional parameter to pass CLI args explicitly in code
|
143
156
|
"""
|
144
157
|
|
145
|
-
|
158
|
+
if programmatic_args:
|
159
|
+
launch_args = _cli_args(programmatic_args)
|
160
|
+
else:
|
161
|
+
launch_args = _cli_args()
|
146
162
|
|
147
163
|
_sys_config = _resolve_config_file(launch_args.sys_config, None)
|
148
164
|
|
tracdap/rt/metadata/common.py
CHANGED
@@ -49,10 +49,10 @@ class TenantInfo:
|
|
49
49
|
|
50
50
|
"""Information about a tenant that is set up on the TRAC platform."""
|
51
51
|
|
52
|
-
tenantCode: str =
|
52
|
+
tenantCode: str = ""
|
53
53
|
|
54
54
|
"""* Unique code used to identify the tenant, required by most API calls."""
|
55
55
|
|
56
|
-
description: str =
|
56
|
+
description: str = ""
|
57
57
|
|
58
58
|
"""* A short description of the tenant, suitable for displaying to users in lists."""
|
tracdap/rt/metadata/custom.py
CHANGED
@@ -11,8 +11,8 @@ class CustomDefinition:
|
|
11
11
|
|
12
12
|
"""Define a custom object that can be stored and managed in the TRAC metadata store"""
|
13
13
|
|
14
|
-
customSchemaType: str =
|
14
|
+
customSchemaType: str = ""
|
15
15
|
|
16
|
-
customSchemaVersion: int =
|
16
|
+
customSchemaVersion: int = 0
|
17
17
|
|
18
|
-
customData: bytes =
|
18
|
+
customData: bytes = b""
|
tracdap/rt/metadata/data.py
CHANGED
@@ -54,17 +54,17 @@ class FieldSchema:
|
|
54
54
|
:class:`TableSchema <TableSchema>`
|
55
55
|
"""
|
56
56
|
|
57
|
-
fieldName: str =
|
57
|
+
fieldName: str = ""
|
58
58
|
|
59
|
-
fieldOrder: int =
|
59
|
+
fieldOrder: int = 0
|
60
60
|
|
61
61
|
fieldType: BasicType = BasicType.BASIC_TYPE_NOT_SET
|
62
62
|
|
63
|
-
label: str =
|
63
|
+
label: str = ""
|
64
64
|
|
65
|
-
businessKey: bool =
|
65
|
+
businessKey: bool = False
|
66
66
|
|
67
|
-
categorical: bool =
|
67
|
+
categorical: bool = False
|
68
68
|
|
69
69
|
notNull: _tp.Optional[bool] = None
|
70
70
|
|
@@ -110,7 +110,7 @@ class PartKey:
|
|
110
110
|
|
111
111
|
"""Partition key for tabular datasets"""
|
112
112
|
|
113
|
-
opaqueKey: str =
|
113
|
+
opaqueKey: str = ""
|
114
114
|
|
115
115
|
partType: PartType = PartType.PART_ROOT
|
116
116
|
|
@@ -129,23 +129,23 @@ class DataDefinition:
|
|
129
129
|
@_dc.dataclass
|
130
130
|
class Delta:
|
131
131
|
|
132
|
-
deltaIndex: int =
|
132
|
+
deltaIndex: int = 0
|
133
133
|
|
134
|
-
dataItem: str =
|
134
|
+
dataItem: str = ""
|
135
135
|
|
136
136
|
@_dc.dataclass
|
137
137
|
class Snap:
|
138
138
|
|
139
|
-
snapIndex: int =
|
139
|
+
snapIndex: int = 0
|
140
140
|
|
141
141
|
deltas: _tp.List[DataDefinition.Delta] = _dc.field(default_factory=list)
|
142
142
|
|
143
143
|
@_dc.dataclass
|
144
144
|
class Part:
|
145
145
|
|
146
|
-
partKey: PartKey =
|
146
|
+
partKey: PartKey = _dc.field(default_factory=lambda: PartKey())
|
147
147
|
|
148
|
-
snap: DataDefinition.Snap =
|
148
|
+
snap: DataDefinition.Snap = _dc.field(default_factory=lambda: DataDefinition.Snap())
|
149
149
|
|
150
150
|
schemaId: _tp.Optional[TagSelector] = None
|
151
151
|
|
@@ -153,4 +153,4 @@ class DataDefinition:
|
|
153
153
|
|
154
154
|
parts: _tp.Dict[str, DataDefinition.Part] = _dc.field(default_factory=dict)
|
155
155
|
|
156
|
-
storageId: TagSelector =
|
156
|
+
storageId: TagSelector = _dc.field(default_factory=lambda: TagSelector())
|
tracdap/rt/metadata/file.py
CHANGED
@@ -14,14 +14,14 @@ class FileDefinition:
|
|
14
14
|
|
15
15
|
"""Describes a file object stored in the TRAC platform"""
|
16
16
|
|
17
|
-
name: str =
|
17
|
+
name: str = ""
|
18
18
|
|
19
|
-
extension: str =
|
19
|
+
extension: str = ""
|
20
20
|
|
21
|
-
mimeType: str =
|
21
|
+
mimeType: str = ""
|
22
22
|
|
23
|
-
size: int =
|
23
|
+
size: int = 0
|
24
24
|
|
25
|
-
storageId: TagSelector =
|
25
|
+
storageId: TagSelector = _dc.field(default_factory=lambda: TagSelector())
|
26
26
|
|
27
|
-
dataItem: str =
|
27
|
+
dataItem: str = ""
|
tracdap/rt/metadata/flow.py
CHANGED
@@ -59,13 +59,13 @@ class FlowNode:
|
|
59
59
|
|
60
60
|
outputs: _tp.List[str] = _dc.field(default_factory=list)
|
61
61
|
|
62
|
-
nodeSearch: SearchExpression =
|
62
|
+
nodeSearch: SearchExpression = _dc.field(default_factory=lambda: SearchExpression())
|
63
63
|
|
64
64
|
nodeAttrs: _tp.List[TagUpdate] = _dc.field(default_factory=list)
|
65
65
|
|
66
66
|
nodeProps: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
67
67
|
|
68
|
-
label: str =
|
68
|
+
label: str = ""
|
69
69
|
|
70
70
|
|
71
71
|
@_dc.dataclass
|
@@ -85,9 +85,9 @@ class FlowSocket:
|
|
85
85
|
:class:`FlowEdge <FlowEdge>`
|
86
86
|
"""
|
87
87
|
|
88
|
-
node: str =
|
88
|
+
node: str = ""
|
89
89
|
|
90
|
-
socket: str =
|
90
|
+
socket: str = ""
|
91
91
|
|
92
92
|
|
93
93
|
@_dc.dataclass
|
@@ -100,9 +100,9 @@ class FlowEdge:
|
|
100
100
|
:class:`FlowSocket <FlowSocket>`
|
101
101
|
"""
|
102
102
|
|
103
|
-
source: FlowSocket =
|
103
|
+
source: FlowSocket = _dc.field(default_factory=lambda: FlowSocket())
|
104
104
|
|
105
|
-
target: FlowSocket =
|
105
|
+
target: FlowSocket = _dc.field(default_factory=lambda: FlowSocket())
|
106
106
|
|
107
107
|
|
108
108
|
@_dc.dataclass
|
tracdap/rt/metadata/job.py
CHANGED
@@ -99,7 +99,7 @@ class RunModelJob:
|
|
99
99
|
|
100
100
|
"""Specification for a RuN_MODEL job"""
|
101
101
|
|
102
|
-
model: TagSelector =
|
102
|
+
model: TagSelector = _dc.field(default_factory=lambda: TagSelector())
|
103
103
|
|
104
104
|
parameters: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
105
105
|
|
@@ -117,7 +117,7 @@ class RunFlowJob:
|
|
117
117
|
|
118
118
|
"""Specification for a RUN_FLOW job"""
|
119
119
|
|
120
|
-
flow: TagSelector =
|
120
|
+
flow: TagSelector = _dc.field(default_factory=lambda: TagSelector())
|
121
121
|
|
122
122
|
parameters: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
123
123
|
|
@@ -137,18 +137,18 @@ class ImportModelJob:
|
|
137
137
|
|
138
138
|
"""Specification for an IMPORT_MODEL job"""
|
139
139
|
|
140
|
-
language: str =
|
140
|
+
language: str = ""
|
141
141
|
|
142
|
-
repository: str =
|
142
|
+
repository: str = ""
|
143
143
|
|
144
144
|
packageGroup: _tp.Optional[str] = None
|
145
145
|
|
146
|
-
package: str =
|
146
|
+
package: str = ""
|
147
147
|
|
148
|
-
version: str =
|
148
|
+
version: str = ""
|
149
149
|
|
150
|
-
entryPoint: str =
|
150
|
+
entryPoint: str = ""
|
151
151
|
|
152
|
-
path: str =
|
152
|
+
path: str = ""
|
153
153
|
|
154
154
|
modelAttrs: _tp.List[TagUpdate] = _dc.field(default_factory=list)
|
tracdap/rt/metadata/model.py
CHANGED
@@ -15,9 +15,9 @@ class ModelParameter:
|
|
15
15
|
|
16
16
|
"""Describes an individual parameter of a model"""
|
17
17
|
|
18
|
-
paramType: TypeDescriptor =
|
18
|
+
paramType: TypeDescriptor = _dc.field(default_factory=lambda: TypeDescriptor())
|
19
19
|
|
20
|
-
label: str =
|
20
|
+
label: str = ""
|
21
21
|
|
22
22
|
defaultValue: _tp.Optional[Value] = None
|
23
23
|
|
@@ -39,11 +39,13 @@ class ModelInputSchema:
|
|
39
39
|
other options may be required. These capabilities may be added in future releases.
|
40
40
|
"""
|
41
41
|
|
42
|
-
schema: SchemaDefinition =
|
42
|
+
schema: SchemaDefinition = _dc.field(default_factory=lambda: SchemaDefinition())
|
43
43
|
|
44
44
|
label: _tp.Optional[str] = None
|
45
45
|
|
46
|
-
optional: bool =
|
46
|
+
optional: bool = False
|
47
|
+
|
48
|
+
dynamic: bool = False
|
47
49
|
|
48
50
|
inputProps: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
49
51
|
|
@@ -64,11 +66,13 @@ class ModelOutputSchema:
|
|
64
66
|
added in future releases.
|
65
67
|
"""
|
66
68
|
|
67
|
-
schema: SchemaDefinition =
|
69
|
+
schema: SchemaDefinition = _dc.field(default_factory=lambda: SchemaDefinition())
|
68
70
|
|
69
71
|
label: _tp.Optional[str] = None
|
70
72
|
|
71
|
-
optional: bool =
|
73
|
+
optional: bool = False
|
74
|
+
|
75
|
+
dynamic: bool = False
|
72
76
|
|
73
77
|
outputProps: _tp.Dict[str, Value] = _dc.field(default_factory=dict)
|
74
78
|
|
@@ -78,17 +82,17 @@ class ModelDefinition:
|
|
78
82
|
|
79
83
|
"""Define a model for execution on the TRAC platform"""
|
80
84
|
|
81
|
-
language: str =
|
85
|
+
language: str = ""
|
82
86
|
|
83
|
-
repository: str =
|
87
|
+
repository: str = ""
|
84
88
|
|
85
89
|
packageGroup: _tp.Optional[str] = None
|
86
90
|
|
87
|
-
package: str =
|
91
|
+
package: str = ""
|
88
92
|
|
89
|
-
version: str =
|
93
|
+
version: str = ""
|
90
94
|
|
91
|
-
entryPoint: str =
|
95
|
+
entryPoint: str = ""
|
92
96
|
|
93
97
|
path: _tp.Optional[str] = None
|
94
98
|
|
tracdap/rt/metadata/object_id.py
CHANGED
@@ -56,7 +56,7 @@ class TagHeader:
|
|
56
56
|
:class:`ObjectType <ObjectType>`
|
57
57
|
"""
|
58
58
|
|
59
|
-
objectId: str =
|
59
|
+
objectId: str = ""
|
60
60
|
|
61
61
|
"""
|
62
62
|
Object ID of the object this tag is associated with.
|
@@ -64,27 +64,27 @@ class TagHeader:
|
|
64
64
|
Object IDs are UUIDs (RFC4122, https://www.ietf.org/rfc/rfc4122.txt)
|
65
65
|
"""
|
66
66
|
|
67
|
-
objectVersion: int =
|
67
|
+
objectVersion: int = 0
|
68
68
|
|
69
69
|
"""Version of the object this tag is associated with."""
|
70
70
|
|
71
|
-
objectTimestamp: DatetimeValue =
|
71
|
+
objectTimestamp: DatetimeValue = _dc.field(default_factory=lambda: DatetimeValue())
|
72
72
|
|
73
73
|
"""Timestamp for when this version of the object was created."""
|
74
74
|
|
75
|
-
tagVersion: int =
|
75
|
+
tagVersion: int = 0
|
76
76
|
|
77
77
|
"""Version of this tag."""
|
78
78
|
|
79
|
-
tagTimestamp: DatetimeValue =
|
79
|
+
tagTimestamp: DatetimeValue = _dc.field(default_factory=lambda: DatetimeValue())
|
80
80
|
|
81
81
|
"""Timestamp for when this version of the tag was created."""
|
82
82
|
|
83
|
-
isLatestObject: bool =
|
83
|
+
isLatestObject: bool = False
|
84
84
|
|
85
85
|
"""isLatest flag for the object the tag is associated with."""
|
86
86
|
|
87
|
-
isLatestTag: bool =
|
87
|
+
isLatestTag: bool = False
|
88
88
|
|
89
89
|
"""isLatest flag for the tag."""
|
90
90
|
|
@@ -132,7 +132,7 @@ class TagSelector:
|
|
132
132
|
:class:`ObjectType <ObjectType>`
|
133
133
|
"""
|
134
134
|
|
135
|
-
objectId: str =
|
135
|
+
objectId: str = ""
|
136
136
|
|
137
137
|
"""
|
138
138
|
Object ID of the tag being selected.
|