corvic-engine 0.3.0rc72__cp38-abi3-win_amd64.whl → 0.3.0rc73__cp38-abi3-win_amd64.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.
corvic/engine/_native.pyd CHANGED
Binary file
@@ -59,6 +59,12 @@ OrmBelongsToOrgObj = TypeVar("OrmBelongsToOrgObj", bound=_OrmBelongsToOrgModel[A
59
59
  OrmBelongsToRoomObj = TypeVar("OrmBelongsToRoomObj", bound=_OrmBelongsToRoomModel[Any])
60
60
 
61
61
 
62
+ def _orm_id_to_str(id: orm.ID | None):
63
+ if id:
64
+ return str(id)
65
+ return ""
66
+
67
+
62
68
  def _translate_orm_id(
63
69
  obj_id: str, id_class: type[ID]
64
70
  ) -> Ok[ID | None] | orm.InvalidORMIdentifierError:
@@ -88,9 +94,9 @@ def resource_orm_to_proto(resource_orm: orm.Resource) -> models_pb2.Resource:
88
94
  pipeline_id = ""
89
95
  if resource_orm.pipeline_ref:
90
96
  pipeline_input_name = resource_orm.pipeline_ref.name
91
- pipeline_id = str(resource_orm.pipeline_ref.pipeline_id)
97
+ pipeline_id = _orm_id_to_str(resource_orm.pipeline_ref.pipeline_id)
92
98
  return models_pb2.Resource(
93
- id=str(resource_orm.id),
99
+ id=_orm_id_to_str(resource_orm.id),
94
100
  name=resource_orm.name,
95
101
  description=resource_orm.description,
96
102
  mime_type=resource_orm.mime_type,
@@ -98,8 +104,8 @@ def resource_orm_to_proto(resource_orm: orm.Resource) -> models_pb2.Resource:
98
104
  md5=resource_orm.md5,
99
105
  size=resource_orm.size,
100
106
  original_path=resource_orm.original_path,
101
- room_id=str(resource_orm.room_id),
102
- org_id=str(resource_orm.org_id),
107
+ room_id=_orm_id_to_str(resource_orm.room_id),
108
+ org_id=_orm_id_to_str(resource_orm.org_id),
103
109
  recent_events=[resource_orm.latest_event] if resource_orm.latest_event else [],
104
110
  is_terminal=bool(resource_orm.is_terminal),
105
111
  pipeline_id=pipeline_id,
@@ -110,12 +116,12 @@ def resource_orm_to_proto(resource_orm: orm.Resource) -> models_pb2.Resource:
110
116
 
111
117
  def source_orm_to_proto(source_orm: orm.Source) -> models_pb2.Source:
112
118
  return models_pb2.Source(
113
- id=str(source_orm.id),
119
+ id=_orm_id_to_str(source_orm.id),
114
120
  name=source_orm.name,
115
121
  table_op_graph=source_orm.table_op_graph,
116
- room_id=str(source_orm.room_id),
117
- org_id=str(source_orm.org_id),
118
- pipeline_id=str(source_orm.pipeline_ref.pipeline_id)
122
+ room_id=_orm_id_to_str(source_orm.room_id),
123
+ org_id=_orm_id_to_str(source_orm.org_id),
124
+ pipeline_id=_orm_id_to_str(source_orm.pipeline_ref.pipeline_id)
119
125
  if source_orm.pipeline_ref
120
126
  else "",
121
127
  created_at=timestamp_orm_to_proto(source_orm.created_at),
@@ -132,12 +138,12 @@ def feature_view_source_orm_to_proto(
132
138
  # with the source's opgraph
133
139
  op = feature_view_source_orm.source.table_op_graph
134
140
  return models_pb2.FeatureViewSource(
135
- id=str(feature_view_source_orm.id),
136
- room_id=str(feature_view_source_orm.room_id),
141
+ id=_orm_id_to_str(feature_view_source_orm.id),
142
+ room_id=_orm_id_to_str(feature_view_source_orm.room_id),
137
143
  source=source_orm_to_proto(feature_view_source_orm.source),
138
144
  table_op_graph=op,
139
145
  drop_disconnected=feature_view_source_orm.drop_disconnected,
140
- org_id=str(feature_view_source_orm.org_id),
146
+ org_id=_orm_id_to_str(feature_view_source_orm.org_id),
141
147
  created_at=timestamp_orm_to_proto(feature_view_source_orm.created_at),
142
148
  )
143
149
 
@@ -146,16 +152,16 @@ def feature_view_orm_to_proto(
146
152
  feature_view_orm: orm.FeatureView,
147
153
  ) -> models_pb2.FeatureView:
148
154
  return models_pb2.FeatureView(
149
- id=str(feature_view_orm.id),
155
+ id=_orm_id_to_str(feature_view_orm.id),
150
156
  name=feature_view_orm.name,
151
157
  description=feature_view_orm.description,
152
- room_id=str(feature_view_orm.room_id),
158
+ room_id=_orm_id_to_str(feature_view_orm.room_id),
153
159
  feature_view_output=feature_view_orm.feature_view_output,
154
160
  feature_view_sources=[
155
161
  feature_view_source_orm_to_proto(fvs)
156
162
  for fvs in feature_view_orm.feature_view_sources
157
163
  ],
158
- org_id=str(feature_view_orm.org_id),
164
+ org_id=_orm_id_to_str(feature_view_orm.org_id),
159
165
  created_at=timestamp_orm_to_proto(feature_view_orm.created_at),
160
166
  )
161
167
 
@@ -164,15 +170,15 @@ def pipeline_orm_to_proto(
164
170
  pipeline_orm: orm.Pipeline,
165
171
  ) -> models_pb2.Pipeline:
166
172
  return models_pb2.Pipeline(
167
- id=str(pipeline_orm.id),
173
+ id=_orm_id_to_str(pipeline_orm.id),
168
174
  name=pipeline_orm.name,
169
- room_id=str(pipeline_orm.room_id),
175
+ room_id=_orm_id_to_str(pipeline_orm.room_id),
170
176
  source_outputs={
171
177
  output_obj.name: source_orm_to_proto(output_obj.source)
172
178
  for output_obj in pipeline_orm.outputs
173
179
  },
174
180
  pipeline_transformation=pipeline_orm.transformation,
175
- org_id=str(pipeline_orm.org_id),
181
+ org_id=_orm_id_to_str(pipeline_orm.org_id),
176
182
  description=pipeline_orm.description,
177
183
  created_at=timestamp_orm_to_proto(pipeline_orm.created_at),
178
184
  )
@@ -180,23 +186,23 @@ def pipeline_orm_to_proto(
180
186
 
181
187
  def space_orm_to_proto(space_orm: orm.Space) -> models_pb2.Space:
182
188
  return models_pb2.Space(
183
- id=str(space_orm.id),
189
+ id=_orm_id_to_str(space_orm.id),
184
190
  name=space_orm.name,
185
191
  description=space_orm.description,
186
- room_id=str(space_orm.room_id),
192
+ room_id=_orm_id_to_str(space_orm.room_id),
187
193
  space_parameters=space_orm.parameters,
188
194
  feature_view=feature_view_orm_to_proto(space_orm.feature_view),
189
195
  auto_sync=space_orm.auto_sync if space_orm.auto_sync is not None else False,
190
- org_id=str(space_orm.org_id),
196
+ org_id=_orm_id_to_str(space_orm.org_id),
191
197
  created_at=timestamp_orm_to_proto(space_orm.created_at),
192
198
  )
193
199
 
194
200
 
195
201
  def room_orm_to_proto(room_orm: orm.Room) -> models_pb2.Room:
196
202
  return models_pb2.Room(
197
- id=str(room_orm.id),
203
+ id=_orm_id_to_str(room_orm.id),
198
204
  name=room_orm.name,
199
- org_id=str(room_orm.org_id),
205
+ org_id=_orm_id_to_str(room_orm.org_id),
200
206
  created_at=timestamp_orm_to_proto(room_orm.created_at),
201
207
  )
202
208
 
@@ -205,10 +211,10 @@ def completion_model_orm_to_proto(
205
211
  completion_model_orm: orm.CompletionModel,
206
212
  ) -> models_pb2.CompletionModel:
207
213
  return models_pb2.CompletionModel(
208
- id=str(completion_model_orm.id),
214
+ id=_orm_id_to_str(completion_model_orm.id),
209
215
  name=completion_model_orm.name,
210
216
  description=completion_model_orm.description,
211
- org_id=str(completion_model_orm.org_id),
217
+ org_id=_orm_id_to_str(completion_model_orm.org_id),
212
218
  parameters=completion_model_orm.parameters,
213
219
  secret_api_key=completion_model_orm.secret_api_key,
214
220
  created_at=timestamp_orm_to_proto(completion_model_orm.created_at),
@@ -493,8 +499,8 @@ def _feature_view_source_proto_to_orm(
493
499
  case Ok(source_id):
494
500
  pass
495
501
 
502
+ proto_obj.room_id = proto_obj.room_id or str(room_id)
496
503
  orm_obj = orm.FeatureViewSource(
497
- room_id=room_id,
498
504
  table_op_graph=proto_obj.table_op_graph,
499
505
  drop_disconnected=proto_obj.drop_disconnected,
500
506
  source_id=source_id,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: corvic-engine
3
- Version: 0.3.0rc72
3
+ Version: 0.3.0rc73
4
4
  Classifier: Environment :: Console
5
5
  Classifier: License :: Other/Proprietary License
6
6
  Classifier: Programming Language :: Python :: Implementation :: CPython
@@ -1,6 +1,6 @@
1
- corvic_engine-0.3.0rc72.dist-info/METADATA,sha256=bPX0o4_5zdRiLQec28odvgxggU16H9wVesyR63TKMwk,1814
2
- corvic_engine-0.3.0rc72.dist-info/WHEEL,sha256=hKPP3BCTWtTwj6SFaSI--T5aOGqh_llYfbZ_BsqivwA,94
3
- corvic_engine-0.3.0rc72.dist-info/licenses/LICENSE,sha256=DSS1OD0oIgssKOmAzkMRBv5jvvVuZQbrIv8lpl9DXY8,1035
1
+ corvic_engine-0.3.0rc73.dist-info/METADATA,sha256=1F9B814nggmD1vYuGX_rvyhtsCtBEICKvJFzdyzrezY,1814
2
+ corvic_engine-0.3.0rc73.dist-info/WHEEL,sha256=hKPP3BCTWtTwj6SFaSI--T5aOGqh_llYfbZ_BsqivwA,94
3
+ corvic_engine-0.3.0rc73.dist-info/licenses/LICENSE,sha256=DSS1OD0oIgssKOmAzkMRBv5jvvVuZQbrIv8lpl9DXY8,1035
4
4
  corvic/context/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  corvic/context/__init__.py,sha256=J69SWL27p4euoS3e_Z1K-rqSFRzGdBT3ryuRfM9r9cM,1498
6
6
  corvic/embed/node2vec.py,sha256=Qep1lYMKN4nL4z6Ftylr0pj2aJ2LJmWRmnZV27xYJ-M,11251
@@ -20,7 +20,7 @@ corvic/model/_errors.py,sha256=Ctlq04SDwHzJPvLaL1rzqzwVqf2b50EILfW3cH4vnh8,261
20
20
  corvic/model/_feature_type.py,sha256=Y-_-wa9fv7XaCAkxfjjoCLxxK2Ftfba-PMefD7bNXzs,917
21
21
  corvic/model/_feature_view.py,sha256=vRh9eVDlais8enZVymQtwPz8vd3QtwSRYR1CnlKtCnA,49698
22
22
  corvic/model/_pipeline.py,sha256=X9b34eCTD4zr6IF61EZRLC89n_Fi9HrsukoghDKwhI8,18685
23
- corvic/model/_proto_orm_convert.py,sha256=eqYx7rJlshDRfoA199F1BEDSnCVQDC-xmEVqs6mU1pw,23622
23
+ corvic/model/_proto_orm_convert.py,sha256=3E4dPZ9sdF_BAT6_SR7YscioG90rb2NnQHqUChelXL8,24014
24
24
  corvic/model/_resource.py,sha256=R973-POS5HDCo7hIoxsBNauH1YAPisZDFLrWIxjygbk,8495
25
25
  corvic/model/_room.py,sha256=36mXngZ38L4mr6_LgUm-QgsUUaoGMiYQRfvXLV_jd-4,2914
26
26
  corvic/model/_source.py,sha256=evgqs_6-IK2dl35EJpcc3rD5yTCUZudcQYL24vLTElg,9785
@@ -206,5 +206,5 @@ corvic_generated/status/v1/event_pb2.pyi,sha256=eU-ibrYpvEAJSIDlSa62-bC96AQU1ykF
206
206
  corvic_generated/status/v1/event_pb2_grpc.pyi,sha256=H9-ADaiKR9iyVZvmnXutZqWwRRCDxjUIktkfJrJFIHg,417
207
207
  corvic_generated/status/v1/service_pb2.pyi,sha256=iXLR2FOKQJpBgvBzpD2kVwcYOCksP2aRwK4JYaI9CBw,558
208
208
  corvic_generated/status/v1/service_pb2_grpc.pyi,sha256=OoAnaZ64FD0UTzPoRhYvQU8ecoilhHj3ySjSfHbVDaU,1501
209
- corvic/engine/_native.pyd,sha256=TrxxmpS21HXsRPgH__iDtGaYp2g9c24ImGODbfOeMUA,438272
210
- corvic_engine-0.3.0rc72.dist-info/RECORD,,
209
+ corvic/engine/_native.pyd,sha256=-pPjZjUf0XKYtT6C_xZBZgOKQAyffwmHoJFqB8dZVRU,438272
210
+ corvic_engine-0.3.0rc73.dist-info/RECORD,,