sl-shared-assets 1.0.0rc7__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.

@@ -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
- self.local_root_directory = str(self.local_root_directory)
283
- self.local_mesoscope_directory = str(self.local_mesoscope_directory)
284
- self.local_nas_directory = str(self.local_nas_directory)
285
- self.local_server_directory = str(self.local_server_directory)
286
- self.remote_storage_directory = str(self.remote_storage_directory)
287
- self.remote_working_directory = str(self.remote_working_directory)
288
- self.google_credentials_path = str(self.google_credentials_path)
289
- self.server_credentials_path = str(self.server_credentials_path)
290
- self.harvesters_cti_path = str(self.harvesters_cti_path)
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(self.valve_calibration_data, tuple):
294
- self.valve_calibration_data = {k: v for k, v in self.valve_calibration_data}
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
- self.to_yaml(file_path=path)
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
- if self.raw_data is not None:
1032
- self.raw_data.make_string()
1033
- if self.processed_data is not None:
1034
- self.processed_data.make_string()
1035
- if self.persistent_data is not None:
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
- self.to_yaml(file_path=file_path)
1045
+ original.to_yaml(file_path=file_path)
1044
1046
 
1045
1047
 
1046
1048
  @dataclass()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sl-shared-assets
3
- Version: 1.0.0rc7
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,7 +2,7 @@ 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=sHCnoJQLobW0YYFTqzNPSalG4NJzay-P_NCcsfE5W3Q,86887
5
+ sl_shared_assets/data_classes.py,sha256=Gilip0hQJqNS7SJSDK0crXy4eiD6Ws_OO5cBGInqaGw,87076
6
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
@@ -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.0rc7.dist-info/METADATA,sha256=m3P5OiLBjasw8vyCUCe6Fr_04xHhXzdQF9Q7HkY31xc,47806
17
- sl_shared_assets-1.0.0rc7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
18
- sl_shared_assets-1.0.0rc7.dist-info/entry_points.txt,sha256=3VPr5RkWBkusNN9OhWXtC-DN0utu7uMrUulazIK2VNA,166
19
- sl_shared_assets-1.0.0rc7.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
20
- sl_shared_assets-1.0.0rc7.dist-info/RECORD,,
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,,