sapiopycommons 2025.3.6a451__py3-none-any.whl → 2025.3.6a453__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.
- sapiopycommons/ai/tool_of_tools.py +12 -0
- sapiopycommons/recordmodel/record_handler.py +14 -4
- {sapiopycommons-2025.3.6a451.dist-info → sapiopycommons-2025.3.6a453.dist-info}/METADATA +1 -1
- {sapiopycommons-2025.3.6a451.dist-info → sapiopycommons-2025.3.6a453.dist-info}/RECORD +6 -6
- {sapiopycommons-2025.3.6a451.dist-info → sapiopycommons-2025.3.6a453.dist-info}/WHEEL +0 -0
- {sapiopycommons-2025.3.6a451.dist-info → sapiopycommons-2025.3.6a453.dist-info}/licenses/LICENSE +0 -0
|
@@ -529,6 +529,8 @@ class ToolOfToolsHelper:
|
|
|
529
529
|
# Stuff created by this helper.
|
|
530
530
|
_initialized: bool
|
|
531
531
|
"""Whether a tab for this tool has been initialized."""
|
|
532
|
+
_new_tab: bool
|
|
533
|
+
"""Whether a new tab was created for this tool."""
|
|
532
534
|
tab: ElnExperimentTab
|
|
533
535
|
"""The tab that contains the tool's entries."""
|
|
534
536
|
description_entry: ElnEntryStep | None
|
|
@@ -567,6 +569,15 @@ class ToolOfToolsHelper:
|
|
|
567
569
|
self.eln_man = ElnManager(self.user)
|
|
568
570
|
|
|
569
571
|
self._initialized = False
|
|
572
|
+
self._new_tab = False
|
|
573
|
+
|
|
574
|
+
@property
|
|
575
|
+
def is_initialized(self) -> bool:
|
|
576
|
+
return self._initialized
|
|
577
|
+
|
|
578
|
+
@property
|
|
579
|
+
def is_new_tab(self) -> bool:
|
|
580
|
+
return self._new_tab
|
|
570
581
|
|
|
571
582
|
def initialize_tab(self) -> ElnExperimentTab:
|
|
572
583
|
if self._initialized:
|
|
@@ -619,6 +630,7 @@ class ToolOfToolsHelper:
|
|
|
619
630
|
|
|
620
631
|
# Otherwise, create the tab for the tool progress and results.
|
|
621
632
|
self.tab = self.helper.create_tab(tab_name)
|
|
633
|
+
self._new_tab = True
|
|
622
634
|
|
|
623
635
|
# Create a hidden entry for tracking the progress of the tool.
|
|
624
636
|
field_sets: list[ElnFieldSetInfo] = self.eln_man.get_field_set_info_list()
|
|
@@ -189,7 +189,9 @@ class RecordHandler:
|
|
|
189
189
|
:return: The record models for the queried records and the final paging criteria. If a data type name was used
|
|
190
190
|
instead of a model wrapper, then the returned records will be PyRecordModels instead of WrappedRecordModels.
|
|
191
191
|
"""
|
|
192
|
-
dt: str =
|
|
192
|
+
dt: str = AliasUtil.to_data_type_name(wrapper_type)
|
|
193
|
+
if isinstance(wrapper_type, str):
|
|
194
|
+
wrapper_type = None
|
|
193
195
|
field: str = AliasUtil.to_data_field_name(field)
|
|
194
196
|
pager = QueryDataRecordsAutoPager(dt, field, list(value_list), self.user, paging_criteria)
|
|
195
197
|
pager.max_page = page_limit
|
|
@@ -233,6 +235,8 @@ class RecordHandler:
|
|
|
233
235
|
instead of a model wrapper, then the returned records will be PyRecordModels instead of WrappedRecordModels.
|
|
234
236
|
"""
|
|
235
237
|
dt: str = AliasUtil.to_data_type_name(wrapper_type)
|
|
238
|
+
if isinstance(wrapper_type, str):
|
|
239
|
+
wrapper_type = None
|
|
236
240
|
pager = QueryDataRecordByIdListAutoPager(dt, list(ids), self.user, paging_criteria)
|
|
237
241
|
pager.max_page = page_limit
|
|
238
242
|
return self.wrap_models(pager.get_all_at_once(), wrapper_type), pager.next_page_criteria
|
|
@@ -289,7 +293,9 @@ class RecordHandler:
|
|
|
289
293
|
:return: The record models for the queried records and the final paging criteria. If a data type name was used
|
|
290
294
|
instead of a model wrapper, then the returned records will be PyRecordModels instead of WrappedRecordModels.
|
|
291
295
|
"""
|
|
292
|
-
dt: str =
|
|
296
|
+
dt: str = AliasUtil.to_data_type_name(wrapper_type)
|
|
297
|
+
if isinstance(wrapper_type, str):
|
|
298
|
+
wrapper_type = None
|
|
293
299
|
pager = QueryAllRecordsOfTypeAutoPager(dt, self.user, paging_criteria)
|
|
294
300
|
pager.max_page = page_limit
|
|
295
301
|
return self.wrap_models(pager.get_all_at_once(), wrapper_type), pager.next_page_criteria
|
|
@@ -444,7 +450,9 @@ class RecordHandler:
|
|
|
444
450
|
:return: The newly created record models. If a data type name was used instead of a model wrapper, then the
|
|
445
451
|
returned records will be PyRecordModels instead of WrappedRecordModels.
|
|
446
452
|
"""
|
|
447
|
-
dt: str =
|
|
453
|
+
dt: str = AliasUtil.to_data_type_name(wrapper_type)
|
|
454
|
+
if isinstance(wrapper_type, str):
|
|
455
|
+
wrapper_type = None
|
|
448
456
|
return self.wrap_models(self.dr_man.add_data_records(dt, num), wrapper_type)
|
|
449
457
|
|
|
450
458
|
def create_models_with_data(self, wrapper_type: type[WrappedType] | str, fields: list[FieldIdentifierMap]) \
|
|
@@ -461,7 +469,9 @@ class RecordHandler:
|
|
|
461
469
|
:return: The newly created record models. If a data type name was used instead of a model wrapper, then the
|
|
462
470
|
returned records will be PyRecordModels instead of WrappedRecordModels.
|
|
463
471
|
"""
|
|
464
|
-
dt: str =
|
|
472
|
+
dt: str = AliasUtil.to_data_type_name(wrapper_type)
|
|
473
|
+
if isinstance(wrapper_type, str):
|
|
474
|
+
wrapper_type = None
|
|
465
475
|
fields: list[FieldMap] = AliasUtil.to_data_field_names_list_dict(fields)
|
|
466
476
|
return self.wrap_models(self.dr_man.add_data_records_with_data(dt, fields), wrapper_type)
|
|
467
477
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: sapiopycommons
|
|
3
|
-
Version: 2025.3.
|
|
3
|
+
Version: 2025.3.6a453
|
|
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/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
sapiopycommons/ai/tool_of_tools.py,sha256=
|
|
3
|
+
sapiopycommons/ai/tool_of_tools.py,sha256=zYmQ4rNX-qYQnc-vNDnYZjtv9JgmQAmVVuHfVOdBF3w,46984
|
|
4
4
|
sapiopycommons/callbacks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sapiopycommons/callbacks/callback_util.py,sha256=pgO3rLAbISs83SH8D-62eSiuaFckKEaJqqAstUawKBY,129944
|
|
6
6
|
sapiopycommons/callbacks/field_builder.py,sha256=p2XacN99MuKk3ite8GAqstUMpixqugul2CsC4gB83-o,38620
|
|
@@ -48,7 +48,7 @@ sapiopycommons/processtracking/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
|
48
48
|
sapiopycommons/processtracking/custom_workflow_handler.py,sha256=NY0HboLMI9WX1u7Fwad-KreEyhaHtYBTAmi-fHtZGCg,23509
|
|
49
49
|
sapiopycommons/processtracking/endpoints.py,sha256=w5bziI2xC7450M95rCF8JpRwkoni1kEDibyAux9B12Q,10848
|
|
50
50
|
sapiopycommons/recordmodel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
|
-
sapiopycommons/recordmodel/record_handler.py,sha256=
|
|
51
|
+
sapiopycommons/recordmodel/record_handler.py,sha256=Zaurk_cnXGAHy01OnVeve6oXxkKIGKJ8HKoKLtRbpV8,69931
|
|
52
52
|
sapiopycommons/rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
53
|
sapiopycommons/rules/eln_rule_handler.py,sha256=JYzDA_14D2nLnlqwbpIxVOrfKWzbOS27AYf4TQfGr4Q,10469
|
|
54
54
|
sapiopycommons/rules/on_save_rule_handler.py,sha256=Rkqvph20RbNq6m-RF4fbvCP-YfD2CZYBM2iTr3nl0eY,10236
|
|
@@ -59,7 +59,7 @@ sapiopycommons/webhook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
59
59
|
sapiopycommons/webhook/webhook_context.py,sha256=D793uLsb1691SalaPnBUk3rOSxn_hYLhdvkaIxjNXss,1909
|
|
60
60
|
sapiopycommons/webhook/webhook_handlers.py,sha256=L0HetSm43NvA5KyW3xbLpGFh2DbAaeZJVtXIEl2fvV8,39689
|
|
61
61
|
sapiopycommons/webhook/webservice_handlers.py,sha256=Y5dHx_UFWFuSqaoPL6Re-fsKYRuxvCWZ8bj6KSZ3jfM,14285
|
|
62
|
-
sapiopycommons-2025.3.
|
|
63
|
-
sapiopycommons-2025.3.
|
|
64
|
-
sapiopycommons-2025.3.
|
|
65
|
-
sapiopycommons-2025.3.
|
|
62
|
+
sapiopycommons-2025.3.6a453.dist-info/METADATA,sha256=Gda-K4K3vsSKpptnhXxylPeygtEozOj7TJY9N4-ZhXE,3142
|
|
63
|
+
sapiopycommons-2025.3.6a453.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
64
|
+
sapiopycommons-2025.3.6a453.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
|
|
65
|
+
sapiopycommons-2025.3.6a453.dist-info/RECORD,,
|
|
File without changes
|
{sapiopycommons-2025.3.6a451.dist-info → sapiopycommons-2025.3.6a453.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|