sl-shared-assets 1.0.0rc6__py3-none-any.whl → 1.0.0rc8__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 sl-shared-assets might be problematic. Click here for more details.
- sl_shared_assets/data_classes.py +29 -23
- sl_shared_assets/data_classes.pyi +1 -0
- {sl_shared_assets-1.0.0rc6.dist-info → sl_shared_assets-1.0.0rc8.dist-info}/METADATA +1 -1
- {sl_shared_assets-1.0.0rc6.dist-info → sl_shared_assets-1.0.0rc8.dist-info}/RECORD +7 -7
- {sl_shared_assets-1.0.0rc6.dist-info → sl_shared_assets-1.0.0rc8.dist-info}/WHEEL +0 -0
- {sl_shared_assets-1.0.0rc6.dist-info → sl_shared_assets-1.0.0rc8.dist-info}/entry_points.txt +0 -0
- {sl_shared_assets-1.0.0rc6.dist-info → sl_shared_assets-1.0.0rc8.dist-info}/licenses/LICENSE +0 -0
sl_shared_assets/data_classes.py
CHANGED
|
@@ -13,6 +13,7 @@ import appdirs
|
|
|
13
13
|
from ataraxis_base_utilities import LogLevel, console, ensure_directory_exists
|
|
14
14
|
from ataraxis_data_structures import YamlConfig
|
|
15
15
|
from ataraxis_time.time_helpers import get_timestamp
|
|
16
|
+
import copy
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
def replace_root_path(path: Path) -> None:
|
|
@@ -277,24 +278,27 @@ class ProjectConfiguration(YamlConfig):
|
|
|
277
278
|
path: The path to the .yaml file to save the data to.
|
|
278
279
|
"""
|
|
279
280
|
|
|
281
|
+
# Copies instance data to prevent it from being modified by reference when executing the steps below
|
|
282
|
+
original = copy.deepcopy(self)
|
|
283
|
+
|
|
280
284
|
# Converts all Path objects to strings before dumping the data, as .yaml encoder does not properly recognize
|
|
281
285
|
# Path objects
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
286
|
+
original.local_root_directory = str(original.local_root_directory)
|
|
287
|
+
original.local_mesoscope_directory = str(original.local_mesoscope_directory)
|
|
288
|
+
original.local_nas_directory = str(original.local_nas_directory)
|
|
289
|
+
original.local_server_directory = str(original.local_server_directory)
|
|
290
|
+
original.remote_storage_directory = str(original.remote_storage_directory)
|
|
291
|
+
original.remote_working_directory = str(original.remote_working_directory)
|
|
292
|
+
original.google_credentials_path = str(original.google_credentials_path)
|
|
293
|
+
original.server_credentials_path = str(original.server_credentials_path)
|
|
294
|
+
original.harvesters_cti_path = str(original.harvesters_cti_path)
|
|
291
295
|
|
|
292
296
|
# Converts valve calibration data into dictionary format
|
|
293
|
-
if isinstance(
|
|
294
|
-
|
|
297
|
+
if isinstance(original.valve_calibration_data, tuple):
|
|
298
|
+
original.valve_calibration_data = {k: v for k, v in original.valve_calibration_data}
|
|
295
299
|
|
|
296
300
|
# Saves the data to the YAML file
|
|
297
|
-
|
|
301
|
+
original.to_yaml(file_path=path)
|
|
298
302
|
|
|
299
303
|
# As part of this runtime, also generates and dumps the 'precursor' experiment configuration file.
|
|
300
304
|
example_experiment = ExperimentConfiguration()
|
|
@@ -1024,23 +1028,21 @@ class SessionData(YamlConfig):
|
|
|
1024
1028
|
create_session() method runtime.
|
|
1025
1029
|
"""
|
|
1026
1030
|
|
|
1031
|
+
# Copies instance data to prevent it from being modified by reference when executing the steps below
|
|
1032
|
+
original = copy.deepcopy(self)
|
|
1033
|
+
|
|
1027
1034
|
# Extracts the target file path before it is converted to a string.
|
|
1028
1035
|
file_path: Path = copy.copy(self.raw_data.session_data_path) # type: ignore
|
|
1029
1036
|
|
|
1030
1037
|
# Converts all Paths objects to strings before dumping the data to YAML.
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
self.persistent_data.make_string()
|
|
1037
|
-
if self.mesoscope_data is not None:
|
|
1038
|
-
self.mesoscope_data.make_string()
|
|
1039
|
-
if self.destinations is not None:
|
|
1040
|
-
self.destinations.make_string()
|
|
1038
|
+
original.raw_data.make_string()
|
|
1039
|
+
original.processed_data.make_string()
|
|
1040
|
+
original.persistent_data.make_string()
|
|
1041
|
+
original.mesoscope_data.make_string()
|
|
1042
|
+
original.destinations.make_string()
|
|
1041
1043
|
|
|
1042
1044
|
# Saves instance data as a .YAML file
|
|
1043
|
-
|
|
1045
|
+
original.to_yaml(file_path=file_path)
|
|
1044
1046
|
|
|
1045
1047
|
|
|
1046
1048
|
@dataclass()
|
|
@@ -1364,6 +1366,10 @@ class ProcedureData:
|
|
|
1364
1366
|
"""Stores surgeon's notes taken during the surgery."""
|
|
1365
1367
|
post_op_notes: str
|
|
1366
1368
|
"""Stores surgeon's notes taken during the post-surgery recovery period."""
|
|
1369
|
+
surgery_quality: int = 0
|
|
1370
|
+
"""Stores the quality of the surgical intervention as a numeric level. 0 indicates unusable (bad) result, 1
|
|
1371
|
+
indicates usable result that is not good enough to be included in a publication, 2 indicates publication-grade
|
|
1372
|
+
result."""
|
|
1367
1373
|
|
|
1368
1374
|
|
|
1369
1375
|
@dataclass
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sl-shared-assets
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0rc8
|
|
4
4
|
Summary: Stores assets shared between multiple Sun (NeuroAI) lab data pipelines.
|
|
5
5
|
Project-URL: Homepage, https://github.com/Sun-Lab-NBB/sl-shared-assets
|
|
6
6
|
Project-URL: Documentation, https://sl-shared-assets-api-docs.netlify.app/
|
|
@@ -2,8 +2,8 @@ sl_shared_assets/__init__.py,sha256=V7EvTTSB_GhetCbyYPg2RoiG1etDVeML5EBWgGvUo7E,
|
|
|
2
2
|
sl_shared_assets/__init__.pyi,sha256=U5Sma4zenITe0-eI_heTUYh_9P0puhgM3hAdcf-qozk,2532
|
|
3
3
|
sl_shared_assets/cli.py,sha256=CjfuXXj7CeDA2pbCwe5Rad6RDjIqGDud14IUDMdzx_w,2639
|
|
4
4
|
sl_shared_assets/cli.pyi,sha256=X5UdXpkzUw71_ftaIXMsnttIeR15SPVLiECuPge_zw8,1032
|
|
5
|
-
sl_shared_assets/data_classes.py,sha256=
|
|
6
|
-
sl_shared_assets/data_classes.pyi,sha256=
|
|
5
|
+
sl_shared_assets/data_classes.py,sha256=Gilip0hQJqNS7SJSDK0crXy4eiD6Ws_OO5cBGInqaGw,87076
|
|
6
|
+
sl_shared_assets/data_classes.pyi,sha256=5l2snWnlqTXGiJldGLvI4sc2G2_08aw9bFIOi_RmgjE,32240
|
|
7
7
|
sl_shared_assets/packaging_tools.py,sha256=3kAXFK37Lv4JA1YhjcoBz1x2Ell8ObCqe9pwxAts4m4,6709
|
|
8
8
|
sl_shared_assets/packaging_tools.pyi,sha256=hlAP9AxF7NHtFIPKjj5ehm8Vr9qIn6xDk4VvL0JuAmk,3055
|
|
9
9
|
sl_shared_assets/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -13,8 +13,8 @@ sl_shared_assets/suite2p.py,sha256=sQ5Zj0TJFD-gUHqtWnRvapBpr8QgmaiVil123cWxGxc,2
|
|
|
13
13
|
sl_shared_assets/suite2p.pyi,sha256=Uyv8ov--etwJIc6e2UVgs0jYXwnK2CD-kICfXo5KpcI,6331
|
|
14
14
|
sl_shared_assets/transfer_tools.py,sha256=J26kwOp_NpPSY0-xu5FTw9udte-rm_mW1FJyaTNoqQI,6606
|
|
15
15
|
sl_shared_assets/transfer_tools.pyi,sha256=FoH7eYZe7guGHfPr0MK5ggO62uXKwD2aJ7h1Bu7PaEE,3294
|
|
16
|
-
sl_shared_assets-1.0.
|
|
17
|
-
sl_shared_assets-1.0.
|
|
18
|
-
sl_shared_assets-1.0.
|
|
19
|
-
sl_shared_assets-1.0.
|
|
20
|
-
sl_shared_assets-1.0.
|
|
16
|
+
sl_shared_assets-1.0.0rc8.dist-info/METADATA,sha256=6Omp-WLRWXVniIkMLG6SyujEEiJuptEk-2f1SQgA4m0,47806
|
|
17
|
+
sl_shared_assets-1.0.0rc8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
18
|
+
sl_shared_assets-1.0.0rc8.dist-info/entry_points.txt,sha256=3VPr5RkWBkusNN9OhWXtC-DN0utu7uMrUulazIK2VNA,166
|
|
19
|
+
sl_shared_assets-1.0.0rc8.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
20
|
+
sl_shared_assets-1.0.0rc8.dist-info/RECORD,,
|
|
File without changes
|
{sl_shared_assets-1.0.0rc6.dist-info → sl_shared_assets-1.0.0rc8.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{sl_shared_assets-1.0.0rc6.dist-info → sl_shared_assets-1.0.0rc8.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|