tracdap-runtime 0.8.0rc1__py3-none-any.whl → 0.9.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.
Files changed (41) hide show
  1. tracdap/rt/_impl/core/data.py +127 -5
  2. tracdap/rt/_impl/core/repos.py +7 -0
  3. tracdap/rt/_impl/core/storage.py +10 -3
  4. tracdap/rt/_impl/exec/functions.py +2 -2
  5. tracdap/rt/_impl/grpc/tracdap/api/internal/runtime_pb2.py +1 -1
  6. tracdap/rt/_impl/grpc/tracdap/metadata/common_pb2.py +1 -1
  7. tracdap/rt/_impl/grpc/tracdap/metadata/config_pb2.py +40 -0
  8. tracdap/rt/_impl/grpc/tracdap/metadata/config_pb2.pyi +62 -0
  9. tracdap/rt/_impl/grpc/tracdap/metadata/custom_pb2.py +1 -1
  10. tracdap/rt/_impl/grpc/tracdap/metadata/data_pb2.py +1 -1
  11. tracdap/rt/_impl/grpc/tracdap/metadata/file_pb2.py +1 -1
  12. tracdap/rt/_impl/grpc/tracdap/metadata/flow_pb2.py +1 -1
  13. tracdap/rt/_impl/grpc/tracdap/metadata/job_pb2.py +1 -1
  14. tracdap/rt/_impl/grpc/tracdap/metadata/model_pb2.py +1 -1
  15. tracdap/rt/_impl/grpc/tracdap/metadata/object_id_pb2.py +3 -3
  16. tracdap/rt/_impl/grpc/tracdap/metadata/object_id_pb2.pyi +4 -0
  17. tracdap/rt/_impl/grpc/tracdap/metadata/object_pb2.py +8 -6
  18. tracdap/rt/_impl/grpc/tracdap/metadata/object_pb2.pyi +8 -2
  19. tracdap/rt/_impl/grpc/tracdap/metadata/resource_pb2.py +18 -5
  20. tracdap/rt/_impl/grpc/tracdap/metadata/resource_pb2.pyi +42 -2
  21. tracdap/rt/_impl/grpc/tracdap/metadata/search_pb2.py +1 -1
  22. tracdap/rt/_impl/grpc/tracdap/metadata/storage_pb2.py +1 -1
  23. tracdap/rt/_impl/grpc/tracdap/metadata/tag_pb2.py +1 -1
  24. tracdap/rt/_impl/grpc/tracdap/metadata/tag_update_pb2.py +1 -1
  25. tracdap/rt/_impl/grpc/tracdap/metadata/type_pb2.py +1 -1
  26. tracdap/rt/_impl/runtime.py +8 -0
  27. tracdap/rt/_plugins/repo_git.py +56 -11
  28. tracdap/rt/_version.py +1 -1
  29. tracdap/rt/config/__init__.py +6 -4
  30. tracdap/rt/config/dynamic.py +28 -0
  31. tracdap/rt/config/runtime.py +2 -0
  32. tracdap/rt/metadata/__init__.py +36 -30
  33. tracdap/rt/metadata/config.py +95 -0
  34. tracdap/rt/metadata/object.py +6 -0
  35. tracdap/rt/metadata/object_id.py +4 -0
  36. tracdap/rt/metadata/resource.py +41 -1
  37. {tracdap_runtime-0.8.0rc1.dist-info → tracdap_runtime-0.9.0rc1.dist-info}/METADATA +5 -2
  38. {tracdap_runtime-0.8.0rc1.dist-info → tracdap_runtime-0.9.0rc1.dist-info}/RECORD +41 -37
  39. {tracdap_runtime-0.8.0rc1.dist-info → tracdap_runtime-0.9.0rc1.dist-info}/WHEEL +1 -1
  40. {tracdap_runtime-0.8.0rc1.dist-info → tracdap_runtime-0.9.0rc1.dist-info/licenses}/LICENSE +0 -0
  41. {tracdap_runtime-0.8.0rc1.dist-info → tracdap_runtime-0.9.0rc1.dist-info}/top_level.txt +0 -0
