tracdap-runtime 0.9.0b1__py3-none-any.whl → 0.9.0b2__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/_impl/core/config_parser.py +29 -3
- tracdap/rt/_impl/core/data.py +93 -51
- tracdap/rt/_impl/core/repos.py +15 -13
- tracdap/rt/_impl/core/storage.py +17 -12
- tracdap/rt/_impl/core/struct.py +254 -60
- tracdap/rt/_impl/core/util.py +94 -23
- tracdap/rt/_impl/exec/context.py +35 -8
- tracdap/rt/_impl/exec/dev_mode.py +60 -40
- tracdap/rt/_impl/exec/engine.py +44 -50
- tracdap/rt/_impl/exec/functions.py +12 -8
- tracdap/rt/_impl/exec/graph.py +3 -3
- tracdap/rt/_impl/exec/graph_builder.py +22 -5
- tracdap/rt/_impl/grpc/codec.py +4 -11
- tracdap/rt/_impl/grpc/tracdap/metadata/data_pb2.py +36 -34
- tracdap/rt/_impl/grpc/tracdap/metadata/data_pb2.pyi +37 -43
- tracdap/rt/_impl/grpc/tracdap/metadata/job_pb2.py +64 -64
- tracdap/rt/_impl/grpc/tracdap/metadata/type_pb2.py +22 -18
- tracdap/rt/_impl/grpc/tracdap/metadata/type_pb2.pyi +15 -2
- tracdap/rt/_impl/runtime.py +2 -16
- tracdap/rt/_impl/static_api.py +5 -6
- tracdap/rt/_plugins/format_csv.py +2 -2
- tracdap/rt/_plugins/storage_aws.py +165 -150
- tracdap/rt/_plugins/storage_azure.py +17 -11
- tracdap/rt/_plugins/storage_gcp.py +35 -18
- tracdap/rt/_version.py +1 -1
- tracdap/rt/api/model_api.py +45 -0
- tracdap/rt/config/__init__.py +8 -10
- tracdap/rt/config/common.py +0 -16
- tracdap/rt/config/job.py +4 -0
- tracdap/rt/config/platform.py +9 -32
- tracdap/rt/config/runtime.py +4 -11
- tracdap/rt/config/tenant.py +28 -0
- tracdap/rt/launch/cli.py +0 -8
- tracdap/rt/launch/launch.py +1 -3
- tracdap/rt/metadata/__init__.py +18 -19
- tracdap/rt/metadata/data.py +19 -31
- tracdap/rt/metadata/job.py +1 -1
- tracdap/rt/metadata/type.py +9 -5
- {tracdap_runtime-0.9.0b1.dist-info → tracdap_runtime-0.9.0b2.dist-info}/METADATA +3 -3
- {tracdap_runtime-0.9.0b1.dist-info → tracdap_runtime-0.9.0b2.dist-info}/RECORD +43 -42
- {tracdap_runtime-0.9.0b1.dist-info → tracdap_runtime-0.9.0b2.dist-info}/WHEEL +1 -1
- {tracdap_runtime-0.9.0b1.dist-info → tracdap_runtime-0.9.0b2.dist-info}/licenses/LICENSE +0 -0
- {tracdap_runtime-0.9.0b1.dist-info → tracdap_runtime-0.9.0b2.dist-info}/top_level.txt +0 -0
tracdap/rt/api/model_api.py
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
# limitations under the License.
|
15
15
|
|
16
16
|
import abc as _abc
|
17
|
+
import dataclasses as _dc
|
17
18
|
import typing as _tp
|
18
19
|
import logging as _logging
|
19
20
|
|
@@ -35,6 +36,25 @@ if _tp.TYPE_CHECKING:
|
|
35
36
|
pass
|
36
37
|
|
37
38
|
|
39
|
+
@_dc.dataclass(frozen=True)
|
40
|
+
class RuntimeMetadata:
|
41
|
+
|
42
|
+
"""
|
43
|
+
The metadata associated with a TRAC object, made available for models at runtime
|
44
|
+
|
45
|
+
The metadata available for a particular object depends on the current job configuration, as
|
46
|
+
well as the type of object. For example, a model input supplied from a TRAC dataset will
|
47
|
+
have the metadata of that dataset available, but data passed into a model as an intermediate
|
48
|
+
dataset in a flow might not have an ID or any attributes.
|
49
|
+
"""
|
50
|
+
|
51
|
+
objectId: _tp.Optional[TagHeader] = None
|
52
|
+
"""TRAC object ID of the current object (if available)"""
|
53
|
+
|
54
|
+
attributes: _tp.Dict[str, _tp.Any] = _dc.field(default_factory=dict)
|
55
|
+
"""TRAC metadata attributes of the current object (if available)"""
|
56
|
+
|
57
|
+
|
38
58
|
class TracContext(metaclass=_abc.ABCMeta):
|
39
59
|
|
40
60
|
"""
|
@@ -202,6 +222,31 @@ class TracContext(metaclass=_abc.ABCMeta):
|
|
202
222
|
|
203
223
|
pass
|
204
224
|
|
225
|
+
def get_metadata(self, item_name: str) -> _tp.Optional[RuntimeMetadata]:
|
226
|
+
|
227
|
+
"""
|
228
|
+
Get the TRAC metadata associated with a model input.
|
229
|
+
|
230
|
+
Metadata is available for inputs supplied from real TRAC objects, including
|
231
|
+
both :py:attr:`DATA <tracdap.rt.metadata.ObjectType.DATA>` and
|
232
|
+
:py:attr:`FILE <tracdap.rt.metadata.ObjectType.DATA>` objects.
|
233
|
+
|
234
|
+
Calling :py:meth:`get_metadata()` for objects that are not inputs will return null,
|
235
|
+
since parameters have no metadata and output metadata does not exist until after a job completes.
|
236
|
+
:py:meth:`get_metadata()` will also return null for inputs supplied from other models
|
237
|
+
as intermediates in a flow, since these also have no persistent metadata.
|
238
|
+
|
239
|
+
Attempting to access metadata for objects that do not exist, including outputs that
|
240
|
+
have not been put yet, is an error.
|
241
|
+
|
242
|
+
:param item_name: The name of the file or dataset to get metadata for
|
243
|
+
:return: Runtime metadata for the named item, or None if no metadata is available
|
244
|
+
:type item_name: str
|
245
|
+
:rtype: :py:class:`RuntimeMetadata <tracdap.rt.api.RuntimeMetadata>`
|
246
|
+
"""
|
247
|
+
|
248
|
+
pass
|
249
|
+
|
205
250
|
def put_schema(self, dataset_name: str, schema: SchemaDefinition):
|
206
251
|
|
207
252
|
"""
|
tracdap/rt/config/__init__.py
CHANGED
@@ -1,30 +1,28 @@
|
|
1
1
|
# Code generated by TRAC
|
2
2
|
|
3
|
-
from .
|
4
|
-
from .
|
3
|
+
from .tenant import TenantConfigMap
|
4
|
+
from .tenant import TenantConfig
|
5
5
|
|
6
6
|
from .common import _ConfigFile
|
7
7
|
from .common import PluginConfig
|
8
8
|
from .common import PlatformInfo
|
9
|
-
from .common import StorageConfig
|
10
9
|
from .common import ServiceConfig
|
11
10
|
|
11
|
+
from .runtime import RuntimeConfig
|
12
|
+
|
13
|
+
from .result import JobResultAttrs
|
14
|
+
from .result import JobResult
|
15
|
+
|
12
16
|
from .platform import RoutingProtocol
|
13
17
|
from .platform import DeploymentLayout
|
14
18
|
from .platform import PlatformConfig
|
15
|
-
from .platform import MetadataConfig
|
16
|
-
from .platform import TenantConfig
|
17
19
|
from .platform import GatewayConfig
|
18
20
|
from .platform import GatewayRedirect
|
19
21
|
from .platform import RouteConfig
|
20
22
|
from .platform import RoutingMatch
|
21
23
|
from .platform import RoutingTarget
|
22
24
|
from .platform import DeploymentConfig
|
23
|
-
from .platform import ClientConfig
|
24
25
|
|
25
|
-
from .
|
26
|
-
from .runtime import SparkSettings
|
26
|
+
from .dynamic import DynamicConfig
|
27
27
|
|
28
28
|
from .job import JobConfig
|
29
|
-
|
30
|
-
from .dynamic import DynamicConfig
|
tracdap/rt/config/common.py
CHANGED
@@ -36,22 +36,6 @@ class PlatformInfo:
|
|
36
36
|
deploymentInfo: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
|
37
37
|
|
38
38
|
|
39
|
-
@_dc.dataclass
|
40
|
-
class StorageConfig:
|
41
|
-
|
42
|
-
buckets: "_tp.Dict[str, PluginConfig]" = _dc.field(default_factory=dict)
|
43
|
-
|
44
|
-
"""TODO: Rename "buckets" as "internal" for 0.7"""
|
45
|
-
|
46
|
-
external: "_tp.Dict[str, PluginConfig]" = _dc.field(default_factory=dict)
|
47
|
-
|
48
|
-
defaultBucket: "str" = ""
|
49
|
-
|
50
|
-
defaultFormat: "str" = ""
|
51
|
-
|
52
|
-
defaultLayout: "metadata.StorageLayout" = metadata.StorageLayout.OBJECT_ID_LAYOUT
|
53
|
-
|
54
|
-
|
55
39
|
@_dc.dataclass
|
56
40
|
class ServiceConfig:
|
57
41
|
|
tracdap/rt/config/job.py
CHANGED
@@ -30,3 +30,7 @@ class JobConfig:
|
|
30
30
|
"""Preallocated IDs for job outputs"""
|
31
31
|
|
32
32
|
preallocatedIds: "_tp.List[metadata.TagHeader]" = _dc.field(default_factory=list)
|
33
|
+
|
34
|
+
properties: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
|
35
|
+
|
36
|
+
"""Allow setting per-job configuration"""
|
tracdap/rt/config/platform.py
CHANGED
@@ -6,6 +6,7 @@ import enum as _enum # noqa
|
|
6
6
|
|
7
7
|
import tracdap.rt.metadata as metadata
|
8
8
|
from .common import * # noqa
|
9
|
+
from .tenant import * # noqa
|
9
10
|
|
10
11
|
|
11
12
|
class RoutingProtocol(_enum.Enum):
|
@@ -20,6 +21,8 @@ class RoutingProtocol(_enum.Enum):
|
|
20
21
|
|
21
22
|
REST = 4
|
22
23
|
|
24
|
+
INTERNAL = 5
|
25
|
+
|
23
26
|
|
24
27
|
class DeploymentLayout(_enum.Enum):
|
25
28
|
|
@@ -39,43 +42,21 @@ class PlatformConfig:
|
|
39
42
|
|
40
43
|
platformInfo: "PlatformInfo" = _dc.field(default_factory=lambda: PlatformInfo())
|
41
44
|
|
42
|
-
|
43
|
-
|
44
|
-
storage: "StorageConfig" = _dc.field(default_factory=lambda: StorageConfig())
|
45
|
-
|
46
|
-
repositories: "_tp.Dict[str, PluginConfig]" = _dc.field(default_factory=dict)
|
47
|
-
|
48
|
-
executor: "PluginConfig" = _dc.field(default_factory=lambda: PluginConfig())
|
45
|
+
metadataStore: "PluginConfig" = _dc.field(default_factory=lambda: PluginConfig())
|
49
46
|
|
50
47
|
jobCache: "PluginConfig" = _dc.field(default_factory=lambda: PluginConfig())
|
51
48
|
|
52
|
-
|
53
|
-
|
54
|
-
gateway: "GatewayConfig" = _dc.field(default_factory=lambda: GatewayConfig())
|
49
|
+
executor: "PluginConfig" = _dc.field(default_factory=lambda: PluginConfig())
|
55
50
|
|
56
51
|
services: "_tp.Dict[str, ServiceConfig]" = _dc.field(default_factory=dict)
|
57
52
|
|
58
53
|
deployment: "DeploymentConfig" = _dc.field(default_factory=lambda: DeploymentConfig())
|
59
54
|
|
60
|
-
|
55
|
+
gateway: "GatewayConfig" = _dc.field(default_factory=lambda: GatewayConfig())
|
61
56
|
|
62
57
|
extensions: "_tp.Dict[str, protobuf.Any]" = _dc.field(default_factory=dict)
|
63
58
|
|
64
|
-
|
65
|
-
@_dc.dataclass
|
66
|
-
class MetadataConfig:
|
67
|
-
|
68
|
-
database: "PluginConfig" = _dc.field(default_factory=lambda: PluginConfig())
|
69
|
-
|
70
|
-
format: "metadata.MetadataFormat" = metadata.MetadataFormat.METADATA_FORMAT_NOT_SET
|
71
|
-
|
72
|
-
|
73
|
-
@_dc.dataclass
|
74
|
-
class TenantConfig:
|
75
|
-
|
76
|
-
defaultBucket: "_tp.Optional[str]" = None
|
77
|
-
|
78
|
-
defaultFormat: "_tp.Optional[str]" = None
|
59
|
+
setupTasks: "_tp.Dict[str, PluginConfig]" = _dc.field(default_factory=dict)
|
79
60
|
|
80
61
|
|
81
62
|
@_dc.dataclass
|
@@ -109,6 +90,8 @@ class RouteConfig:
|
|
109
90
|
|
110
91
|
target: "RoutingTarget" = _dc.field(default_factory=lambda: RoutingTarget())
|
111
92
|
|
93
|
+
routeKey: "str" = ""
|
94
|
+
|
112
95
|
|
113
96
|
@_dc.dataclass
|
114
97
|
class RoutingMatch:
|
@@ -136,9 +119,3 @@ class RoutingTarget:
|
|
136
119
|
class DeploymentConfig:
|
137
120
|
|
138
121
|
layout: "DeploymentLayout" = DeploymentLayout.LAYOUT_NOT_SET
|
139
|
-
|
140
|
-
|
141
|
-
@_dc.dataclass
|
142
|
-
class ClientConfig:
|
143
|
-
|
144
|
-
properties: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
|
tracdap/rt/config/runtime.py
CHANGED
@@ -4,6 +4,7 @@ import typing as _tp # noqa
|
|
4
4
|
import dataclasses as _dc # noqa
|
5
5
|
import enum as _enum # noqa
|
6
6
|
|
7
|
+
import tracdap.rt.metadata as metadata
|
7
8
|
from .common import * # noqa
|
8
9
|
|
9
10
|
|
@@ -13,18 +14,10 @@ class RuntimeConfig:
|
|
13
14
|
|
14
15
|
config: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
|
15
16
|
|
16
|
-
storage: "StorageConfig" = _dc.field(default_factory=lambda: StorageConfig())
|
17
|
-
|
18
|
-
repositories: "_tp.Dict[str, PluginConfig]" = _dc.field(default_factory=dict)
|
19
|
-
|
20
|
-
sparkSettings: "SparkSettings" = _dc.field(default_factory=lambda: SparkSettings())
|
21
|
-
|
22
|
-
runtimeApi: "ServiceConfig" = _dc.field(default_factory=lambda: ServiceConfig())
|
23
|
-
|
24
17
|
properties: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
|
25
18
|
|
19
|
+
secrets: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
|
26
20
|
|
27
|
-
|
28
|
-
class SparkSettings:
|
21
|
+
resources: "_tp.Dict[str, metadata.ResourceDefinition]" = _dc.field(default_factory=dict)
|
29
22
|
|
30
|
-
|
23
|
+
runtimeApi: "_tp.Optional[ServiceConfig]" = None
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Code generated by TRAC
|
2
|
+
|
3
|
+
import typing as _tp # noqa
|
4
|
+
import dataclasses as _dc # noqa
|
5
|
+
import enum as _enum # noqa
|
6
|
+
|
7
|
+
import tracdap.rt.metadata as metadata
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
@_dc.dataclass
|
12
|
+
class TenantConfigMap:
|
13
|
+
|
14
|
+
tenants: "_tp.Dict[str, TenantConfig]" = _dc.field(default_factory=dict)
|
15
|
+
|
16
|
+
autoActivate: "bool" = False
|
17
|
+
|
18
|
+
|
19
|
+
@_dc.dataclass
|
20
|
+
class TenantConfig:
|
21
|
+
|
22
|
+
properties: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
|
23
|
+
|
24
|
+
secrets: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
|
25
|
+
|
26
|
+
config: "_tp.Dict[str, metadata.ConfigDefinition]" = _dc.field(default_factory=dict)
|
27
|
+
|
28
|
+
resources: "_tp.Dict[str, metadata.ResourceDefinition]" = _dc.field(default_factory=dict)
|
tracdap/rt/launch/cli.py
CHANGED
@@ -35,14 +35,6 @@ def _cli_args(programmatic_args = None):
|
|
35
35
|
"--dev-mode", dest="dev_mode", default=False, action="store_true",
|
36
36
|
help="Enable development mode config translation")
|
37
37
|
|
38
|
-
parser.add_argument(
|
39
|
-
"--job-result-dir", dest="job_result_dir", type=pathlib.Path, required=False,
|
40
|
-
help="Output the result metadata for a batch job to the given directory")
|
41
|
-
|
42
|
-
parser.add_argument(
|
43
|
-
"--job-result-format", dest="job_result_format", choices=["json", "yaml", "proto"], default="json",
|
44
|
-
help="Output format for the result metadata (only meaningful if --job-result-dir is set)")
|
45
|
-
|
46
38
|
parser.add_argument(
|
47
39
|
"--scratch-dir", dest="scratch_dir", type=pathlib.Path, required=False,
|
48
40
|
help="Scratch directory for working files" +
|
tracdap/rt/launch/launch.py
CHANGED
@@ -36,7 +36,7 @@ def _resolve_config_file(
|
|
36
36
|
if isinstance(config_path, str):
|
37
37
|
scheme_sep = config_path.find(":")
|
38
38
|
# Single letter scheme is a Windows file path (C:\...)
|
39
|
-
scheme =
|
39
|
+
scheme = config_path[:scheme_sep] if scheme_sep > 1 else "file"
|
40
40
|
if scheme != "file":
|
41
41
|
return config_path
|
42
42
|
|
@@ -191,8 +191,6 @@ def launch_cli(programmatic_args: _tp.Optional[_tp.List[str]] = None):
|
|
191
191
|
runtime_instance = _runtime.TracRuntime(
|
192
192
|
_sys_config,
|
193
193
|
dev_mode=launch_args.dev_mode,
|
194
|
-
job_result_dir=launch_args.job_result_dir,
|
195
|
-
job_result_format=launch_args.job_result_format,
|
196
194
|
scratch_dir=launch_args.scratch_dir,
|
197
195
|
scratch_dir_persist=launch_args.scratch_dir_persist,
|
198
196
|
plugin_packages=launch_args.plugin_packages)
|
tracdap/rt/metadata/__init__.py
CHANGED
@@ -20,12 +20,20 @@ from .search import LogicalExpression
|
|
20
20
|
from .search import SearchExpression
|
21
21
|
from .search import SearchParameters
|
22
22
|
|
23
|
+
from .tag_update import TagOperation
|
24
|
+
from .tag_update import TagUpdate
|
25
|
+
|
26
|
+
from .custom import CustomDefinition
|
27
|
+
|
28
|
+
from .common import MetadataFormat
|
29
|
+
from .common import MetadataVersion
|
30
|
+
from .common import TenantInfo
|
31
|
+
|
23
32
|
from .data import SchemaType
|
24
33
|
from .data import PartType
|
25
34
|
from .data import FieldSchema
|
35
|
+
from .data import EnumValues
|
26
36
|
from .data import TableSchema
|
27
|
-
from .data import StructField
|
28
|
-
from .data import StructSchema
|
29
37
|
from .data import SchemaDefinition
|
30
38
|
from .data import PartKey
|
31
39
|
from .data import DataDefinition
|
@@ -39,20 +47,12 @@ from .model import ModelInputSchema
|
|
39
47
|
from .model import ModelOutputSchema
|
40
48
|
from .model import ModelDefinition
|
41
49
|
|
42
|
-
from .tag_update import TagOperation
|
43
|
-
from .tag_update import TagUpdate
|
44
|
-
|
45
50
|
from .flow import FlowNodeType
|
46
51
|
from .flow import FlowNode
|
47
52
|
from .flow import FlowSocket
|
48
53
|
from .flow import FlowEdge
|
49
54
|
from .flow import FlowDefinition
|
50
55
|
|
51
|
-
from .custom import CustomDefinition
|
52
|
-
|
53
|
-
from .resource import ResourceType
|
54
|
-
from .resource import ResourceDefinition
|
55
|
-
|
56
56
|
from .job import JobType
|
57
57
|
from .job import JobStatusCode
|
58
58
|
from .job import JobGroupType
|
@@ -67,15 +67,6 @@ from .job import JobGroup
|
|
67
67
|
from .job import SequentialJobGroup
|
68
68
|
from .job import ParallelJobGroup
|
69
69
|
|
70
|
-
from .common import MetadataFormat
|
71
|
-
from .common import MetadataVersion
|
72
|
-
from .common import TenantInfo
|
73
|
-
|
74
|
-
from .config import ConfigType
|
75
|
-
from .config import ConfigEntry
|
76
|
-
from .config import ConfigDetails
|
77
|
-
from .config import ConfigDefinition
|
78
|
-
|
79
70
|
from .storage import CopyStatus
|
80
71
|
from .storage import IncarnationStatus
|
81
72
|
from .storage import StorageLayout
|
@@ -84,6 +75,14 @@ from .storage import StorageIncarnation
|
|
84
75
|
from .storage import StorageItem
|
85
76
|
from .storage import StorageDefinition
|
86
77
|
|
78
|
+
from .resource import ResourceType
|
79
|
+
from .resource import ResourceDefinition
|
80
|
+
|
81
|
+
from .config import ConfigType
|
82
|
+
from .config import ConfigEntry
|
83
|
+
from .config import ConfigDetails
|
84
|
+
from .config import ConfigDefinition
|
85
|
+
|
87
86
|
from .object import ObjectDefinition
|
88
87
|
|
89
88
|
from .tag import Tag
|
tracdap/rt/metadata/data.py
CHANGED
@@ -25,7 +25,9 @@ class SchemaType(_enum.Enum):
|
|
25
25
|
|
26
26
|
"""Tabular data"""
|
27
27
|
|
28
|
-
|
28
|
+
TABLE_SCHEMA = 1
|
29
|
+
|
30
|
+
STRUCT_SCHEMA = 2
|
29
31
|
|
30
32
|
"""Structured objects"""
|
31
33
|
|
@@ -38,6 +40,8 @@ class PartType(_enum.Enum):
|
|
38
40
|
|
39
41
|
"""Dataset has a single partition called the root partition (this is the default)"""
|
40
42
|
|
43
|
+
NOT_PARTITIONED = 0
|
44
|
+
|
41
45
|
PART_BY_RANGE = 1
|
42
46
|
|
43
47
|
"""Partition by range over an ordered variable (not available yet)"""
|
@@ -75,47 +79,27 @@ class FieldSchema:
|
|
75
79
|
|
76
80
|
formatCode: "_tp.Optional[str]" = None
|
77
81
|
|
82
|
+
defaultValue: "_tp.Optional[Value]" = None
|
78
83
|
|
79
|
-
|
80
|
-
class TableSchema:
|
84
|
+
namedType: "_tp.Optional[str]" = None
|
81
85
|
|
82
|
-
""
|
86
|
+
namedEnum: "_tp.Optional[str]" = None
|
83
87
|
|
84
|
-
|
88
|
+
children: "_tp.List[FieldSchema]" = _dc.field(default_factory=list)
|
85
89
|
|
86
90
|
|
87
91
|
@_dc.dataclass
|
88
|
-
class
|
89
|
-
|
90
|
-
"""Schema for an individual field in a structured object dataset"""
|
91
|
-
|
92
|
-
fieldType: "TypeDescriptor" = _dc.field(default_factory=lambda: TypeDescriptor())
|
93
|
-
|
94
|
-
label: "str" = ""
|
95
|
-
|
96
|
-
businessKey: "bool" = False
|
97
|
-
|
98
|
-
categorical: "bool" = False
|
92
|
+
class EnumValues:
|
99
93
|
|
100
|
-
|
101
|
-
|
102
|
-
"""This could become mandatory with the next metadata update"""
|
103
|
-
|
104
|
-
formatCode: "_tp.Optional[str]" = None
|
105
|
-
|
106
|
-
defaultValue: "Value" = _dc.field(default_factory=lambda: Value())
|
107
|
-
|
108
|
-
structType: "_tp.Optional[str]" = None
|
94
|
+
values: "_tp.List[str]" = _dc.field(default_factory=list)
|
109
95
|
|
110
96
|
|
111
97
|
@_dc.dataclass
|
112
|
-
class
|
113
|
-
|
114
|
-
"""Schema for a structured object dataset"""
|
98
|
+
class TableSchema:
|
115
99
|
|
116
|
-
|
100
|
+
"""Schema for a tabular dataset"""
|
117
101
|
|
118
|
-
|
102
|
+
fields: "_tp.List[FieldSchema]" = _dc.field(default_factory=list)
|
119
103
|
|
120
104
|
|
121
105
|
@_dc.dataclass
|
@@ -141,7 +125,11 @@ class SchemaDefinition:
|
|
141
125
|
|
142
126
|
table: "_tp.Optional[TableSchema]" = None
|
143
127
|
|
144
|
-
|
128
|
+
fields: "_tp.List[FieldSchema]" = _dc.field(default_factory=list)
|
129
|
+
|
130
|
+
namedTypes: "_tp.Dict[str, SchemaDefinition]" = _dc.field(default_factory=dict)
|
131
|
+
|
132
|
+
namedEnums: "_tp.Dict[str, EnumValues]" = _dc.field(default_factory=dict)
|
145
133
|
|
146
134
|
|
147
135
|
@_dc.dataclass
|
tracdap/rt/metadata/job.py
CHANGED
@@ -131,7 +131,7 @@ class ResultDefinition:
|
|
131
131
|
|
132
132
|
statusMessage: "str" = ""
|
133
133
|
|
134
|
-
logFileId: "TagSelector" =
|
134
|
+
logFileId: "_tp.Optional[TagSelector]" = None
|
135
135
|
|
136
136
|
outputs: "_tp.Dict[str, TagSelector]" = _dc.field(default_factory=dict)
|
137
137
|
|
tracdap/rt/metadata/type.py
CHANGED
@@ -74,16 +74,16 @@ class BasicType(_enum.Enum):
|
|
74
74
|
|
75
75
|
"""An key-value map with string keys, values may be primitive or composite values.
|
76
76
|
|
77
|
-
|
78
|
-
uniform in which case values can be of any type. For uniform maps the type
|
79
|
-
descriptor will specify the type contained in the map. For non-uniform maps the
|
80
|
-
type descriptor can only specify that the map is non-uniform, values must be
|
81
|
-
examined at run time to determine their type.
|
77
|
+
All values in a map must have the same type (i.e. the same type descriptor).
|
82
78
|
|
83
79
|
.. seealso::
|
84
80
|
:py:obj:`TypeDescriptor <TypeDescriptor>`
|
85
81
|
"""
|
86
82
|
|
83
|
+
STRUCT = 10
|
84
|
+
|
85
|
+
"""A nested structure with a named set of fields, which may be primitive or composite values."""
|
86
|
+
|
87
87
|
|
88
88
|
@_dc.dataclass
|
89
89
|
class TypeDescriptor:
|
@@ -116,6 +116,10 @@ class TypeDescriptor:
|
|
116
116
|
be inspected individually to determine their type.
|
117
117
|
"""
|
118
118
|
|
119
|
+
structTypes: "_tp.Dict[str, TypeDescriptor]" = _dc.field(default_factory=dict)
|
120
|
+
|
121
|
+
typeName: "_tp.Optional[str]" = None
|
122
|
+
|
119
123
|
|
120
124
|
@_dc.dataclass
|
121
125
|
class DecimalValue:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: tracdap-runtime
|
3
|
-
Version: 0.9.
|
3
|
+
Version: 0.9.0b2
|
4
4
|
Summary: Runtime package for building models on the TRAC Data & Analytics Platform
|
5
5
|
Home-page: https://tracdap.finos.org/
|
6
6
|
Author: Martin Traverse
|
@@ -16,11 +16,11 @@ Classifier: Operating System :: OS Independent
|
|
16
16
|
Requires-Python: <3.14,>=3.9
|
17
17
|
Description-Content-Type: text/markdown
|
18
18
|
License-File: LICENSE
|
19
|
-
Requires-Dist: protobuf==5.29.
|
19
|
+
Requires-Dist: protobuf==5.29.5
|
20
20
|
Requires-Dist: pyarrow==18.1.0
|
21
21
|
Requires-Dist: pyyaml==6.0.2
|
22
22
|
Requires-Dist: dulwich==0.22.7
|
23
|
-
Requires-Dist: requests==2.32.
|
23
|
+
Requires-Dist: requests==2.32.4
|
24
24
|
Requires-Dist: typing_extensions<4.13
|
25
25
|
Requires-Dist: urllib3<2.4.0
|
26
26
|
Provides-Extra: grpc
|