sapiopycommons 2024.6.24a263__py3-none-any.whl → 2024.6.26a266__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.

@@ -14,8 +14,8 @@ from sapiopylib.rest.pojo.datatype.FieldDefinition import AbstractVeloxFieldDefi
14
14
  VeloxIntegerFieldDefinition, VeloxDoubleFieldDefinition, FieldDefinitionParser
15
15
  from sapiopylib.rest.pojo.webhook.ClientCallbackRequest import OptionDialogRequest, ListDialogRequest, \
16
16
  FormEntryDialogRequest, InputDialogCriteria, TableEntryDialogRequest, ESigningRequestPojo, \
17
- DataRecordSelectionRequest, DataRecordDialogRequest, InputSelectionRequest, FilePromptRequest, \
18
- MultiFilePromptRequest
17
+ DataRecordDialogRequest, InputSelectionRequest, FilePromptRequest, MultiFilePromptRequest, \
18
+ TempTableSelectionRequest
19
19
  from sapiopylib.rest.pojo.webhook.ClientCallbackResult import ESigningResponsePojo
20
20
  from sapiopylib.rest.pojo.webhook.WebhookContext import SapioWebhookContext
21
21
  from sapiopylib.rest.pojo.webhook.WebhookEnums import FormAccessLevel, ScanToSelectCriteria, SearchType
@@ -627,7 +627,8 @@ class CallbackUtil:
627
627
  values: list[FieldMap],
628
628
  multi_select: bool = True,
629
629
  *,
630
- display_name: str = "Default",
630
+ data_type: str = "Default",
631
+ display_name: str | None = None,
631
632
  plural_display_name: str | None = None) -> list[FieldMap]:
632
633
  """
633
634
  Create a selection dialog for a list of field maps for the user to choose from. Requires that the caller
@@ -638,18 +639,25 @@ class CallbackUtil:
638
639
  they are provided in this list.
639
640
  :param values: The values to set for each row of the table.
640
641
  :param multi_select: Whether the user is able to select multiple rows from the list.
641
- :param display_name: The display name for the temporary data type that will be created.
642
+ :param data_type: The data type name for the temporary data type that will be created for this table.
643
+ :param display_name: The display name for the temporary data type. If not provided, defaults to the data type
644
+ name.
642
645
  :param plural_display_name: The plural display name for the temporary data type. If not provided, defaults to
643
646
  the display name + "s".
644
647
  :return: A list of field maps corresponding to the chosen input field maps.
645
648
  """
649
+ if display_name is None:
650
+ display_name = data_type
646
651
  if plural_display_name is None:
647
652
  plural_display_name = display_name + "s"
648
653
 
649
- # Build the form using only those fields that are desired.
650
- request = DataRecordSelectionRequest(display_name, plural_display_name,
651
- fields, values, msg, multi_select)
652
- response: list[FieldMap] | None = self.callback.show_data_record_selection_dialog(request)
654
+ builder = FormBuilder(data_type, display_name, plural_display_name)
655
+ for field in fields:
656
+ builder.add_field(field)
657
+
658
+ request = TempTableSelectionRequest(builder.get_temporary_data_type(), msg, values,
659
+ multi_select=multi_select)
660
+ response: list[FieldMap] | None = self.callback.show_temp_table_selection_dialog(request)
653
661
  if response is None:
654
662
  raise SapioUserCancelledException()
655
663
  return response
@@ -690,16 +698,16 @@ class CallbackUtil:
690
698
  modifier = FieldModifier(visible=True, key_field=False)
691
699
 
692
700
  # Build the form using only those fields that are desired.
693
- field_def_list: list = []
701
+ builder = FormBuilder(data_type, type_def.display_name, type_def.plural_display_name)
694
702
  for field_name in fields:
695
703
  field_def = field_defs.get(field_name)
696
704
  if field_def is None:
697
705
  raise SapioException(f"No field of name \"{field_name}\" in field definitions of type \"{data_type}\"")
698
- field_def_list.append(modifier.modify_field(field_def))
706
+ builder.add_field(modifier.modify_field(field_def))
699
707
 
700
- request = DataRecordSelectionRequest(type_def.display_name, type_def.plural_display_name,
701
- field_def_list, field_map_list, msg, multi_select)
702
- response: list[FieldMap] | None = self.callback.show_data_record_selection_dialog(request)
708
+ request = TempTableSelectionRequest(builder.get_temporary_data_type(), msg, field_map_list,
709
+ multi_select=multi_select)
710
+ response: list[FieldMap] | None = self.callback.show_temp_table_selection_dialog(request)
703
711
  if response is None:
704
712
  raise SapioUserCancelledException()