@@ -1,8 +1,9 @@
1
1
  from tracdap.rt._impl.grpc.tracdap.metadata import object_id_pb2 as _object_id_pb2
2
- from tracdap.rt._impl.grpc.tracdap.metadata import object_pb2 as _object_pb2
2
+ from google.protobuf.internal import containers as _containers
3
3
  from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
4
4
  from google.protobuf import descriptor as _descriptor
5
- from typing import ClassVar as _ClassVar
5
+ from google.protobuf import message as _message
6
+ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
6
7
 
7
8
  DESCRIPTOR: _descriptor.FileDescriptor
8
9
 
@@ -11,6 +12,45 @@ class ResourceType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
11
12
  RESOURCE_TYPE_NOT_SET: _ClassVar[ResourceType]
12
13
  MODEL_REPOSITORY: _ClassVar[ResourceType]
13
14
  INTERNAL_STORAGE: _ClassVar[ResourceType]
15
+ EXTERNAL_STORAGE: _ClassVar[ResourceType]
14
16
  RESOURCE_TYPE_NOT_SET: ResourceType
15
17
  MODEL_REPOSITORY: ResourceType
16
18
  INTERNAL_STORAGE: ResourceType
19
+ EXTERNAL_STORAGE: ResourceType
20
+
21
+ class ResourceDefinition(_message.Message):
22
+ __slots__ = ("resourceType", "protocol", "subProtocol", "publicProperties", "properties", "secrets")
23
+ class PublicPropertiesEntry(_message.Message):
24
+ __slots__ = ("key", "value")
25
+ KEY_FIELD_NUMBER: _ClassVar[int]
26
+ VALUE_FIELD_NUMBER: _ClassVar[int]
27
+ key: str
28
+ value: str
29
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
30
+ class PropertiesEntry(_message.Message):
31
+ __slots__ = ("key", "value")
32
+ KEY_FIELD_NUMBER: _ClassVar[int]
33
+ VALUE_FIELD_NUMBER: _ClassVar[int]
34
+ key: str
35
+ value: str
36
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
37
+ class SecretsEntry(_message.Message):
38
+ __slots__ = ("key", "value")
39
+ KEY_FIELD_NUMBER: _ClassVar[int]
40
+ VALUE_FIELD_NUMBER: _ClassVar[int]
41
+ key: str
42
+ value: str
43
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
44
+ RESOURCETYPE_FIELD_NUMBER: _ClassVar[int]
45
+ PROTOCOL_FIELD_NUMBER: _ClassVar[int]
46
+ SUBPROTOCOL_FIELD_NUMBER: _ClassVar[int]
47
+ PUBLICPROPERTIES_FIELD_NUMBER: _ClassVar[int]
48
+ PROPERTIES_FIELD_NUMBER: _ClassVar[int]
49
+ SECRETS_FIELD_NUMBER: _ClassVar[int]
50
+ resourceType: ResourceType
51
+ protocol: str
52
+ subProtocol: str
53
+ publicProperties: _containers.ScalarMap[str, str]
54
+ properties: _containers.ScalarMap[str, str]
55
+ secrets: _containers.ScalarMap[str, str]
56
+ def __init__(self, resourceType: _Optional[_Union[ResourceType, str]] = ..., protocol: _Optional[str] = ..., subProtocol: _Optional[str] = ..., publicProperties: _Optional[_Mapping[str, str]] = ..., properties: _Optional[_Mapping[str, str]] = ..., secrets: _Optional[_Mapping[str, str]] = ...) -> None: ...
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # source: tracdap/rt/_impl/grpc/tracdap/metadata/search.proto
4
- # Protobuf Python Version: 4.25.3
4
+ # Protobuf Python Version: 4.25.5
5
5
  """Generated protocol buffer code."""
