sapiopycommons 2025.9.8a728__tar.gz → 2025.9.8a730__tar.gz
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-2025.9.8a728 → sapiopycommons-2025.9.8a730}/PKG-INFO +1 -1
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/pyproject.toml +1 -1
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/server.py +28 -2
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/tool_service_base.py +18 -4
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/.gitignore +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/LICENSE +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/README.md +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/converter_service_base.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/fielddefinitions/fields_pb2.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/fielddefinitions/fields_pb2.pyi +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/fielddefinitions/fields_pb2_grpc.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/fielddefinitions/velox_field_def_pb2.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/fielddefinitions/velox_field_def_pb2.pyi +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/fielddefinitions/velox_field_def_pb2_grpc.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/converter/converter_pb2.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/converter/converter_pb2.pyi +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/converter/converter_pb2_grpc.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/item/item_container_pb2.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/item/item_container_pb2.pyi +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/item/item_container_pb2_grpc.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/script/script_pb2.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/script/script_pb2.pyi +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/script/script_pb2_grpc.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/step_output_pb2.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/step_output_pb2.pyi +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/step_output_pb2_grpc.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/step_pb2.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/step_pb2.pyi +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/step_pb2_grpc.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/tool/entry_pb2.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/tool/entry_pb2.pyi +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/tool/entry_pb2_grpc.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/tool/tool_pb2.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/tool/tool_pb2.pyi +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/plan/tool/tool_pb2_grpc.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/session/sapio_conn_info_pb2.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/session/sapio_conn_info_pb2.pyi +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protoapi/session/sapio_conn_info_pb2_grpc.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protobuf_utils.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/test_client.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/callbacks/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/callbacks/callback_util.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/callbacks/field_builder.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/chem/IndigoMolecules.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/chem/Molecules.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/chem/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/customreport/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/customreport/auto_pagers.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/customreport/column_builder.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/customreport/custom_report_builder.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/customreport/term_builder.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/datatype/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/datatype/attachment_util.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/datatype/data_fields.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/datatype/pseudo_data_types.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/eln/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/eln/experiment_cache.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/eln/experiment_handler.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/eln/experiment_report_util.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/eln/experiment_step_factory.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/eln/experiment_tags.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/eln/plate_designer.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/eln/step_creation.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/complex_data_loader.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/file_bridge.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/file_bridge_handler.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/file_data_handler.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/file_util.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/file_validator.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/file_writer.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/temp_files.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/flowcyto/flow_cyto.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/flowcyto/flowcyto_data.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/accession_service.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/aliases.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/audit_log.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/custom_report_util.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/data_structure_util.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/directive_util.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/exceptions.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/html_formatter.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/popup_util.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/sapio_links.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/storage_util.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/time_util.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/multimodal/multimodal.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/multimodal/multimodal_data.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/processtracking/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/processtracking/custom_workflow_handler.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/processtracking/endpoints.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/recordmodel/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/recordmodel/record_handler.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/rules/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/rules/eln_rule_handler.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/rules/on_save_rule_handler.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/samples/aliquot.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/sftpconnect/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/sftpconnect/sftp_builder.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/webhook/__init__.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/webhook/webhook_context.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/webhook/webhook_handlers.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/webhook/webservice_handlers.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/AF-A0A009IHW8-F1-model_v4.cif +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/_do_not_add_init_py_here +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/accession_test.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/aliquot_test.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/bio_reg_test.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/chem_test.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/chem_test_curation_queue.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/curation_queue_test.sdf +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/data_type_models.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/flowcyto/101_DEN084Y5_15_E01_008_clean.fcs +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/flowcyto/101_DEN084Y5_15_E03_009_clean.fcs +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/flowcyto/101_DEN084Y5_15_E05_010_clean.fcs +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/flowcyto/8_color_ICS.wsp +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/flowcyto/COVID19_W_001_O.fcs +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/flowcyto_test.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/kappa.chains.fasta +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/mafft_test.py +0 -0
- {sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/test.gb +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: sapiopycommons
|
|
3
|
-
Version: 2025.9.
|
|
3
|
+
Version: 2025.9.8a730
|
|
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,4 +1,7 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
import asyncio
|
|
4
|
+
from argparse import ArgumentParser
|
|
2
5
|
from typing import Any
|
|
3
6
|
|
|
4
7
|
import grpc
|
|
@@ -16,12 +19,30 @@ class SapioGrpcServer:
|
|
|
16
19
|
"""
|
|
17
20
|
port: int
|
|
18
21
|
options: list[tuple[str, Any]]
|
|
22
|
+
debug_mode: bool
|
|
19
23
|
_converter_services: list[ConverterServiceServicer]
|
|
20
24
|
_script_services: list[ScriptServiceServicer]
|
|
21
25
|
_tool_services: list[ToolServiceServicer]
|
|
22
26
|
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
@staticmethod
|
|
28
|
+
def args_parser() -> ArgumentParser:
|
|
29
|
+
"""
|
|
30
|
+
Create an argument parser for the gRPC server.
|
|
31
|
+
|
|
32
|
+
:return: The argument parser.
|
|
33
|
+
"""
|
|
34
|
+
parser = ArgumentParser()
|
|
35
|
+
parser.add_argument("--debug_mode", "-d", action="store_true", type=bool)
|
|
36
|
+
parser.add_argument("--port", "-p", default=50051, type=int)
|
|
37
|
+
parser.add_argument("--message_mb_size", "-s", default=1024, type=int)
|
|
38
|
+
return parser
|
|
39
|
+
|
|
40
|
+
@staticmethod
|
|
41
|
+
def from_args(options: list[tuple[str, Any]] | None = None) -> SapioGrpcServer:
|
|
42
|
+
return SapioGrpcServer(options=options, **vars(SapioGrpcServer.args_parser().parse_args()))
|
|
43
|
+
|
|
44
|
+
def __init__(self, port: int = 50051, message_mb_size: int = 1024, debug_mode: bool = False,
|
|
45
|
+
options: list[tuple[str, Any]] | None = None) -> None:
|
|
25
46
|
"""
|
|
26
47
|
Initialize the gRPC server with the specified port and message size.
|
|
27
48
|
|
|
@@ -29,6 +50,7 @@ class SapioGrpcServer:
|
|
|
29
50
|
:param message_mb_size: The maximum size of a message in megabytes.
|
|
30
51
|
:param options: Additional gRPC server options to set. This should be a list of tuples where the first item is
|
|
31
52
|
the option name and the second item is the option value.
|
|
53
|
+
:param debug_mode: Sets the debug mode for services.
|
|
32
54
|
"""
|
|
33
55
|
if isinstance(port, str):
|
|
34
56
|
port = int(port)
|
|
@@ -39,6 +61,9 @@ class SapioGrpcServer:
|
|
|
39
61
|
]
|
|
40
62
|
if options:
|
|
41
63
|
self.options.extend(options)
|
|
64
|
+
self.debug_mode = debug_mode
|
|
65
|
+
if debug_mode:
|
|
66
|
+
print("Debug mode is enabled.")
|
|
42
67
|
self._converter_services = []
|
|
43
68
|
self._script_services = []
|
|
44
69
|
self._tool_services = []
|
|
@@ -65,6 +90,7 @@ class SapioGrpcServer:
|
|
|
65
90
|
|
|
66
91
|
:param service: The tool service to register with the server.
|
|
67
92
|
"""
|
|
93
|
+
service.debug_mode = self.debug_mode
|
|
68
94
|
self._tool_services.append(service)
|
|
69
95
|
|
|
70
96
|
def start(self) -> None:
|
|
@@ -217,6 +217,8 @@ class ToolServiceBase(ToolServiceServicer, ABC):
|
|
|
217
217
|
A base class for implementing a tool service. Subclasses should implement the register_tools method to register
|
|
218
218
|
their tools with the service.
|
|
219
219
|
"""
|
|
220
|
+
debug_mode: bool = False
|
|
221
|
+
|
|
220
222
|
def GetToolDetails(self, request: ToolDetailsRequestPbo, context: ServicerContext) -> ToolDetailsResponsePbo:
|
|
221
223
|
try:
|
|
222
224
|
# Get the tool details from the registered tools.
|
|
@@ -327,7 +329,7 @@ class ToolServiceBase(ToolServiceServicer, ABC):
|
|
|
327
329
|
tool: ToolBase = registered_tools[find_tool]()
|
|
328
330
|
try:
|
|
329
331
|
# Setup the tool with details from the request.
|
|
330
|
-
tool.setup(user, request, context)
|
|
332
|
+
tool.setup(user, request, context, self.debug_mode)
|
|
331
333
|
# Validate that the provided inputs match the tool's expected inputs.
|
|
332
334
|
if len(request.input) != len(tool.input_configs):
|
|
333
335
|
msg: str = (f"Expected {len(tool.input_configs)} inputs for this tool, but got {len(request.input)} "
|
|
@@ -350,8 +352,16 @@ class ToolServiceBase(ToolServiceServicer, ABC):
|
|
|
350
352
|
tool.log_exception("Exception occurred during tool execution.", e)
|
|
351
353
|
return False, str(e), [], tool.logs
|
|
352
354
|
finally:
|
|
353
|
-
# Clean up any temporary files created by the tool.
|
|
354
|
-
|
|
355
|
+
# Clean up any temporary files created by the tool. If in debug mode, then log the files instead
|
|
356
|
+
# so that they can be manually inspected.
|
|
357
|
+
if self.debug_mode:
|
|
358
|
+
print("Temporary files/directories created during tool execution:")
|
|
359
|
+
for directory in tool.temp_data.directories:
|
|
360
|
+
print(f"\tDirectory: {directory}")
|
|
361
|
+
for file in tool.temp_data.files:
|
|
362
|
+
print(f"\tFile: {file}")
|
|
363
|
+
else:
|
|
364
|
+
tool.temp_data.cleanup()
|
|
355
365
|
|
|
356
366
|
|
|
357
367
|
class ToolBase(ABC):
|
|
@@ -370,6 +380,7 @@ class ToolBase(ABC):
|
|
|
370
380
|
logs: list[str]
|
|
371
381
|
logger: Logger
|
|
372
382
|
verbose_logging: bool
|
|
383
|
+
debug_mode: bool
|
|
373
384
|
|
|
374
385
|
temp_data: TempFileHandler
|
|
375
386
|
|
|
@@ -415,7 +426,7 @@ class ToolBase(ABC):
|
|
|
415
426
|
self.logger = logging.getLogger(f"ToolBase.{self._name}")
|
|
416
427
|
ensure_logger_initialized(self.logger)
|
|
417
428
|
|
|
418
|
-
def setup(self, user: SapioUser, request: ProcessStepRequestPbo, context: ServicerContext) -> None:
|
|
429
|
+
def setup(self, user: SapioUser, request: ProcessStepRequestPbo, context: ServicerContext, debug_mode: bool) -> None:
|
|
419
430
|
"""
|
|
420
431
|
Setup the tool with the user, request, and context. This method can be overridden by subclasses to perform
|
|
421
432
|
additional setup.
|
|
@@ -424,11 +435,14 @@ class ToolBase(ABC):
|
|
|
424
435
|
system.
|
|
425
436
|
:param request: The request object containing the input data.
|
|
426
437
|
:param context: The gRPC context.
|
|
438
|
+
:param debug_mode: If true, the tool should run in debug mode, providing additional logging and not cleaning
|
|
439
|
+
up temporary files.
|
|
427
440
|
"""
|
|
428
441
|
self.user = user
|
|
429
442
|
self.request = request
|
|
430
443
|
self.context = context
|
|
431
444
|
self.verbose_logging = request.verbose_logging
|
|
445
|
+
self.debug_mode = debug_mode
|
|
432
446
|
|
|
433
447
|
def add_input(self, container_type: ContainerType, content_type: str, display_name: str, description: str,
|
|
434
448
|
structure_example: str | bytes | None = None, validation: str | None = None,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/protobuf_utils.py
RENAMED
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/ai/test_client.py
RENAMED
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/callbacks/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/chem/Molecules.py
RENAMED
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/chem/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/datatype/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/eln/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/eln/plate_designer.py
RENAMED
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/eln/step_creation.py
RENAMED
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/file_bridge.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/file_util.py
RENAMED
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/file_writer.py
RENAMED
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/files/temp_files.py
RENAMED
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/flowcyto/flow_cyto.py
RENAMED
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/aliases.py
RENAMED
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/audit_log.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/popup_util.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/general/time_util.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/rules/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/samples/aliquot.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/src/sapiopycommons/webhook/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/AF-A0A009IHW8-F1-model_v4.cif
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/chem_test_curation_queue.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sapiopycommons-2025.9.8a728 → sapiopycommons-2025.9.8a730}/tests/flowcyto/COVID19_W_001_O.fcs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|