sapiopycommons 2025.8.12a699__py3-none-any.whl → 2025.8.14a702__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.
Potentially problematic release.
This version of sapiopycommons might be problematic. Click here for more details.
- sapiopycommons/ai/protobuf_utils.py +21 -0
- sapiopycommons/ai/test_client.py +2 -1
- {sapiopycommons-2025.8.12a699.dist-info → sapiopycommons-2025.8.14a702.dist-info}/METADATA +1 -1
- {sapiopycommons-2025.8.12a699.dist-info → sapiopycommons-2025.8.14a702.dist-info}/RECORD +6 -6
- {sapiopycommons-2025.8.12a699.dist-info → sapiopycommons-2025.8.14a702.dist-info}/WHEEL +0 -0
- {sapiopycommons-2025.8.12a699.dist-info → sapiopycommons-2025.8.14a702.dist-info}/licenses/LICENSE +0 -0
|
@@ -409,6 +409,27 @@ class ProtobufUtils:
|
|
|
409
409
|
string_properties=string_properties,
|
|
410
410
|
)
|
|
411
411
|
|
|
412
|
+
@staticmethod
|
|
413
|
+
def value_to_field_pbo(value: FieldValue) -> FieldValuePbo:
|
|
414
|
+
"""
|
|
415
|
+
Convert a Python value to its corresponding FieldValuePbo.
|
|
416
|
+
|
|
417
|
+
:param value: The Python value (str, int, float, bool).
|
|
418
|
+
:return: The corresponding FieldValuePbo object.
|
|
419
|
+
"""
|
|
420
|
+
field_value = FieldValuePbo()
|
|
421
|
+
if isinstance(value, str):
|
|
422
|
+
field_value.string_value = value
|
|
423
|
+
elif isinstance(value, int):
|
|
424
|
+
field_value.int_value = value
|
|
425
|
+
elif isinstance(value, float):
|
|
426
|
+
field_value.double_value = value
|
|
427
|
+
elif isinstance(value, bool):
|
|
428
|
+
field_value.bool_value = value
|
|
429
|
+
else:
|
|
430
|
+
raise ValueError(f"Unsupported value type: {type(value)}")
|
|
431
|
+
return field_value
|
|
432
|
+
|
|
412
433
|
@staticmethod
|
|
413
434
|
def field_pbo_to_value(value: FieldValuePbo) -> FieldValue:
|
|
414
435
|
"""
|
sapiopycommons/ai/test_client.py
CHANGED
|
@@ -6,6 +6,7 @@ from typing import Any
|
|
|
6
6
|
import grpc
|
|
7
7
|
from sapiopylib.rest.User import SapioUser
|
|
8
8
|
|
|
9
|
+
from sapiopycommons.ai.api.fielddefinitions.proto.fields_pb2 import FieldValuePbo
|
|
9
10
|
from sapiopycommons.ai.api.plan.converter.proto.converter_pb2 import ConverterDetailsRequestPbo, \
|
|
10
11
|
ConverterDetailsResponsePbo, ConvertResponsePbo, ConvertRequestPbo
|
|
11
12
|
from sapiopycommons.ai.api.plan.converter.proto.converter_pb2_grpc import ConverterServiceStub
|
|
@@ -248,7 +249,7 @@ class TestClient:
|
|
|
248
249
|
ProcessStepRequestPbo(
|
|
249
250
|
sapio_user=self.connection,
|
|
250
251
|
tool_name=tool_name,
|
|
251
|
-
config_field_values=self._config_fields,
|
|
252
|
+
config_field_values={x: ProtobufUtils.value_to_field_pbo(y) for x, y in self._config_fields.items()},
|
|
252
253
|
dry_run=is_dry_run,
|
|
253
254
|
verbose_logging=True,
|
|
254
255
|
input=[
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: sapiopycommons
|
|
3
|
-
Version: 2025.8.
|
|
3
|
+
Version: 2025.8.14a702
|
|
4
4
|
Summary: Official Sapio Python API Utilities Package
|
|
5
5
|
Project-URL: Homepage, https://github.com/sapiosciences
|
|
6
6
|
Author-email: Jonathan Steck <jsteck@sapiosciences.com>, Yechen Qiao <yqiao@sapiosciences.com>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
sapiopycommons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
sapiopycommons/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
sapiopycommons/ai/converter_service_base.py,sha256=w4_PXjlk7_F5AUMlPUhKJ9gZlxY9RNG6yH9cDDFROuo,4620
|
|
4
|
-
sapiopycommons/ai/protobuf_utils.py,sha256=
|
|
5
|
-
sapiopycommons/ai/test_client.py,sha256=
|
|
4
|
+
sapiopycommons/ai/protobuf_utils.py,sha256=QdYcelIvOIKBV5u_KR_Fh06kZ0eJDIb5ZVnfqV01FeE,24601
|
|
5
|
+
sapiopycommons/ai/test_client.py,sha256=eSroM3DAi3vZc5FKpg_ybr_IxW8tWSXCJH24FF-W2os,14292
|
|
6
6
|
sapiopycommons/ai/tool_service_base.py,sha256=LkmX_kQyHAQtR02S8x6hKc0DnR7mmNNcykBrn87sVVw,43473
|
|
7
7
|
sapiopycommons/ai/api/fielddefinitions/proto/fields_pb2.py,sha256=YcZjb_YM-XeLErM8hEC_S7vGMVGvcXAMGs2b-u5zvOE,2377
|
|
8
8
|
sapiopycommons/ai/api/fielddefinitions/proto/fields_pb2.pyi,sha256=FwtXmNAf7iYGEFm4kbqb04v77jNHbZg18ZmEDhle_bU,1444
|
|
@@ -97,7 +97,7 @@ sapiopycommons/webhook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
97
97
|
sapiopycommons/webhook/webhook_context.py,sha256=D793uLsb1691SalaPnBUk3rOSxn_hYLhdvkaIxjNXss,1909
|
|
98
98
|
sapiopycommons/webhook/webhook_handlers.py,sha256=7o_wXOruhT9auNh8OfhJAh4WhhiPKij67FMBSpGPICc,39939
|
|
99
99
|
sapiopycommons/webhook/webservice_handlers.py,sha256=cvW6Mk_110BzYqkbk63Kg7jWrltBCDALOlkJRu8h4VQ,14300
|
|
100
|
-
sapiopycommons-2025.8.
|
|
101
|
-
sapiopycommons-2025.8.
|
|
102
|
-
sapiopycommons-2025.8.
|
|
103
|
-
sapiopycommons-2025.8.
|
|
100
|
+
sapiopycommons-2025.8.14a702.dist-info/METADATA,sha256=PimqQ_Jq_JL9k_0BjhBRm0Y9fulCw9GjHbE5rmQpdfU,3143
|
|
101
|
+
sapiopycommons-2025.8.14a702.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
102
|
+
sapiopycommons-2025.8.14a702.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
|
|
103
|
+
sapiopycommons-2025.8.14a702.dist-info/RECORD,,
|
|
File without changes
|
{sapiopycommons-2025.8.12a699.dist-info → sapiopycommons-2025.8.14a702.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|