6
6
  from google.protobuf import descriptor as _descriptor
7
7
  from google.protobuf import descriptor_pool as _descriptor_pool
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # source: tracdap/rt/_impl/grpc/tracdap/metadata/storage.proto
4
- # Protobuf Python Version: 4.25.3
4
+ # Protobuf Python Version: 4.25.5
5
5
  """Generated protocol buffer code."""
6
6
  from google.protobuf import descriptor as _descriptor
7
7
  from google.protobuf import descriptor_pool as _descriptor_pool
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # source: tracdap/rt/_impl/grpc/tracdap/metadata/tag.proto
4
- # Protobuf Python Version: 4.25.3
4
+ # Protobuf Python Version: 4.25.5
5
5
  """Generated protocol buffer code."""
6
6
  from google.protobuf import descriptor as _descriptor
7
7
  from google.protobuf import descriptor_pool as _descriptor_pool
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # source: tracdap/rt/_impl/grpc/tracdap/metadata/tag_update.proto
4
- # Protobuf Python Version: 4.25.3
4
+ # Protobuf Python Version: 4.25.5
5
5
  """Generated protocol buffer code."""
6
6
  from google.protobuf import descriptor as _descriptor
7
7
  from google.protobuf import descriptor_pool as _descriptor_pool
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # source: tracdap/rt/_impl/grpc/tracdap/metadata/type.proto
4
- # Protobuf Python Version: 4.25.3
4
+ # Protobuf Python Version: 4.25.5
5
5
  """Generated protocol buffer code."""
6
6
  from google.protobuf import descriptor as _descriptor
7
7
  from google.protobuf import descriptor_pool as _descriptor_pool
@@ -30,6 +30,7 @@ import tracdap.rt.config as _cfg
30
30
  import tracdap.rt.exceptions as _ex
31
31
  import tracdap.rt.ext.plugins as _plugins
32
32
  import tracdap.rt._impl.core.config_parser as _cparse
33
+ import tracdap.rt._impl.core.data as _data
33
34
  import tracdap.rt._impl.core.guard_rails as _guard
34
35
  import tracdap.rt._impl.core.logging as _logging
35
36
  import tracdap.rt._impl.core.models as _models
@@ -167,6 +168,13 @@ class TracRuntime:
167
168
  else:
168
169
  self._log.info("Using embedded system config")
169
170
 
171
+ # Check whether to enable categorical processing in the data layer
172
+
173
+ if _data.DataMapping.CATEGORICAL_CONFIG_KEY in self._sys_config.properties:
174
+ categorical_prop = self._sys_config.properties[_data.DataMapping.CATEGORICAL_CONFIG_KEY]
175
+ categorical_flag = categorical_prop and categorical_prop.lower() == "true"
176
+ _data.DataMapping.enable_categorical(categorical_flag)
177
+
170
178
  # Dev mode translation is controlled by the dev mode flag
171
179
  # I.e. it can be applied to embedded configs
172
180
 
@@ -23,6 +23,7 @@ import time
23
23
  import dulwich.repo as git_repo
24
24
  import dulwich.client as git_client
25
25
  import dulwich.index as git_index
26
+ import urllib3.exceptions # noqa
26
27
 
27
28
  import tracdap.rt.metadata as meta
28
29
  import tracdap.rt.exceptions as ex
@@ -75,20 +76,45 @@ class GitRepository(IModelRepository):
75
76
 
76
77
  def do_checkout(self, model_def: meta.ModelDefinition, checkout_dir: pathlib.Path) -> pathlib.Path:
77
78
 
78
- self._log.info(
79
- f"Git checkout: repo = [{model_def.repository}], " +
80
- f"group = [{model_def.packageGroup}], package = [{model_def.package}], version = [{model_def.version}]")
79
+ try:
81
80
 
