sapiopycommons 2025.7.15a611__tar.gz → 2025.7.17a612__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.7.15a611 → sapiopycommons-2025.7.17a612}/PKG-INFO +1 -1
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/pyproject.toml +1 -1
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/callbacks/callback_util.py +14 -21
- sapiopycommons-2025.7.15a611/src/sapiopycommons/ai/tool_of_tools.py +0 -917
- sapiopycommons-2025.7.15a611/src/sapiopycommons/files/file_text_converter.py +0 -207
- sapiopycommons-2025.7.15a611/src/sapiopycommons/webhook/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/.gitignore +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/LICENSE +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/README.md +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611/src/sapiopycommons/ai → sapiopycommons-2025.7.17a612/src/sapiopycommons/callbacks}/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/callbacks/field_builder.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/chem/IndigoMolecules.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/chem/Molecules.py +0 -0
- {sapiopycommons-2025.7.15a611/src/sapiopycommons/callbacks → sapiopycommons-2025.7.17a612/src/sapiopycommons/chem}/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611/src/sapiopycommons/chem → sapiopycommons-2025.7.17a612/src/sapiopycommons/customreport}/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/customreport/auto_pagers.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/customreport/column_builder.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/customreport/custom_report_builder.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/customreport/term_builder.py +0 -0
- {sapiopycommons-2025.7.15a611/src/sapiopycommons/customreport → sapiopycommons-2025.7.17a612/src/sapiopycommons/datatype}/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/datatype/attachment_util.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/datatype/data_fields.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/datatype/pseudo_data_types.py +0 -0
- {sapiopycommons-2025.7.15a611/src/sapiopycommons/datatype → sapiopycommons-2025.7.17a612/src/sapiopycommons/eln}/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/experiment_cache.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/experiment_handler.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/experiment_report_util.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/experiment_step_factory.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/experiment_tags.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/plate_designer.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/step_creation.py +0 -0
- {sapiopycommons-2025.7.15a611/src/sapiopycommons/eln → sapiopycommons-2025.7.17a612/src/sapiopycommons/files}/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/complex_data_loader.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/file_bridge.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/file_bridge_handler.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/file_data_handler.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/file_util.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/file_validator.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/file_writer.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/flowcyto/flow_cyto.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/flowcyto/flowcyto_data.py +0 -0
- {sapiopycommons-2025.7.15a611/src/sapiopycommons/files → sapiopycommons-2025.7.17a612/src/sapiopycommons/general}/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/accession_service.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/aliases.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/audit_log.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/custom_report_util.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/data_structure_util.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/directive_util.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/exceptions.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/html_formatter.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/popup_util.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/sapio_links.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/storage_util.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/time_util.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/multimodal/multimodal.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/multimodal/multimodal_data.py +0 -0
- {sapiopycommons-2025.7.15a611/src/sapiopycommons/general → sapiopycommons-2025.7.17a612/src/sapiopycommons/processtracking}/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/processtracking/custom_workflow_handler.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/processtracking/endpoints.py +0 -0
- {sapiopycommons-2025.7.15a611/src/sapiopycommons/processtracking → sapiopycommons-2025.7.17a612/src/sapiopycommons/recordmodel}/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/recordmodel/record_handler.py +0 -0
- {sapiopycommons-2025.7.15a611/src/sapiopycommons/recordmodel → sapiopycommons-2025.7.17a612/src/sapiopycommons/rules}/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/rules/eln_rule_handler.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/rules/on_save_rule_handler.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/samples/aliquot.py +0 -0
- {sapiopycommons-2025.7.15a611/src/sapiopycommons/rules → sapiopycommons-2025.7.17a612/src/sapiopycommons/sftpconnect}/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/sftpconnect/sftp_builder.py +0 -0
- {sapiopycommons-2025.7.15a611/src/sapiopycommons/sftpconnect → sapiopycommons-2025.7.17a612/src/sapiopycommons/webhook}/__init__.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/webhook/webhook_context.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/webhook/webhook_handlers.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/webhook/webservice_handlers.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/AF-A0A009IHW8-F1-model_v4.cif +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/_do_not_add_init_py_here +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/accession_test.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/aliquot_test.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/bio_reg_test.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/chem_test.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/chem_test_curation_queue.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/curation_queue_test.sdf +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/data_type_models.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/flowcyto/101_DEN084Y5_15_E01_008_clean.fcs +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/flowcyto/101_DEN084Y5_15_E03_009_clean.fcs +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/flowcyto/101_DEN084Y5_15_E05_010_clean.fcs +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/flowcyto/8_color_ICS.wsp +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/flowcyto/COVID19_W_001_O.fcs +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/flowcyto_test.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/kappa.chains.fasta +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/mafft_test.py +0 -0
- {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/test.gb +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: sapiopycommons
|
|
3
|
-
Version: 2025.7.
|
|
3
|
+
Version: 2025.7.17a612
|
|
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>
|
|
@@ -1812,8 +1812,7 @@ class CallbackUtil:
|
|
|
1812
1812
|
return response
|
|
1813
1813
|
|
|
1814
1814
|
def request_file(self, title: str, exts: Iterable[str] | None = None,
|
|
1815
|
-
show_image_editor: bool = False, show_camera_button: bool = False,
|
|
1816
|
-
*, enforce_file_extensions: bool = True) -> tuple[str, bytes]:
|
|
1815
|
+
show_image_editor: bool = False, show_camera_button: bool = False) -> tuple[str, bytes]:
|
|
1817
1816
|
"""
|
|
1818
1817
|
Request a single file from the user.
|
|
1819
1818
|
|
|
@@ -1823,8 +1822,6 @@ class CallbackUtil:
|
|
|
1823
1822
|
:param show_image_editor: Whether the user will see an image editor when image is uploaded in this file prompt.
|
|
1824
1823
|
:param show_camera_button: Whether the user will be able to use camera to take a picture as an upload request,
|
|
1825
1824
|
rather than selecting an existing file.
|
|
1826
|
-
:param enforce_file_extensions: If true, then the file extensions provided in the exts parameter will be
|
|
1827
|
-
enforced. If false, then the user may upload any file type.
|
|
1828
1825
|
:return: The file name and bytes of the uploaded file.
|
|
1829
1826
|
"""
|
|
1830
1827
|
# If no extensions were provided, use an empty list for the extensions instead.
|
|
@@ -1844,12 +1841,11 @@ class CallbackUtil:
|
|
|
1844
1841
|
file_path: str = self.__send_dialog(request, self.callback.show_file_dialog, data_sink=do_consume)
|
|
1845
1842
|
|
|
1846
1843
|
# Verify that each of the file given matches the expected extension(s).
|
|
1847
|
-
self.__verify_file(file_path, sink.data, exts
|
|
1844
|
+
self.__verify_file(file_path, sink.data, exts)
|
|
1848
1845
|
return file_path, sink.data
|
|
1849
1846
|
|
|
1850
1847
|
def request_files(self, title: str, exts: Iterable[str] | None = None,
|
|
1851
|
-
show_image_editor: bool = False, show_camera_button: bool = False,
|
|
1852
|
-
*, enforce_file_extensions: bool = True) -> dict[str, bytes]:
|
|
1848
|
+
show_image_editor: bool = False, show_camera_button: bool = False) -> dict[str, bytes]:
|
|
1853
1849
|
"""
|
|
1854
1850
|
Request multiple files from the user.
|
|
1855
1851
|
|
|
@@ -1859,8 +1855,6 @@ class CallbackUtil:
|
|
|
1859
1855
|
:param show_image_editor: Whether the user will see an image editor when image is uploaded in this file prompt.
|
|
1860
1856
|
:param show_camera_button: Whether the user will be able to use camera to take a picture as an upload request,
|
|
1861
1857
|
rather than selecting an existing file.
|
|
1862
|
-
:param enforce_file_extensions: If true, then the file extensions provided in the exts parameter will be
|
|
1863
|
-
enforced. If false, then the user may upload any file type.
|
|
1864
1858
|
:return: A dictionary of file name to file bytes for each file the user uploaded.
|
|
1865
1859
|
"""
|
|
1866
1860
|
# If no extensions were provided, use an empty list for the extensions instead.
|
|
@@ -1876,7 +1870,7 @@ class CallbackUtil:
|
|
|
1876
1870
|
for file_path in file_paths:
|
|
1877
1871
|
sink = InMemoryRecordDataSink(self.user)
|
|
1878
1872
|
sink.consume_client_callback_file_path_data(file_path)
|
|
1879
|
-
self.__verify_file(file_path, sink.data, exts
|
|
1873
|
+
self.__verify_file(file_path, sink.data, exts)
|
|
1880
1874
|
ret_dict.update({file_path: sink.data})
|
|
1881
1875
|
|
|
1882
1876
|
return ret_dict
|
|
@@ -1893,17 +1887,16 @@ class CallbackUtil:
|
|
|
1893
1887
|
"""
|
|
1894
1888
|
if file_path is None or len(file_path) == 0 or file_bytes is None or len(file_bytes) == 0:
|
|
1895
1889
|
raise SapioUserErrorException("Empty file provided or file unable to be read.")
|
|
1896
|
-
if
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
+ (",".join(allowed_extensions)))
|
|
1890
|
+
if allowed_extensions:
|
|
1891
|
+
matches: bool = False
|
|
1892
|
+
for ext in allowed_extensions:
|
|
1893
|
+
# FR-47690: Changed to a case-insensitive match.
|
|
1894
|
+
if file_path.casefold().endswith("." + ext.lstrip(".").casefold()):
|
|
1895
|
+
matches = True
|
|
1896
|
+
break
|
|
1897
|
+
if matches is False:
|
|
1898
|
+
raise SapioUserErrorException("Unsupported file type. Expecting the following extension(s): "
|
|
1899
|
+
+ (",".join(allowed_extensions)))
|
|
1907
1900
|
|
|
1908
1901
|
def write_file(self, file_name: str, file_data: str | bytes) -> None:
|
|
1909
1902
|
"""
|