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.

Files changed (90) hide show
  1. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/PKG-INFO +1 -1
  2. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/pyproject.toml +1 -1
  3. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/callbacks/callback_util.py +14 -21
  4. sapiopycommons-2025.7.15a611/src/sapiopycommons/ai/tool_of_tools.py +0 -917
  5. sapiopycommons-2025.7.15a611/src/sapiopycommons/files/file_text_converter.py +0 -207
  6. sapiopycommons-2025.7.15a611/src/sapiopycommons/webhook/__init__.py +0 -0
  7. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/.gitignore +0 -0
  8. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/LICENSE +0 -0
  9. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/README.md +0 -0
  10. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/__init__.py +0 -0
  11. {sapiopycommons-2025.7.15a611/src/sapiopycommons/ai → sapiopycommons-2025.7.17a612/src/sapiopycommons/callbacks}/__init__.py +0 -0
  12. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/callbacks/field_builder.py +0 -0
  13. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/chem/IndigoMolecules.py +0 -0
  14. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/chem/Molecules.py +0 -0
  15. {sapiopycommons-2025.7.15a611/src/sapiopycommons/callbacks → sapiopycommons-2025.7.17a612/src/sapiopycommons/chem}/__init__.py +0 -0
  16. {sapiopycommons-2025.7.15a611/src/sapiopycommons/chem → sapiopycommons-2025.7.17a612/src/sapiopycommons/customreport}/__init__.py +0 -0
  17. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/customreport/auto_pagers.py +0 -0
  18. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/customreport/column_builder.py +0 -0
  19. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/customreport/custom_report_builder.py +0 -0
  20. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/customreport/term_builder.py +0 -0
  21. {sapiopycommons-2025.7.15a611/src/sapiopycommons/customreport → sapiopycommons-2025.7.17a612/src/sapiopycommons/datatype}/__init__.py +0 -0
  22. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/datatype/attachment_util.py +0 -0
  23. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/datatype/data_fields.py +0 -0
  24. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/datatype/pseudo_data_types.py +0 -0
  25. {sapiopycommons-2025.7.15a611/src/sapiopycommons/datatype → sapiopycommons-2025.7.17a612/src/sapiopycommons/eln}/__init__.py +0 -0
  26. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/experiment_cache.py +0 -0
  27. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/experiment_handler.py +0 -0
  28. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/experiment_report_util.py +0 -0
  29. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/experiment_step_factory.py +0 -0
  30. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/experiment_tags.py +0 -0
  31. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/plate_designer.py +0 -0
  32. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/eln/step_creation.py +0 -0
  33. {sapiopycommons-2025.7.15a611/src/sapiopycommons/eln → sapiopycommons-2025.7.17a612/src/sapiopycommons/files}/__init__.py +0 -0
  34. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/complex_data_loader.py +0 -0
  35. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/file_bridge.py +0 -0
  36. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/file_bridge_handler.py +0 -0
  37. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/file_data_handler.py +0 -0
  38. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/file_util.py +0 -0
  39. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/file_validator.py +0 -0
  40. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/files/file_writer.py +0 -0
  41. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/flowcyto/flow_cyto.py +0 -0
  42. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/flowcyto/flowcyto_data.py +0 -0
  43. {sapiopycommons-2025.7.15a611/src/sapiopycommons/files → sapiopycommons-2025.7.17a612/src/sapiopycommons/general}/__init__.py +0 -0
  44. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/accession_service.py +0 -0
  45. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/aliases.py +0 -0
  46. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/audit_log.py +0 -0
  47. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/custom_report_util.py +0 -0
  48. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/data_structure_util.py +0 -0
  49. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/directive_util.py +0 -0
  50. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/exceptions.py +0 -0
  51. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/html_formatter.py +0 -0
  52. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/popup_util.py +0 -0
  53. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/sapio_links.py +0 -0
  54. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/storage_util.py +0 -0
  55. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/general/time_util.py +0 -0
  56. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/multimodal/multimodal.py +0 -0
  57. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/multimodal/multimodal_data.py +0 -0
  58. {sapiopycommons-2025.7.15a611/src/sapiopycommons/general → sapiopycommons-2025.7.17a612/src/sapiopycommons/processtracking}/__init__.py +0 -0
  59. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/processtracking/custom_workflow_handler.py +0 -0
  60. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/processtracking/endpoints.py +0 -0
  61. {sapiopycommons-2025.7.15a611/src/sapiopycommons/processtracking → sapiopycommons-2025.7.17a612/src/sapiopycommons/recordmodel}/__init__.py +0 -0
  62. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/recordmodel/record_handler.py +0 -0
  63. {sapiopycommons-2025.7.15a611/src/sapiopycommons/recordmodel → sapiopycommons-2025.7.17a612/src/sapiopycommons/rules}/__init__.py +0 -0
  64. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/rules/eln_rule_handler.py +0 -0
  65. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/rules/on_save_rule_handler.py +0 -0
  66. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/samples/aliquot.py +0 -0
  67. {sapiopycommons-2025.7.15a611/src/sapiopycommons/rules → sapiopycommons-2025.7.17a612/src/sapiopycommons/sftpconnect}/__init__.py +0 -0
  68. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/sftpconnect/sftp_builder.py +0 -0
  69. {sapiopycommons-2025.7.15a611/src/sapiopycommons/sftpconnect → sapiopycommons-2025.7.17a612/src/sapiopycommons/webhook}/__init__.py +0 -0
  70. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/webhook/webhook_context.py +0 -0
  71. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/webhook/webhook_handlers.py +0 -0
  72. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/src/sapiopycommons/webhook/webservice_handlers.py +0 -0
  73. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/AF-A0A009IHW8-F1-model_v4.cif +0 -0
  74. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/_do_not_add_init_py_here +0 -0
  75. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/accession_test.py +0 -0
  76. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/aliquot_test.py +0 -0
  77. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/bio_reg_test.py +0 -0
  78. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/chem_test.py +0 -0
  79. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/chem_test_curation_queue.py +0 -0
  80. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/curation_queue_test.sdf +0 -0
  81. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/data_type_models.py +0 -0
  82. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/flowcyto/101_DEN084Y5_15_E01_008_clean.fcs +0 -0
  83. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/flowcyto/101_DEN084Y5_15_E03_009_clean.fcs +0 -0
  84. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/flowcyto/101_DEN084Y5_15_E05_010_clean.fcs +0 -0
  85. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/flowcyto/8_color_ICS.wsp +0 -0
  86. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/flowcyto/COVID19_W_001_O.fcs +0 -0
  87. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/flowcyto_test.py +0 -0
  88. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/kappa.chains.fasta +0 -0
  89. {sapiopycommons-2025.7.15a611 → sapiopycommons-2025.7.17a612}/tests/mafft_test.py +0 -0
  90. {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.15a611
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>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sapiopycommons"
7
- version='2025.07.15a611'
7
+ version='2025.07.17a612'
8
8
  authors = [
9
9
  { name="Jonathan Steck", email="jsteck@sapiosciences.com" },
10
10
  { name="Yechen Qiao", email="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 if enforce_file_extensions else None)
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 if enforce_file_extensions else None)
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 not allowed_extensions:
1897
- return
1898
- matches: bool = False
1899
- for ext in allowed_extensions:
1900
- # FR-47690: Changed to a case-insensitive match.
1901
- if file_path.casefold().endswith("." + ext.lstrip(".").casefold()):
1902
- matches = True
1903
- break
1904
- if not matches:
1905
- raise SapioUserErrorException("Unsupported file type. Expecting the following extension(s): "
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
  """