82
- self._log.info(f"Checkout location: [{checkout_dir}]")
81
+ self._log.info(
82
+ f"Git checkout: repo = [{model_def.repository}], " +
83
+ f"group = [{model_def.packageGroup}], package = [{model_def.package}], version = [{model_def.version}]")
83
84
 
84
- if self._native_git:
85
- package_path = self._do_native_checkout(model_def, checkout_dir)
86
- else:
87
- package_path = self._do_python_checkout(model_def, checkout_dir)
85
+ self._log.info(f"Checkout location: [{checkout_dir}]")
86
+
87
+ if self._native_git:
88
+ package_path = self._do_native_checkout(model_def, checkout_dir)
89
+ else:
90
+ package_path = self._do_python_checkout(model_def, checkout_dir)
91
+
92
+ self._log.info(f"Git checkout succeeded for {model_def.package} {model_def.version}")
93
+
94
+ return package_path
95
+
96
+ except Exception as e:
97
+
98
+ error = e
99
+
100
+ # For retry failures, try to find the original cause
101
+ while e.__cause__ is not None:
102
+ if isinstance(e, urllib3.exceptions.MaxRetryError):
103
+ error = e.__cause__
104
+ break
105
+ else:
106
+ e = e.__cause__
107
+
108
+ # Try to sanitize error messages from urllib3
109
+ if isinstance(error, urllib3.exceptions.HTTPError):
110
+ detail = self._clean_urllib3_error(error)
111
+ else:
112
+ detail = str(error)
88
113
 
89
- self._log.info(f"Git checkout succeeded for {model_def.package} {model_def.version}")
114
+ message = f"Failed to check out [{model_def.repository}]: {detail}"
90
115
 
91
- return package_path
116
+ self._log.error(message)
117
+ raise ex.EModelRepo(message) from error
92
118
 
93
119
  def _do_native_checkout(self, model_def: meta.ModelDefinition, checkout_dir: pathlib.Path) -> pathlib.Path:
94
120
 
@@ -150,10 +176,15 @@ class GitRepository(IModelRepository):
150
176
  for line in cmd_err:
151
177
  self._log.info(line)
152
178
 
153
- else:
179
+ elif cmd_err:
180
+
154
181
  for line in cmd_err:
155
182
  self._log.error(line)
156
183
 
184
+ raise ex.EModelRepo(cmd_err[-1])
185
+
186
+ else:
187
+
157
188
  error_msg = f"Git checkout failed for {model_def.package} {model_def.version}"
158
189
  self._log.error(error_msg)
159
190
  raise ex.EModelRepo(error_msg)
@@ -265,6 +296,20 @@ class GitRepository(IModelRepository):
265
296
  def _ref_key(key):
266
297
  return bytes(key, "ascii")
267
298
 
299
+ @classmethod
300
+ def _clean_urllib3_error(cls, error: urllib3.exceptions.HTTPError):
301
+
302
+ match = cls._URLLIB3_ERROR_PATTERN.match(str(error))
303
+
304
+ # Best efforts to clean up the message, fall back on str(error)
305
+ if match:
306
+ return match.group(1)
307
+ else:
308
+ return str(error)
309
+
310
+ # Error message format is like this:
311
+ # <pkg.ClassName object at 0xXXXXXXX>: Message
312
+ _URLLIB3_ERROR_PATTERN = re.compile(r"<[^>]*>: (.*)")
268
313
 
269
314
  # Register plugin
270
315
  plugins.PluginManager.register_plugin(IModelRepository, GitRepository, ["git"])
tracdap/rt/_version.py CHANGED
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
 
16
- __version__ = "0.8.0rc1"
16
+ __version__ = "0.9.0rc1"
@@ -1,6 +1,7 @@
1
1
  # Code generated by TRAC
2
2
 
3
- from .job import JobConfig
3
+ from .result import TagUpdateList
4
+ from .result import JobResult
4
5
 
5
6
  from .common import _ConfigFile
6
7
  from .common import PluginConfig
