sapiopycommons 2024.5.16a227__py3-none-any.whl → 2024.5.17a231__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/eln/experiment_handler.py +7 -19
- sapiopycommons/files/file_data_handler.py +1 -1
- {sapiopycommons-2024.5.16a227.dist-info → sapiopycommons-2024.5.17a231.dist-info}/METADATA +1 -1
- {sapiopycommons-2024.5.16a227.dist-info → sapiopycommons-2024.5.17a231.dist-info}/RECORD +6 -6
- {sapiopycommons-2024.5.16a227.dist-info → sapiopycommons-2024.5.17a231.dist-info}/WHEEL +0 -0
- {sapiopycommons-2024.5.16a227.dist-info → sapiopycommons-2024.5.17a231.dist-info}/licenses/LICENSE +0 -0
|
@@ -64,14 +64,11 @@ class ExperimentHandler:
|
|
|
64
64
|
The cache is updated whenever the entry options for a step are changed by this handler."""
|
|
65
65
|
|
|
66
66
|
# Constants
|
|
67
|
-
|
|
68
|
-
# against the value of the enums instead of the enums themselves. The ".value"s can be removed once sapiopylib is
|
|
69
|
-
# fixed.
|
|
70
|
-
__ENTRY_COMPLETE_STATUSES = [ExperimentEntryStatus.Completed.value, ExperimentEntryStatus.CompletedApproved.value]
|
|
67
|
+
__ENTRY_COMPLETE_STATUSES = [ExperimentEntryStatus.Completed, ExperimentEntryStatus.CompletedApproved]
|
|
71
68
|
"""The set of statuses that an ELN entry could have and be considered completed/submitted."""
|
|
72
|
-
__ENTRY_LOCKED_STATUSES = [ExperimentEntryStatus.Completed
|
|
73
|
-
ExperimentEntryStatus.Disabled
|
|
74
|
-
ExperimentEntryStatus.LockedRejected
|
|
69
|
+
__ENTRY_LOCKED_STATUSES = [ExperimentEntryStatus.Completed, ExperimentEntryStatus.CompletedApproved,
|
|
70
|
+
ExperimentEntryStatus.Disabled, ExperimentEntryStatus.LockedAwaitingApproval,
|
|
71
|
+
ExperimentEntryStatus.LockedRejected]
|
|
75
72
|
"""The set of statuses that an ELN entry could have and be considered locked."""
|
|
76
73
|
__EXPERIMENT_COMPLETE_STATUSES = [ElnExperimentStatus.Completed, ElnExperimentStatus.CompletedApproved]
|
|
77
74
|
"""The set of statuses that an ELN experiment could have and be considered completed."""
|
|
@@ -786,10 +783,7 @@ class ExperimentHandler:
|
|
|
786
783
|
if dependency_set is not None:
|
|
787
784
|
entry.dependency_set = dependency_set
|
|
788
785
|
if entry_status is not None:
|
|
789
|
-
|
|
790
|
-
# breaking comparisons to enums that expect this behavior, also setting the status to the enum's string.
|
|
791
|
-
# The ".value" can be removed once sapiopylib is fixed.
|
|
792
|
-
entry.entry_status = entry_status.value
|
|
786
|
+
entry.entry_status = entry_status
|
|
793
787
|
if order is not None:
|
|
794
788
|
entry.order = order
|
|
795
789
|
if description is not None:
|
|
@@ -942,10 +936,7 @@ class ExperimentHandler:
|
|
|
942
936
|
step = self.__to_eln_step(step)
|
|
943
937
|
if step.eln_entry.entry_status not in self.__ENTRY_COMPLETE_STATUSES:
|
|
944
938
|
step.complete_step()
|
|
945
|
-
|
|
946
|
-
# breaking comparisons to enums that expect this behavior, also setting the status to the enum's string.
|
|
947
|
-
# The ".value" can be removed once sapiopylib is fixed.
|
|
948
|
-
step.eln_entry.entry_status = ExperimentEntryStatus.Completed.value
|
|
939
|
+
step.eln_entry.entry_status = ExperimentEntryStatus.Completed
|
|
949
940
|
|
|
950
941
|
def unlock_step(self, step: Step) -> None:
|
|
951
942
|
"""
|
|
@@ -963,10 +954,7 @@ class ExperimentHandler:
|
|
|
963
954
|
step = self.__to_eln_step(step)
|
|
964
955
|
if step.eln_entry.entry_status in self.__ENTRY_LOCKED_STATUSES:
|
|
965
956
|
step.unlock_step()
|
|
966
|
-
|
|
967
|
-
# breaking comparisons to enums that expect this behavior, also setting the status to the enum's string.
|
|
968
|
-
# The ".value" can be removed once sapiopylib is fixed.
|
|
969
|
-
step.eln_entry.entry_status = ExperimentEntryStatus.UnlockedChangesRequired.value
|
|
957
|
+
step.eln_entry.entry_status = ExperimentEntryStatus.UnlockedChangesRequired
|
|
970
958
|
|
|
971
959
|
def step_is_submitted(self, step: Step) -> bool:
|
|
972
960
|
"""
|
|
@@ -534,7 +534,7 @@ class FileDataHandler:
|
|
|
534
534
|
records_to_row: dict[SapioRecord, dict[str, Any]] = self.match_records(match_header, match_field, records)
|
|
535
535
|
for record, row in records_to_row.items():
|
|
536
536
|
for header, field in header_to_fields.items():
|
|
537
|
-
record.
|
|
537
|
+
record.set_field_value(field, row.get(header))
|
|
538
538
|
|
|
539
539
|
def find_missing_values(self, header: str, field: str, records: list[SapioRecord]) -> list[int]:
|
|
540
540
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: sapiopycommons
|
|
3
|
-
Version: 2024.5.
|
|
3
|
+
Version: 2024.5.17a231
|
|
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>
|
|
@@ -7,12 +7,12 @@ sapiopycommons/chem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
|
7
7
|
sapiopycommons/datatype/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
sapiopycommons/datatype/attachment_util.py,sha256=YlnMprj5IGBbAZDLG2khS1P7JIYTw_NYfpJAfRZfP3M,3219
|
|
9
9
|
sapiopycommons/eln/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
sapiopycommons/eln/experiment_handler.py,sha256=
|
|
10
|
+
sapiopycommons/eln/experiment_handler.py,sha256=v1pG4qtZb8OSNWfKtFo6NjnEkReqnu5R9i_hqWh_xxg,57198
|
|
11
11
|
sapiopycommons/eln/plate_designer.py,sha256=FYJfhhNq8hdfuXgDYOYHy6g0m2zNwQXZWF_MTPzElDg,7184
|
|
12
12
|
sapiopycommons/files/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
sapiopycommons/files/complex_data_loader.py,sha256=XSJOl676mIklJo78v07-70u1b015a5DI4sqZPI3C-Tw,1475
|
|
14
14
|
sapiopycommons/files/file_bridge.py,sha256=6yjUi0ejypb1nvcEvn21EuquB-SmEjB-fCZiMaNZg7Q,5757
|
|
15
|
-
sapiopycommons/files/file_data_handler.py,sha256=
|
|
15
|
+
sapiopycommons/files/file_data_handler.py,sha256=3-guAdhJdeJWAFq1a27ijspkO7uMMZ6CapMCD_6o4jA,36746
|
|
16
16
|
sapiopycommons/files/file_util.py,sha256=92SzwRif4dOcGqZ9ri90QeC20NOCenT8DxQjdSH5Uyc,25556
|
|
17
17
|
sapiopycommons/files/file_validator.py,sha256=5DUI_h0WB1AvfoPgx8En3-sC5xlzm5Z2deoSf9qviKQ,24499
|
|
18
18
|
sapiopycommons/files/file_writer.py,sha256=5u_iZXTQvuUU7ceHZr8Q001_tvgJhOqBwAnB_pxcAbQ,16027
|
|
@@ -34,7 +34,7 @@ sapiopycommons/rules/eln_rule_handler.py,sha256=qfkBZtck0KK1i9s9Xe2UZqkzQOgPCzDx
|
|
|
34
34
|
sapiopycommons/rules/on_save_rule_handler.py,sha256=JY9F30IcHwFVdgPAMQtTYuRastV1jeezhVktyrzNASU,10763
|
|
35
35
|
sapiopycommons/webhook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
36
|
sapiopycommons/webhook/webhook_handlers.py,sha256=K_K7CEAMZ-bNb2LCIKdt0CxHsBKkwSBzfnp0JSdGJUM,11102
|
|
37
|
-
sapiopycommons-2024.5.
|
|
38
|
-
sapiopycommons-2024.5.
|
|
39
|
-
sapiopycommons-2024.5.
|
|
40
|
-
sapiopycommons-2024.5.
|
|
37
|
+
sapiopycommons-2024.5.17a231.dist-info/METADATA,sha256=uJtRJBvmtP8EZIE6q8-_F0nhMD2a-xWnxl8fcyPhV90,3176
|
|
38
|
+
sapiopycommons-2024.5.17a231.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
|
39
|
+
sapiopycommons-2024.5.17a231.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
|
|
40
|
+
sapiopycommons-2024.5.17a231.dist-info/RECORD,,
|
|
File without changes
|
{sapiopycommons-2024.5.16a227.dist-info → sapiopycommons-2024.5.17a231.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|