tracdap-runtime 0.6.6__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 +6 -5
- tracdap/rt/_exec/dev_mode.py +6 -5
- tracdap/rt/_exec/engine.py +6 -5
- tracdap/rt/_exec/functions.py +6 -5
- tracdap/rt/_exec/graph.py +6 -5
- tracdap/rt/_exec/graph_builder.py +6 -5
- tracdap/rt/_exec/runtime.py +6 -5
- tracdap/rt/_exec/server.py +6 -5
- tracdap/rt/_impl/__init__.py +6 -5
- tracdap/rt/_impl/config_parser.py +6 -5
- tracdap/rt/_impl/data.py +6 -5
- tracdap/rt/_impl/ext/__init__.py +6 -5
- tracdap/rt/_impl/ext/sql.py +6 -5
- tracdap/rt/_impl/ext/storage.py +6 -5
- tracdap/rt/_impl/grpc/__init__.py +6 -5
- tracdap/rt/_impl/grpc/codec.py +6 -5
- 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 +6 -5
- tracdap/rt/_impl/storage.py +6 -5
- tracdap/rt/_impl/type_system.py +6 -5
- tracdap/rt/_impl/util.py +6 -5
- tracdap/rt/_impl/validation.py +6 -5
- 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 +6 -5
- tracdap/rt/_plugins/storage_sql_dialects.py +6 -5
- tracdap/rt/_version.py +7 -6
- tracdap/rt/api/__init__.py +23 -5
- tracdap/rt/api/experimental.py +6 -5
- tracdap/rt/api/hook.py +6 -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/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 +50 -51
- 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.6.dist-info → tracdap_runtime-0.7.0rc1.dist-info}/LICENSE +1 -1
- {tracdap_runtime-0.6.6.dist-info → tracdap_runtime-0.7.0rc1.dist-info}/METADATA +2 -2
- tracdap_runtime-0.7.0rc1.dist-info/RECORD +121 -0
- {tracdap_runtime-0.6.6.dist-info → tracdap_runtime-0.7.0rc1.dist-info}/WHEEL +1 -1
- tracdap_runtime-0.6.6.dist-info/RECORD +0 -121
- {tracdap_runtime-0.6.6.dist-info → tracdap_runtime-0.7.0rc1.dist-info}/top_level.txt +0 -0
tracdap/rt/config/platform.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,124 +35,124 @@ class DeploymentLayout(_enum.Enum):
|
|
36
35
|
@_dc.dataclass
|
37
36
|
class PlatformConfig:
|
38
37
|
|
39
|
-
config: _tp.Dict[str, str] = _dc.field(default_factory=dict)
|
38
|
+
config: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
|
40
39
|
|
41
|
-
platformInfo: PlatformInfo = _dc.field(default_factory=lambda: PlatformInfo())
|
40
|
+
platformInfo: "PlatformInfo" = _dc.field(default_factory=lambda: PlatformInfo())
|
42
41
|
|
43
|
-
authentication: AuthenticationConfig = _dc.field(default_factory=lambda: AuthenticationConfig())
|
42
|
+
authentication: "AuthenticationConfig" = _dc.field(default_factory=lambda: AuthenticationConfig())
|
44
43
|
|
45
|
-
metadata: MetadataConfig = _dc.field(default_factory=lambda: MetadataConfig())
|
44
|
+
metadata: "MetadataConfig" = _dc.field(default_factory=lambda: MetadataConfig())
|
46
45
|
|
47
|
-
storage: StorageConfig = _dc.field(default_factory=lambda: StorageConfig())
|
46
|
+
storage: "StorageConfig" = _dc.field(default_factory=lambda: StorageConfig())
|
48
47
|
|
49
|
-
repositories: _tp.Dict[str, PluginConfig] = _dc.field(default_factory=dict)
|
48
|
+
repositories: "_tp.Dict[str, PluginConfig]" = _dc.field(default_factory=dict)
|
50
49
|
|
51
|
-
executor: PluginConfig = _dc.field(default_factory=lambda: PluginConfig())
|
50
|
+
executor: "PluginConfig" = _dc.field(default_factory=lambda: PluginConfig())
|
52
51
|
|
53
|
-
jobCache: PluginConfig = _dc.field(default_factory=lambda: PluginConfig())
|
52
|
+
jobCache: "PluginConfig" = _dc.field(default_factory=lambda: PluginConfig())
|
54
53
|
|
55
|
-
tenants: _tp.Dict[str, TenantConfig] = _dc.field(default_factory=dict)
|
54
|
+
tenants: "_tp.Dict[str, TenantConfig]" = _dc.field(default_factory=dict)
|
56
55
|
|
57
|
-
webServer: _tp.Optional[WebServerConfig] = None
|
56
|
+
webServer: "_tp.Optional[WebServerConfig]" = None
|
58
57
|
|
59
|
-
gateway: _tp.Optional[GatewayConfig] = None
|
58
|
+
gateway: "_tp.Optional[GatewayConfig]" = None
|
60
59
|
|
61
|
-
services: _tp.Dict[str, ServiceConfig] = _dc.field(default_factory=dict)
|
60
|
+
services: "_tp.Dict[str, ServiceConfig]" = _dc.field(default_factory=dict)
|
62
61
|
|
63
|
-
deployment: DeploymentConfig = _dc.field(default_factory=lambda: DeploymentConfig())
|
62
|
+
deployment: "DeploymentConfig" = _dc.field(default_factory=lambda: DeploymentConfig())
|
64
63
|
|
65
64
|
|
66
65
|
@_dc.dataclass
|
67
66
|
class MetadataConfig:
|
68
67
|
|
69
|
-
database: PluginConfig = _dc.field(default_factory=lambda: PluginConfig())
|
68
|
+
database: "PluginConfig" = _dc.field(default_factory=lambda: PluginConfig())
|
70
69
|
|
71
|
-
format: metadata.MetadataFormat = metadata.MetadataFormat.METADATA_FORMAT_NOT_SET
|
70
|
+
format: "metadata.MetadataFormat" = metadata.MetadataFormat.METADATA_FORMAT_NOT_SET
|
72
71
|
|
73
72
|
|
74
73
|
@_dc.dataclass
|
75
74
|
class TenantConfig:
|
76
75
|
|
77
|
-
defaultBucket: _tp.Optional[str] = None
|
76
|
+
defaultBucket: "_tp.Optional[str]" = None
|
78
77
|
|
79
|
-
defaultFormat: _tp.Optional[str] = None
|
78
|
+
defaultFormat: "_tp.Optional[str]" = None
|
80
79
|
|
81
80
|
|
82
81
|
@_dc.dataclass
|
83
82
|
class WebServerConfig:
|
84
83
|
|
85
|
-
enabled: bool = False
|
84
|
+
enabled: "bool" = False
|
86
85
|
|
87
|
-
contentRoot: PluginConfig = _dc.field(default_factory=lambda: PluginConfig())
|
86
|
+
contentRoot: "PluginConfig" = _dc.field(default_factory=lambda: PluginConfig())
|
88
87
|
|
89
|
-
rewriteRules: _tp.List[WebServerRewriteRule] = _dc.field(default_factory=list)
|
88
|
+
rewriteRules: "_tp.List[WebServerRewriteRule]" = _dc.field(default_factory=list)
|
90
89
|
|
91
|
-
redirects: _tp.List[WebServerRedirect] = _dc.field(default_factory=list)
|
90
|
+
redirects: "_tp.List[WebServerRedirect]" = _dc.field(default_factory=list)
|
92
91
|
|
93
92
|
|
94
93
|
@_dc.dataclass
|
95
94
|
class WebServerRewriteRule:
|
96
95
|
|
97
|
-
source: str = ""
|
96
|
+
source: "str" = ""
|
98
97
|
|
99
|
-
target: str = ""
|
98
|
+
target: "str" = ""
|
100
99
|
|
101
100
|
|
102
101
|
@_dc.dataclass
|
103
102
|
class WebServerRedirect:
|
104
103
|
|
105
|
-
source: str = ""
|
104
|
+
source: "str" = ""
|
106
105
|
|
107
|
-
target: str = ""
|
106
|
+
target: "str" = ""
|
108
107
|
|
109
|
-
status: int = 0
|
108
|
+
status: "int" = 0
|
110
109
|
|
111
110
|
|
112
111
|
@_dc.dataclass
|
113
112
|
class GatewayConfig:
|
114
113
|
|
115
|
-
idleTimeout: int = 0
|
114
|
+
idleTimeout: "int" = 0
|
116
115
|
|
117
|
-
routes: _tp.List[RouteConfig] = _dc.field(default_factory=list)
|
116
|
+
routes: "_tp.List[RouteConfig]" = _dc.field(default_factory=list)
|
118
117
|
|
119
|
-
redirects: _tp.List[WebServerRedirect] = _dc.field(default_factory=list)
|
118
|
+
redirects: "_tp.List[WebServerRedirect]" = _dc.field(default_factory=list)
|
120
119
|
|
121
120
|
|
122
121
|
@_dc.dataclass
|
123
122
|
class RouteConfig:
|
124
123
|
|
125
|
-
routeName: str = ""
|
124
|
+
routeName: "str" = ""
|
126
125
|
|
127
|
-
routeType: RoutingProtocol = RoutingProtocol.PROTOCOL_NOT_SET
|
126
|
+
routeType: "RoutingProtocol" = RoutingProtocol.PROTOCOL_NOT_SET
|
128
127
|
|
129
|
-
protocols: _tp.List[RoutingProtocol] = _dc.field(default_factory=list)
|
128
|
+
protocols: "_tp.List[RoutingProtocol]" = _dc.field(default_factory=list)
|
130
129
|
|
131
|
-
match: RoutingMatch = _dc.field(default_factory=lambda: RoutingMatch())
|
130
|
+
match: "RoutingMatch" = _dc.field(default_factory=lambda: RoutingMatch())
|
132
131
|
|
133
|
-
target: RoutingTarget = _dc.field(default_factory=lambda: RoutingTarget())
|
132
|
+
target: "RoutingTarget" = _dc.field(default_factory=lambda: RoutingTarget())
|
134
133
|
|
135
134
|
|
136
135
|
@_dc.dataclass
|
137
136
|
class RoutingMatch:
|
138
137
|
|
139
|
-
host: str = ""
|
138
|
+
host: "str" = ""
|
140
139
|
|
141
|
-
path: str = ""
|
140
|
+
path: "str" = ""
|
142
141
|
|
143
142
|
|
144
143
|
@_dc.dataclass
|
145
144
|
class RoutingTarget:
|
146
145
|
|
147
|
-
scheme: str = ""
|
146
|
+
scheme: "str" = ""
|
148
147
|
|
149
|
-
host: str = ""
|
148
|
+
host: "str" = ""
|
150
149
|
|
151
|
-
port: int = 0
|
150
|
+
port: "int" = 0
|
152
151
|
|
153
|
-
path: str = ""
|
152
|
+
path: "str" = ""
|
154
153
|
|
155
154
|
|
156
155
|
@_dc.dataclass
|
157
156
|
class DeploymentConfig:
|
158
157
|
|
159
|
-
layout: DeploymentLayout = DeploymentLayout.LAYOUT_NOT_SET
|
158
|
+
layout: "DeploymentLayout" = DeploymentLayout.LAYOUT_NOT_SET
|
tracdap/rt/config/result.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
|
@@ -12,16 +11,16 @@ import tracdap.rt.metadata as metadata
|
|
12
11
|
@_dc.dataclass
|
13
12
|
class TagUpdateList:
|
14
13
|
|
15
|
-
attrs: _tp.List[metadata.TagUpdate] = _dc.field(default_factory=list)
|
14
|
+
attrs: "_tp.List[metadata.TagUpdate]" = _dc.field(default_factory=list)
|
16
15
|
|
17
16
|
|
18
17
|
@_dc.dataclass
|
19
18
|
class JobResult:
|
20
19
|
|
21
|
-
jobId: metadata.TagHeader = _dc.field(default_factory=lambda: metadata.TagHeader())
|
20
|
+
jobId: "metadata.TagHeader" = _dc.field(default_factory=lambda: metadata.TagHeader())
|
22
21
|
|
23
|
-
statusCode: metadata.JobStatusCode = metadata.JobStatusCode.JOB_STATUS_CODE_NOT_SET
|
22
|
+
statusCode: "metadata.JobStatusCode" = metadata.JobStatusCode.JOB_STATUS_CODE_NOT_SET
|
24
23
|
|
25
|
-
statusMessage: str = ""
|
24
|
+
statusMessage: "str" = ""
|
26
25
|
|
27
|
-
results: _tp.Dict[str, metadata.ObjectDefinition] = _dc.field(default_factory=dict)
|
26
|
+
results: "_tp.Dict[str, metadata.ObjectDefinition]" = _dc.field(default_factory=dict)
|
tracdap/rt/config/runtime.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
|
@@ -12,18 +11,18 @@ from .common import * # noqa
|
|
12
11
|
@_dc.dataclass
|
13
12
|
class RuntimeConfig:
|
14
13
|
|
15
|
-
config: _tp.Dict[str, str] = _dc.field(default_factory=dict)
|
14
|
+
config: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
|
16
15
|
|
17
|
-
storage: StorageConfig = _dc.field(default_factory=lambda: StorageConfig())
|
16
|
+
storage: "StorageConfig" = _dc.field(default_factory=lambda: StorageConfig())
|
18
17
|
|
19
|
-
repositories: _tp.Dict[str, PluginConfig] = _dc.field(default_factory=dict)
|
18
|
+
repositories: "_tp.Dict[str, PluginConfig]" = _dc.field(default_factory=dict)
|
20
19
|
|
21
|
-
sparkSettings: SparkSettings = _dc.field(default_factory=lambda: SparkSettings())
|
20
|
+
sparkSettings: "SparkSettings" = _dc.field(default_factory=lambda: SparkSettings())
|
22
21
|
|
23
|
-
runtimeApi: ServiceConfig = _dc.field(default_factory=lambda: ServiceConfig())
|
22
|
+
runtimeApi: "ServiceConfig" = _dc.field(default_factory=lambda: ServiceConfig())
|
24
23
|
|
25
24
|
|
26
25
|
@_dc.dataclass
|
27
26
|
class SparkSettings:
|
28
27
|
|
29
|
-
sparkProps: _tp.Dict[str, str] = _dc.field(default_factory=dict)
|
28
|
+
sparkProps: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
|
tracdap/rt/exceptions.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
1
|
+
# Licensed to the Fintech Open Source Foundation (FINOS) under one or
|
2
|
+
# more contributor license agreements. See the NOTICE file distributed
|
3
|
+
# with this work for additional information regarding copyright ownership.
|
4
|
+
# FINOS licenses this file to you under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with the
|
6
|
+
# License. You may obtain a copy of the License at
|
6
7
|
#
|
7
8
|
# http://www.apache.org/licenses/LICENSE-2.0
|
8
9
|
#
|
@@ -13,6 +14,11 @@
|
|
13
14
|
# limitations under the License.
|
14
15
|
|
15
16
|
|
17
|
+
"""
|
18
|
+
Error types raised by the TRAC runtime
|
19
|
+
"""
|
20
|
+
|
21
|
+
|
16
22
|
class ETrac(Exception):
|
17
23
|
|
18
24
|
"""
|
@@ -166,8 +172,8 @@ class EDataCorruption(EData):
|
|
166
172
|
structure of the binary data stream and will be detected if that data stream cannot be
|
167
173
|
understood.
|
168
174
|
|
169
|
-
Data corruption does not include data constraints, such as non-null
|
170
|
-
which are reported as
|
175
|
+
Data corruption does not include errors relating to data constraints, such as non-null
|
176
|
+
or range constraints, which are reported as :py:class:`EDataConformance`.
|
171
177
|
"""
|
172
178
|
|
173
179
|
pass
|
tracdap/rt/ext/__init__.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
1
|
+
# Licensed to the Fintech Open Source Foundation (FINOS) under one or
|
2
|
+
# more contributor license agreements. See the NOTICE file distributed
|
3
|
+
# with this work for additional information regarding copyright ownership.
|
4
|
+
# FINOS licenses this file to you under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with the
|
6
|
+
# License. You may obtain a copy of the License at
|
6
7
|
#
|
7
8
|
# http://www.apache.org/licenses/LICENSE-2.0
|
8
9
|
#
|
tracdap/rt/ext/config.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
1
|
+
# Licensed to the Fintech Open Source Foundation (FINOS) under one or
|
2
|
+
# more contributor license agreements. See the NOTICE file distributed
|
3
|
+
# with this work for additional information regarding copyright ownership.
|
4
|
+
# FINOS licenses this file to you under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with the
|
6
|
+
# License. You may obtain a copy of the License at
|
6
7
|
#
|
7
8
|
# http://www.apache.org/licenses/LICENSE-2.0
|
8
9
|
#
|
tracdap/rt/ext/embed.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
1
|
+
# Licensed to the Fintech Open Source Foundation (FINOS) under one or
|
2
|
+
# more contributor license agreements. See the NOTICE file distributed
|
3
|
+
# with this work for additional information regarding copyright ownership.
|
4
|
+
# FINOS licenses this file to you under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with the
|
6
|
+
# License. You may obtain a copy of the License at
|
6
7
|
#
|
7
8
|
# http://www.apache.org/licenses/LICENSE-2.0
|
8
9
|
#
|
tracdap/rt/ext/plugins.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
1
|
+
# Licensed to the Fintech Open Source Foundation (FINOS) under one or
|
2
|
+
# more contributor license agreements. See the NOTICE file distributed
|
3
|
+
# with this work for additional information regarding copyright ownership.
|
4
|
+
# FINOS licenses this file to you under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with the
|
6
|
+
# License. You may obtain a copy of the License at
|
6
7
|
#
|
7
8
|
# http://www.apache.org/licenses/LICENSE-2.0
|
8
9
|
#
|
tracdap/rt/ext/repos.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
1
|
+
# Licensed to the Fintech Open Source Foundation (FINOS) under one or
|
2
|
+
# more contributor license agreements. See the NOTICE file distributed
|
3
|
+
# with this work for additional information regarding copyright ownership.
|
4
|
+
# FINOS licenses this file to you under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with the
|
6
|
+
# License. You may obtain a copy of the License at
|
6
7
|
#
|
7
8
|
# http://www.apache.org/licenses/LICENSE-2.0
|
8
9
|
#
|
tracdap/rt/ext/storage.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
1
|
+
# Licensed to the Fintech Open Source Foundation (FINOS) under one or
|
2
|
+
# more contributor license agreements. See the NOTICE file distributed
|
3
|
+
# with this work for additional information regarding copyright ownership.
|
4
|
+
# FINOS licenses this file to you under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with the
|
6
|
+
# License. You may obtain a copy of the License at
|
6
7
|
#
|
7
8
|
# http://www.apache.org/licenses/LICENSE-2.0
|
8
9
|
#
|
tracdap/rt/launch/__init__.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
1
|
+
# Licensed to the Fintech Open Source Foundation (FINOS) under one or
|
2
|
+
# more contributor license agreements. See the NOTICE file distributed
|
3
|
+
# with this work for additional information regarding copyright ownership.
|
4
|
+
# FINOS licenses this file to you under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with the
|
6
|
+
# License. You may obtain a copy of the License at
|
6
7
|
#
|
7
8
|
# http://www.apache.org/licenses/LICENSE-2.0
|
8
9
|
#
|
@@ -12,5 +13,9 @@
|
|
12
13
|
# See the License for the specific language governing permissions and
|
13
14
|
# limitations under the License.
|
14
15
|
|
16
|
+
"""
|
17
|
+
Helper functions for launching models
|
18
|
+
"""
|
19
|
+
|
15
20
|
from .launch import launch_model
|
16
21
|
from .launch import launch_job
|
tracdap/rt/launch/__main__.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
1
|
+
# Licensed to the Fintech Open Source Foundation (FINOS) under one or
|
2
|
+
# more contributor license agreements. See the NOTICE file distributed
|
3
|
+
# with this work for additional information regarding copyright ownership.
|
4
|
+
# FINOS licenses this file to you under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with the
|
6
|
+
# License. You may obtain a copy of the License at
|
6
7
|
#
|
7
8
|
# http://www.apache.org/licenses/LICENSE-2.0
|
8
9
|
#
|
tracdap/rt/launch/cli.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
1
|
+
# Licensed to the Fintech Open Source Foundation (FINOS) under one or
|
2
|
+
# more contributor license agreements. See the NOTICE file distributed
|
3
|
+
# with this work for additional information regarding copyright ownership.
|
4
|
+
# FINOS licenses this file to you under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with the
|
6
|
+
# License. You may obtain a copy of the License at
|
6
7
|
#
|
7
8
|
# http://www.apache.org/licenses/LICENSE-2.0
|
8
9
|
#
|
tracdap/rt/launch/launch.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
1
|
+
# Licensed to the Fintech Open Source Foundation (FINOS) under one or
|
2
|
+
# more contributor license agreements. See the NOTICE file distributed
|
3
|
+
# with this work for additional information regarding copyright ownership.
|
4
|
+
# FINOS licenses this file to you under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with the
|
6
|
+
# License. You may obtain a copy of the License at
|
6
7
|
#
|
7
8
|
# http://www.apache.org/licenses/LICENSE-2.0
|
8
9
|
#
|
@@ -68,18 +69,19 @@ def _optional_arg(launch_args: _tp.Dict[str, _tp.Any], arg_name: str) -> _tp.Any
|
|
68
69
|
|
69
70
|
def launch_model(
|
70
71
|
model_class: _api.TracModel.__class__,
|
71
|
-
job_config: _tp.Union[
|
72
|
-
sys_config: _tp.Union[
|
72
|
+
job_config: _tp.Union[_pathlib.Path, str],
|
73
|
+
sys_config: _tp.Union[_pathlib.Path, str],
|
73
74
|
**launch_args):
|
74
75
|
|
75
76
|
"""
|
76
77
|
Launch an individual model using its Python class
|
77
78
|
|
78
|
-
This
|
79
|
+
This function launches the supplied model class directly, it must be called
|
79
80
|
from the Python codebase containing the model class. The TRAC runtime will launch
|
80
|
-
|
81
|
-
|
82
|
-
|
81
|
+
in dev mode and execute the model inside the current Python process, a minimal
|
82
|
+
job definition and set of local resources will be configured automatically.
|
83
|
+
This method is useful for launching models during local development
|
84
|
+
for debugging and testing.
|
83
85
|
|
84
86
|
To resolve the paths of the job and system config files, paths are tried in the
|
85
87
|
following order:
|
@@ -91,7 +93,11 @@ def launch_model(
|
|
91
93
|
:param model_class: The model class that will be launched
|
92
94
|
:param job_config: Path to the job configuration file
|
93
95
|
:param sys_config: Path to the system configuration file
|
94
|
-
:param launch_args: Additional
|
96
|
+
:param launch_args: Additional arguments to control behavior of the TRAC runtime (not normally required)
|
97
|
+
|
98
|
+
:type model_class: :py:class:`TracModel.__class__ <tracdap.rt.api.TracModel>`
|
99
|
+
:type job_config: :py:class:`pathlib.Path` | str
|
100
|
+
:type sys_config: :py:class:`pathlib.Path` | str
|
95
101
|
"""
|
96
102
|
|
97
103
|
model_file = _inspect.getfile(model_class)
|
@@ -114,18 +120,35 @@ def launch_model(
|
|
114
120
|
|
115
121
|
|
116
122
|
def launch_job(
|
117
|
-
job_config: _tp.Union[
|
118
|
-
sys_config: _tp.Union[
|
123
|
+
job_config: _tp.Union[_pathlib.Path, str],
|
124
|
+
sys_config: _tp.Union[_pathlib.Path, str],
|
119
125
|
dev_mode: bool = False,
|
120
126
|
**launch_args):
|
121
127
|
|
122
128
|
"""
|
123
129
|
Launch a TRAC job using external configuration files
|
124
130
|
|
131
|
+
This function launches the job definition supplied in the job_config file,
|
132
|
+
which must contain enough information to describe the job along with any
|
133
|
+
models and other resources that it needs. It allows for running more complex
|
134
|
+
job types such as :py:class:`JobType.RUN_FLOW <tracdap.rt.metadata.JobType>`
|
135
|
+
and can be used for local development by setting dev_mode = True. If the job
|
136
|
+
depends on external resources, those must be specified in the sys_config file.
|
137
|
+
|
138
|
+
To resolve the paths of the job and system config files, paths are tried in the
|
139
|
+
following order:
|
140
|
+
|
141
|
+
1. If an absolute path is supplied, this takes priority
|
142
|
+
2. Resolve relative to the current working directory
|
143
|
+
|
125
144
|
:param job_config: Path to the job configuration file
|
126
145
|
:param sys_config: Path to the system configuration file
|
127
146
|
:param dev_mode: Whether to launch in dev mode (applies dev mode translation to the job inputs)
|
128
|
-
:param launch_args: Additional
|
147
|
+
:param launch_args: Additional arguments to control behavior of the TRAC runtime (not normally required)
|
148
|
+
|
149
|
+
:type job_config: :py:class:`pathlib.Path` | str
|
150
|
+
:type sys_config: :py:class:`pathlib.Path` | str
|
151
|
+
:type dev_mode: bool
|
129
152
|
"""
|
130
153
|
|
131
154
|
_sys_config = _resolve_config_file(sys_config, None)
|
tracdap/rt/metadata/common.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
|
@@ -49,10 +48,10 @@ class TenantInfo:
|
|
49
48
|
|
50
49
|
"""Information about a tenant that is set up on the TRAC platform."""
|
51
50
|
|
52
|
-
tenantCode: str = ""
|
51
|
+
tenantCode: "str" = ""
|
53
52
|
|
54
53
|
"""* Unique code used to identify the tenant, required by most API calls."""
|
55
54
|
|
56
|
-
description: str = ""
|
55
|
+
description: "str" = ""
|
57
56
|
|
58
57
|
"""* A short description of the tenant, suitable for displaying to users in lists."""
|
tracdap/rt/metadata/custom.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
|
@@ -11,8 +10,8 @@ class CustomDefinition:
|
|
11
10
|
|
12
11
|
"""Define a custom object that can be stored and managed in the TRAC metadata store"""
|
13
12
|
|
14
|
-
customSchemaType: str = ""
|
13
|
+
customSchemaType: "str" = ""
|
15
14
|
|
16
|
-
customSchemaVersion: int = 0
|
15
|
+
customSchemaVersion: "int" = 0
|
17
16
|
|
18
|
-
customData: bytes = b""
|
17
|
+
customData: "bytes" = b""
|