@@ -8,9 +9,6 @@ from .common import PlatformInfo
8
9
  from .common import StorageConfig
9
10
  from .common import ServiceConfig
10
11
 
11
- from .result import TagUpdateList
12
- from .result import JobResult
13
-
14
12
  from .platform import RoutingProtocol
15
13
  from .platform import DeploymentLayout
16
14
  from .platform import PlatformConfig
@@ -26,3 +24,7 @@ from .platform import ClientConfig
26
24
 
27
25
  from .runtime import RuntimeConfig
28
26
  from .runtime import SparkSettings
27
+
28
+ from .job import JobConfig
29
+
30
+ from .dynamic import DynamicConfig
@@ -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 DynamicConfig:
13
+
14
+ """
15
+ Represent config that is normally held in the metadata store
16
+
17
+ This can be used to supply config to isolated processes, including
18
+ the runtime when operating in batch mode. It can also be used to
19
+ to supply config for testing or to bootstrap the metadata store.
20
+ """
21
+
22
+ configClass: "str" = ""
23
+
24
+ resourceClass: "str" = ""
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)
@@ -21,6 +21,8 @@ class RuntimeConfig:
21
21
 
22
22
  runtimeApi: "ServiceConfig" = _dc.field(default_factory=lambda: ServiceConfig())
23
23
 
24
+ properties: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
25
+
24
26
 
25
27
  @_dc.dataclass
26
28
  class SparkSettings:
@@ -9,32 +9,16 @@ from .type import Value
9
9
  from .type import ArrayValue
10
10
  from .type import MapValue
11
11
 
12
- from .tag_update import TagOperation
13
- from .tag_update import TagUpdate
14
-
15
12
  from .object_id import ObjectType
16
13
  from .object_id import TagHeader
17
14
  from .object_id import TagSelector
18
15
 
19
- from .job import JobType
20
- from .job import JobStatusCode
21
- from .job import JobGroupType
22
- from .job import JobDefinition
23
- from .job import ResultDefinition
24
- from .job import RunModelJob
25
- from .job import RunFlowJob
26
- from .job import ImportModelJob
27
- from .job import ImportDataJob
28
- from .job import ExportDataJob
29
- from .job import JobGroup
30
- from .job import SequentialJobGroup
31
- from .job import ParallelJobGroup
32
-
33
- from .common import MetadataFormat
34
- from .common import MetadataVersion
35
- from .common import TenantInfo
36
-
37
- from .custom import CustomDefinition
16
+ from .search import SearchOperator
17
+ from .search import LogicalOperator
18
+ from .search import SearchTerm
19
+ from .search import LogicalExpression
20
+ from .search import SearchExpression
21
+ from .search import SearchParameters
38
22
 
39
23
  from .data import SchemaType
40
24
  from .data import PartType
@@ -55,12 +39,8 @@ from .model import ModelInputSchema
55
39
  from .model import ModelOutputSchema
56
40
  from .model import ModelDefinition
57
41
 
58
- from .search import SearchOperator
59
- from .search import LogicalOperator
60
- from .search import SearchTerm
61
- from .search import LogicalExpression
62
- from .search import SearchExpression
63
- from .search import SearchParameters
42
+ from .tag_update import TagOperation
43
+ from .tag_update import TagUpdate
64
44
 
65
45
  from .flow import FlowNodeType
66
46
  from .flow import FlowNode
@@ -68,6 +48,34 @@ from .flow import FlowSocket
68
48
  from .flow import FlowEdge
69
49
  from .flow import FlowDefinition
70
50
 
51
+ from .custom import CustomDefinition
52
+
53
+ from .resource import ResourceType
54
+ from .resource import ResourceDefinition
55
+
56
+ from .job import JobType
57
+ from .job import JobStatusCode
58
+ from .job import JobGroupType
59
+ from .job import JobDefinition
60
+ from .job import ResultDefinition
61
+ from .job import RunModelJob
62
+ from .job import RunFlowJob
63
+ from .job import ImportModelJob
64
+ from .job import ImportDataJob
65
+ from .job import ExportDataJob
66
+ from .job import JobGroup
67
+ from .job import SequentialJobGroup
68
+ from .job import ParallelJobGroup
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
+
71
79
  from .storage import CopyStatus