705
713
  # Map the field maps in the response back to the record they come from, returning the chosen record instead of
@@ -251,11 +251,11 @@ class ChemSearchRequestPojo:
251
251
  contextData: ChemQuickSearchContextData | None
252
252
  simSearchUpperLimit: float | None
253
253
 
254
- def __init__(self, search_str: str, search_type: ChemSearchType, join_method: str | None = None,
254
+ def __init__(self, search_str: str, search_type: ChemSearchType, join_sapio_type: str | None = None,
255
255
  context_data: ChemQuickSearchContextData | None = None, sim_search_upper: float | None = None):
256
256
  self.searchStr = search_str
257
257
  self.searchType = search_type
258
- self.joinMethod = join_method
258
+ self.joinSapioType = join_sapio_type
259
259
  self.contextData = context_data
260
260
  self.simSearchUpperLimit = sim_search_upper
261
261
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sapiopycommons
3
- Version: 2024.6.24a263
3
+ Version: 2024.6.26a266
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,6 +1,6 @@
1
1
  sapiopycommons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  sapiopycommons/callbacks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- sapiopycommons/callbacks/callback_util.py,sha256=1wtKc_-3V_uNfKs5eUTHRWAK_P1CFvTKssURzVLuwg0,57628
3
+ sapiopycommons/callbacks/callback_util.py,sha256=caeIWCHvK33jDs3TRskpJv0kDe7W8NPK4MyJPjgztwo,58012
4
4
  sapiopycommons/chem/IndigoMolecules.py,sha256=QqFDi9CKERj6sn_ZwVcS2xZq4imlkaTeCrpq1iNcEJA,1992
5
5
  sapiopycommons/chem/Molecules.py,sha256=t80IsQBPJ9mwE8ZxnWomAGrZDhdsOuPvLaTPb_N6jGU,8639
6
6
  sapiopycommons/chem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -25,7 +25,7 @@ sapiopycommons/general/popup_util.py,sha256=-mN5IgYPrLrOEHJ4CHPi2rec4_WAN6X0yMxH
25
25
  sapiopycommons/general/storage_util.py,sha256=ovmK_jN7v09BoX07XxwShpBUC5WYQOM7dbKV_VeLXJU,8892
26
26
  sapiopycommons/general/time_util.py,sha256=jiJUh7jc1ZRCOem880S3HaLPZ4RboBtSl4_U9sqAQuM,7290
27
27
  sapiopycommons/multimodal/multimodal.py,sha256=w9_M3EYH_cwIbBS0abl-Y0Os-PMR633nYQLkt8UP-Nk,5724
28
- sapiopycommons/multimodal/multimodal_data.py,sha256=srs3qoo1TV9oUr4vI58N2zyDdoKPyJEulNAPCcSTKOA,14096
28
+ sapiopycommons/multimodal/multimodal_data.py,sha256=Lz34CkmDapVi2TiNIiG-d0CdSEY9Z80r0dBOTi0Ev3Q,14107
29
29
  sapiopycommons/processtracking/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
30
  sapiopycommons/processtracking/endpoints.py,sha256=g5h_uCVByqacYm9zWAz8TyAdRsGfaO2o0b5RSJdOaSA,10926
31
31
  sapiopycommons/recordmodel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -35,7 +35,7 @@ sapiopycommons/rules/eln_rule_handler.py,sha256=qfkBZtck0KK1i9s9Xe2UZqkzQOgPCzDx
35
35
  sapiopycommons/rules/on_save_rule_handler.py,sha256=JY9F30IcHwFVdgPAMQtTYuRastV1jeezhVktyrzNASU,10763
36
36
  sapiopycommons/webhook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  sapiopycommons/webhook/webhook_handlers.py,sha256=ibpBY3Sk3Eij919bIdW0awzlogYoQSWYDDOg--NwsQE,13431
38
- sapiopycommons-2024.6.24a263.dist-info/METADATA,sha256=xF8XN8cmYA0PClhtj5NV3Kd1nsISjB-1-7H48xLp7PY,3176
39
- sapiopycommons-2024.6.24a263.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
40
- sapiopycommons-2024.6.24a263.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
41
- sapiopycommons-2024.6.24a263.dist-info/RECORD,,
38
+ sapiopycommons-2024.6.26a266.dist-info/METADATA,sha256=YkW3DPvFAApUZedDrJ249fYG41_3hMUREzHAoPlv8kY,3176
39
+ sapiopycommons-2024.6.26a266.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
40
+ sapiopycommons-2024.6.26a266.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
41
+ sapiopycommons-2024.6.26a266.dist-info/RECORD,,