sapiopycommons 2025.8.15a704__py3-none-any.whl → 2025.8.15a705__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.

@@ -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
@@ -103,7 +104,7 @@ class TestClient:
103
104
  options: list[tuple[str, Any]] | None
104
105
  connection: SapioConnectionInfoPbo
105
106
  _request_inputs: list[StepItemContainerPbo]
106
- _config_fields: dict[str, Any]
107
+ _config_fields: dict[str, FieldValuePbo]
107
108
 
108
109
  def __init__(self, grpc_server_url: str, user: SapioUser | None = None,
109
110
  options: list[tuple[str, Any]] | None = None):
@@ -172,22 +173,25 @@ class TestClient:
172
173
  """
173
174
  self._request_inputs.clear()
174
175
 
175
- def add_config_field(self, field_name: str, value: Any) -> None:
176
+ def add_config_field(self, field_name: str, value: FieldValue) -> None:
176
177
  """
177
178
  Add a configuration field value to the next request.
178
179
 
179
180
  :param field_name: The name of the configuration field.
180
181
  :param value: The value to set for the configuration field.
181
182
  """
183
+ if not isinstance(value, FieldValuePbo):
184
+ value = ProtobufUtils.value_to_field_pbo(value)
182
185
  self._config_fields[field_name] = value
183
186
 
184
- def add_config_fields(self, config_fields: dict[str, Any]) -> None:
187
+ def add_config_fields(self, config_fields: dict[str, FieldValue]) -> None:
185
188
  """
186
189
  Add multiple configuration field values to the next request.
187
190
 
188
191
  :param config_fields: A dictionary of configuration field names and their corresponding values.
189
192
  """
190
- self._config_fields.update(config_fields)
193
+ for x, y in config_fields.items():
194
+ self.add_config_field(x, y)
191
195
 
192
196
  def clear_configs(self) -> None:
193
197
  """
@@ -248,7 +252,7 @@ class TestClient:
248
252
  ProcessStepRequestPbo(
249
253
  sapio_user=self.connection,
250
254
  tool_name=tool_name,
251
- config_field_values={x: ProtobufUtils.value_to_field_pbo(y) for x, y in self._config_fields.items()},
255
+ config_field_values=self._config_fields,
252
256
  dry_run=is_dry_run,
253
257
  verbose_logging=True,
254
258
  input=[
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sapiopycommons
3
- Version: 2025.8.15a704
3
+ Version: 2025.8.15a705
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>
@@ -2,7 +2,7 @@ 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
4
  sapiopycommons/ai/protobuf_utils.py,sha256=QdYcelIvOIKBV5u_KR_Fh06kZ0eJDIb5ZVnfqV01FeE,24601
5
- sapiopycommons/ai/test_client.py,sha256=fo8j_1SjkR6eWAdO3_NU6CsCclOqQGBW9woSUjuOSnM,14210
5
+ sapiopycommons/ai/test_client.py,sha256=CBacWKFVLdrStxuyRnJP5ifDen5dpvkgdF9mz-_vlu4,14397
6
6
  sapiopycommons/ai/tool_service_base.py,sha256=kfMWU0OndYl0XnKwztHGTT-L20Mpq7VUI-vhwyfJkkI,43375
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.15a704.dist-info/METADATA,sha256=gRXt65SiBgfQjkbYDqEgSaoVxLfxe7G7tFlc2dzoero,3143
101
- sapiopycommons-2025.8.15a704.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
102
- sapiopycommons-2025.8.15a704.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
103
- sapiopycommons-2025.8.15a704.dist-info/RECORD,,
100
+ sapiopycommons-2025.8.15a705.dist-info/METADATA,sha256=jzsSGPS3vU0kRu46cYHefEm0kFnErZgXJ_jQn8iq2PI,3143
101
+ sapiopycommons-2025.8.15a705.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
102
+ sapiopycommons-2025.8.15a705.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
103
+ sapiopycommons-2025.8.15a705.dist-info/RECORD,,