72
80
  from .storage import IncarnationStatus
73
81
  from .storage import StorageCopy
@@ -78,5 +86,3 @@ from .storage import StorageDefinition
78
86
  from .object import ObjectDefinition
79
87
 
80
88
  from .tag import Tag
81
-
82
- from .resource import ResourceType
@@ -0,0 +1,95 @@
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
+ from .type import * # noqa
8
+ from .object_id import * # noqa
9
+ from .resource import * # noqa
10
+
11
+
12
+ class ConfigType(_enum.Enum):
13
+
14
+ """Enumeration of available config types"""
15
+
16
+ CONFIG_TYPE_NOT_SET = 0
17
+
18
+ PROPERTIES = 1
19
+
20
+ """A key-value properties map, follows the convention used for .properties files"""
21
+
22
+
23
+ @_dc.dataclass
24
+ class ConfigEntry:
25
+
26
+ """Represents the mapping of a config key to a config object."""
27
+
28
+ configClass: "str" = ""
29
+
30
+ """Config class for this config entry."""
31
+
32
+ configKey: "str" = ""
33
+
34
+ """Config key for this config entry."""
35
+
36
+ configVersion: "int" = 0
37
+
38
+ """Version of the config entry."""
39
+
40
+ configTimestamp: "DatetimeValue" = _dc.field(default_factory=lambda: DatetimeValue())
41
+
42
+ """Timestamp for when this version of the config entry was created."""
43
+
44
+ isLatestConfig: "bool" = False
45
+
46
+ """Flag indicating whether this is the latest version of the config entry."""
47
+
48
+ configDeleted: "bool" = False
49
+
50
+ """Flag indicating whether this config entry has been deleted."""
51
+
52
+ details: "_tp.Optional[ConfigDetails]" = None
53
+
54
+ """Describes the content of this config entry, can be used for list / summary views (optional)."""
55
+
56
+
57
+ @_dc.dataclass
58
+ class ConfigDetails:
59
+
60
+ """
61
+ Summary content of a config entry.
62
+
63
+ .. seealso::
64
+ :py:obj:`ConfigEntry <ConfigEntry>`
65
+ """
66
+
67
+ objectSelector: "TagSelector" = _dc.field(default_factory=lambda: TagSelector())
68
+
69
+ """Selector for the metadata object holding the content of this config entry."""
70
+
71
+ objectType: "ObjectType" = ObjectType.OBJECT_TYPE_NOT_SET
72
+
73
+ """Type of the metadata object referred to by this config entry."""
74
+
75
+ configType: "_tp.Optional[ConfigType]" = None
76
+
77
+ """Indicate the config type (for CONFIG objects only)"""
78
+
79
+ resourceType: "_tp.Optional[ResourceType]" = None
80
+
81
+ """Indicate the resource type (for RESOURCE objects only)"""
82
+
83
+
84
+ @_dc.dataclass
85
+ class ConfigDefinition:
86
+
87
+ """Definition of an individual config entry"""
88
+
89
+ configType: "ConfigType" = ConfigType.CONFIG_TYPE_NOT_SET
90
+
91
+ """The type of this config entry"""
92
+
93
+ properties: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
94
+
95
+ """The map of config properties (only available for PROPERTIES config entries)"""
@@ -13,6 +13,8 @@ from .job import * # noqa
13
13
  from .file import * # noqa
14
14
  from .custom import * # noqa
15
15
  from .storage import * # noqa
16
+ from .config import * # noqa
17
+ from .resource import * # noqa
16
18
 
17
19
 
18
20
 
@@ -72,4 +74,8 @@ class ObjectDefinition:
72
74
 
73
75
  result: "_tp.Optional[ResultDefinition]" = None
74
76
 
77
+ config: "_tp.Optional[ConfigDefinition]" = None
78
+
79
+ resource: "_tp.Optional[ResourceDefinition]" = None
80
+
75
81
  objectProps: "_tp.Dict[str, Value]" = _dc.field(default_factory=dict)
@@ -36,6 +36,10 @@ class ObjectType(_enum.Enum):
36
36
 
37
37
  RESULT = 9
38
38
 
39
+ CONFIG = 10
40
+
41
+ RESOURCE = 11
42
+
39
43
 
40
44
  @_dc.dataclass
41
45
  class TagHeader:
@@ -5,7 +5,6 @@ import dataclasses as _dc # noqa
5
5
  import enum as _enum # noqa
6
6
 
7
7
  from .object_id import * # noqa
8
- from .object import * # noqa
9
8
 
10
9
 
11
10
  class ResourceType(_enum.Enum):
@@ -21,3 +20,44 @@ class ResourceType(_enum.Enum):
21
20
  INTERNAL_STORAGE = 2
22
21
 
23
22
  """Storage location for data held internally by the TRAC platform"""
23
+
24
+ EXTERNAL_STORAGE = 3
25
+
26
+ """Storage location for upstream downstream integration points"""
27
+
28
+
29
+ @_dc.dataclass
30
+ class ResourceDefinition:
31
+
32
+ """Definition of a platform resource"""
33
+
34
+ resourceType: "ResourceType" = ResourceType.RESOURCE_TYPE_NOT_SET
35
+
36
+ """The type of this resource"""
37
+
38
+ protocol: "str" = ""
39
+
40
+ """The protocol used to communicate with this resource (usually corresponds to a TRAC plugin)"""
41
+
42
+ subProtocol: "_tp.Optional[str]" = None
43
+
44
+ """Optional sub-protocol, to further distinguish the behavior of resources within a protocol"""
45
+
46
+ publicProperties: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
47
+
48
+ """Configuration properties for this resource, made visible to client applications"""
49
+
50
+ properties: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
51
+
52
+ """Configuration properties for this resource, not visible to client applications"""
53
+
54
+ secrets: "_tp.Dict[str, str]" = _dc.field(default_factory=dict)
55
+
56
+ """
57
+ Configuration properties that are stored as secrets using TRAC's secret handling mechanism
58
+
59
+ Only the secret alias is stored in metadata, handling of secret storage is delegated to the
60
+ configured secrets plugin. Secret values may be sent by clients when resource definitions are
61
+ created / updated, in which case they will be written to the configured secret store and
62
+ metadata values will be replaced with an alias.
63
+ """
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: tracdap-runtime
3
- Version: 0.8.0rc1
3
+ Version: 0.9.0rc1
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
@@ -21,6 +21,8 @@ Requires-Dist: pyarrow==18.1.0
21
21
  Requires-Dist: pyyaml==6.0.2
22
22
  Requires-Dist: dulwich==0.22.7
23
23
  Requires-Dist: requests==2.32.3
24
+ Requires-Dist: typing_extensions<4.13
25
+ Requires-Dist: urllib3<2.4.0
24
26
  Provides-Extra: grpc
25
27
  Requires-Dist: grpcio==1.70.0; extra == "grpc"
26
28
  Requires-Dist: grpcio-status==1.70.0; extra == "grpc"
@@ -46,6 +48,7 @@ Requires-Dist: azure-core==1.30.1; extra == "azure"
46
48
  Requires-Dist: azure-identity==1.16.1; extra == "azure"
47
49
  Requires-Dist: azure-storage-blob==12.19.1; extra == "azure"
48
50
  Requires-Dist: adlfs==2024.4.1; extra == "azure"
51
+ Dynamic: license-file
49
52
 
50
53
  # TRAC Model Runtime for Python
51
54