sl-shared-assets 1.0.0rc12__tar.gz → 1.0.0rc13__tar.gz
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-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/PKG-INFO +1 -1
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/pyproject.toml +1 -1
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/src/sl_shared_assets/__init__.py +2 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/src/sl_shared_assets/data_classes.py +49 -3
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/.gitignore +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/LICENSE +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/README.md +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/docs/Makefile +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/docs/make.bat +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/docs/source/api.rst +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/docs/source/conf.py +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/docs/source/index.rst +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/docs/source/welcome.rst +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/envs/slsa_dev_lin.yml +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/envs/slsa_dev_lin_spec.txt +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/src/sl_shared_assets/ascension_tools.py +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/src/sl_shared_assets/cli.py +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/src/sl_shared_assets/packaging_tools.py +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/src/sl_shared_assets/py.typed +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/src/sl_shared_assets/server.py +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/src/sl_shared_assets/suite2p.py +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/src/sl_shared_assets/transfer_tools.py +0 -0
- {sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sl-shared-assets
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0rc13
|
|
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/
|
|
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
|
|
|
8
8
|
# Project metdata section. Provides the genral ID information about the project.
|
|
9
9
|
[project]
|
|
10
10
|
name = "sl-shared-assets"
|
|
11
|
-
version = "1.0.
|
|
11
|
+
version = "1.0.0rc13"
|
|
12
12
|
description = "Stores assets shared between multiple Sun (NeuroAI) lab data pipelines."
|
|
13
13
|
readme = "README.md"
|
|
14
14
|
license = { file = "LICENSE" }
|
|
@@ -19,6 +19,7 @@ from .data_classes import (
|
|
|
19
19
|
ProcedureData,
|
|
20
20
|
ZaberPositions,
|
|
21
21
|
ExperimentState,
|
|
22
|
+
ProcessingTracker,
|
|
22
23
|
MesoscopePositions,
|
|
23
24
|
ProjectConfiguration,
|
|
24
25
|
HardwareConfiguration,
|
|
@@ -53,6 +54,7 @@ __all__ = [
|
|
|
53
54
|
"LickTrainingDescriptor",
|
|
54
55
|
"ExperimentConfiguration",
|
|
55
56
|
"MesoscopeExperimentDescriptor",
|
|
57
|
+
"ProcessingTracker"
|
|
56
58
|
# Transfer tools module
|
|
57
59
|
"transfer_directory",
|
|
58
60
|
# Packaging tools module
|
{sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/src/sl_shared_assets/data_classes.py
RENAMED
|
@@ -104,8 +104,8 @@ class ProjectConfiguration(YamlConfig):
|
|
|
104
104
|
this field is configured automatically each time the class is instantiated through any method, so overwriting it
|
|
105
105
|
manually will not be respected."""
|
|
106
106
|
local_server_directory: str | Path = Path("/home/cybermouse/server/storage/sun_data")
|
|
107
|
-
"""The absolute path to the directory where all projects
|
|
108
|
-
locally accessible (mounted) using a network sharing protocol, such as SMB."""
|
|
107
|
+
"""The absolute path to the directory where the raw data portion of all projects is stored on the BioHPC server.
|
|
108
|
+
This directory should be locally accessible (mounted) using a network sharing protocol, such as SMB."""
|
|
109
109
|
local_nas_directory: str | Path = Path("/home/cybermouse/nas/rawdata")
|
|
110
110
|
"""The absolute path to the directory where all projects are stored on the Synology NAS. This directory should be
|
|
111
111
|
locally accessible (mounted) using a network sharing protocol, such as SMB."""
|
|
@@ -113,6 +113,9 @@ class ProjectConfiguration(YamlConfig):
|
|
|
113
113
|
"""The absolute path to the root mesoscope (ScanImagePC) directory where all mesoscope-acquired data is aggregated
|
|
114
114
|
during acquisition runtime. This directory should be locally accessible (mounted) using a network sharing
|
|
115
115
|
protocol, such as SMB."""
|
|
116
|
+
local_server_working_directory: str | Path = Path("/home/cybermouse/server/workdir/sun_data")
|
|
117
|
+
"""The absolute path to the directory where the processed data portion of all projects is stored on the BioHPC
|
|
118
|
+
server. This directory should be locally accessible (mounted) using a network sharing protocol, such as SMB."""
|
|
116
119
|
remote_storage_directory: str | Path = Path("/storage/sun_data")
|
|
117
120
|
"""The absolute path, relative to the BioHPC server root, to the directory where all projects are stored on the
|
|
118
121
|
slow (SSD) volume of the server. This path is used when running remote (server-side) jobs and, therefore, has to
|
|
@@ -257,6 +260,7 @@ class ProjectConfiguration(YamlConfig):
|
|
|
257
260
|
instance.local_mesoscope_directory = Path(instance.local_mesoscope_directory)
|
|
258
261
|
instance.local_nas_directory = Path(instance.local_nas_directory)
|
|
259
262
|
instance.local_server_directory = Path(instance.local_server_directory)
|
|
263
|
+
instance.local_server_working_directory = Path(instance.local_server_working_directory)
|
|
260
264
|
instance.remote_storage_directory = Path(instance.remote_storage_directory)
|
|
261
265
|
instance.remote_working_directory = Path(instance.remote_working_directory)
|
|
262
266
|
instance.google_credentials_path = Path(instance.google_credentials_path)
|
|
@@ -301,6 +305,7 @@ class ProjectConfiguration(YamlConfig):
|
|
|
301
305
|
original.local_mesoscope_directory = str(original.local_mesoscope_directory)
|
|
302
306
|
original.local_nas_directory = str(original.local_nas_directory)
|
|
303
307
|
original.local_server_directory = str(original.local_server_directory)
|
|
308
|
+
original.local_server_working_directory = str(original.local_server_working_directory)
|
|
304
309
|
original.remote_storage_directory = str(original.remote_storage_directory)
|
|
305
310
|
original.remote_working_directory = str(original.remote_working_directory)
|
|
306
311
|
original.google_credentials_path = str(original.google_credentials_path)
|
|
@@ -795,10 +800,29 @@ class Destinations:
|
|
|
795
800
|
server_raw_data_path: str | Path
|
|
796
801
|
"""Stores the path to the session's raw_data directory on the BioHPC server, which is mounted to the VRPC via the
|
|
797
802
|
SMB or equivalent protocol."""
|
|
803
|
+
server_processed_data_path: str | Path
|
|
804
|
+
"""Stores the path to the session's processed_data directory on the BioHPC server, which is mounted to the VRPC via
|
|
805
|
+
the SMB or equivalent protocol."""
|
|
806
|
+
server_configuration_path: str | Path
|
|
807
|
+
"""Stores the path to the project-specific 'configuration' directory on the BioHPC server, which is mounted to the
|
|
808
|
+
VRPC via the SMB or equivalent protocol."""
|
|
798
809
|
server_telomere_path: str | Path = "null"
|
|
799
810
|
"""Stores the path to the session's telomere.bin marker. This marker is generated as part of BioHPC-side data
|
|
800
811
|
processing pipeline to notify he VRPC that the server received the data intact. it is used to determine which
|
|
801
812
|
data can be safely removed from the VRPC filesystem."""
|
|
813
|
+
server_suite2p_configuration_path: str | Path = "null"
|
|
814
|
+
"""Stores the path to the suite2p_configuration.yaml file stored inside the project's 'configuration' directory on
|
|
815
|
+
the fast BioHPC server volume. This configuration file specifies the parameters for the 'single day' suite2p
|
|
816
|
+
registration pipeline, which is applied to each session that generates brain activity data."""
|
|
817
|
+
server_processing_tracker_path: str | Path = "null"
|
|
818
|
+
"""Stores the path to the processing_tracker.yaml file stored inside the sessions' root processed_data directory on
|
|
819
|
+
the fast BioHPC server volume. This file is used to track which processing pipelines to apply to the target
|
|
820
|
+
session and the status (success / failure) of each processing step.
|
|
821
|
+
"""
|
|
822
|
+
server_multiday_configuration_path: str | Path = "null"
|
|
823
|
+
"""Stores the path to the multiday_configuration.yaml file stored inside the project's 'configuration' directory
|
|
824
|
+
on the fast BioHPC server volume. This configuration file specifies the parameters for the 'multiday'
|
|
825
|
+
sl-suite2p-based registration pipelines used tot rack brain cells across multiple sessions."""
|
|
802
826
|
|
|
803
827
|
def __post_init__(self) -> None:
|
|
804
828
|
"""This method is automatically called after class instantiation and ensures that all path fields of the class
|
|
@@ -806,9 +830,21 @@ class Destinations:
|
|
|
806
830
|
"""
|
|
807
831
|
self.nas_raw_data_path = Path(self.nas_raw_data_path)
|
|
808
832
|
self.server_raw_data_path = Path(self.server_raw_data_path)
|
|
833
|
+
self.server_configuration_path = Path(self.server_configuration_path)
|
|
834
|
+
self.server_processed_data_path = Path(self.server_processed_data_path)
|
|
809
835
|
|
|
810
836
|
if self.server_telomere_path == "null":
|
|
811
837
|
self.server_telomere_path = self.server_raw_data_path.joinpath("telomere.bin")
|
|
838
|
+
if self.server_suite2p_configuration_path == "null":
|
|
839
|
+
self.server_suite2p_configuration_path = self.server_configuration_path.joinpath(
|
|
840
|
+
"suite2p_configuration.yaml"
|
|
841
|
+
)
|
|
842
|
+
if self.server_processing_tracker_path == "null":
|
|
843
|
+
self.server_processing_tracker_path = self.server_processed_data_path.joinpath("processing_tracker.yaml")
|
|
844
|
+
if self.server_multiday_configuration_path == "null":
|
|
845
|
+
self.server_multiday_configuration_path = self.server_configuration_path.joinpath(
|
|
846
|
+
"multiday_configuration.yaml"
|
|
847
|
+
)
|
|
812
848
|
|
|
813
849
|
def make_string(self) -> None:
|
|
814
850
|
"""Converts all Path objects stored inside the class to strings.
|
|
@@ -819,11 +855,18 @@ class Destinations:
|
|
|
819
855
|
self.nas_raw_data_path = str(self.nas_raw_data_path)
|
|
820
856
|
self.server_raw_data_path = str(self.server_raw_data_path)
|
|
821
857
|
self.server_telomere_path = str(self.server_telomere_path)
|
|
858
|
+
self.server_configuration_path = str(self.server_configuration_path)
|
|
859
|
+
self.server_processed_data_path = str(self.server_processed_data_path)
|
|
860
|
+
self.server_suite2p_configuration_path = str(self.server_suite2p_configuration_path)
|
|
861
|
+
self.server_processing_tracker_path = str(self.server_processing_tracker_path)
|
|
862
|
+
self.server_multiday_configuration_path = str(self.server_multiday_configuration_path)
|
|
822
863
|
|
|
823
864
|
def make_dirs(self) -> None:
|
|
824
865
|
"""Ensures that all destination directories exist."""
|
|
825
866
|
ensure_directory_exists(Path(self.nas_raw_data_path))
|
|
826
867
|
ensure_directory_exists(Path(self.server_raw_data_path))
|
|
868
|
+
ensure_directory_exists(Path(self.server_configuration_path))
|
|
869
|
+
ensure_directory_exists(Path(self.server_processed_data_path))
|
|
827
870
|
|
|
828
871
|
|
|
829
872
|
@dataclass
|
|
@@ -948,6 +991,7 @@ class SessionData(YamlConfig):
|
|
|
948
991
|
vrpc_root = Path(project_configuration.local_root_directory)
|
|
949
992
|
mesoscope_root = Path(project_configuration.local_mesoscope_directory)
|
|
950
993
|
biohpc_root = Path(project_configuration.local_server_directory)
|
|
994
|
+
biohpc_workdir = Path(project_configuration.local_server_working_directory)
|
|
951
995
|
nas_root = Path(project_configuration.local_nas_directory)
|
|
952
996
|
|
|
953
997
|
# Extracts the name of the project stored inside the project configuration file.
|
|
@@ -1001,6 +1045,8 @@ class SessionData(YamlConfig):
|
|
|
1001
1045
|
destinations = Destinations(
|
|
1002
1046
|
nas_raw_data_path=nas_root.joinpath(project_name, animal_id, session_name, "raw_data"),
|
|
1003
1047
|
server_raw_data_path=biohpc_root.joinpath(project_name, animal_id, session_name, "raw_data"),
|
|
1048
|
+
server_configuration_path=biohpc_workdir.joinpath(project_name, "configuration"),
|
|
1049
|
+
server_processed_data_path=biohpc_workdir.joinpath(project_name, "processed_data"),
|
|
1004
1050
|
)
|
|
1005
1051
|
destinations.make_dirs() # Generates all destination directory trees
|
|
1006
1052
|
|
|
@@ -1582,7 +1628,7 @@ class SurgeryData(YamlConfig):
|
|
|
1582
1628
|
|
|
1583
1629
|
@dataclass()
|
|
1584
1630
|
class ProcessingTracker(YamlConfig):
|
|
1585
|
-
"""
|
|
1631
|
+
"""Tracks the data processing status for a single session.
|
|
1586
1632
|
|
|
1587
1633
|
This class is used during BioHPC-server data processing runtimes to track which processing steps are enabled and
|
|
1588
1634
|
have been successfully applied to a given session. This is used to optimize data processing and avoid unnecessary
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/src/sl_shared_assets/ascension_tools.py
RENAMED
|
File without changes
|
|
File without changes
|
{sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/src/sl_shared_assets/packaging_tools.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sl_shared_assets-1.0.0rc12 → sl_shared_assets-1.0.0rc13}/src/sl_shared_assets/transfer_tools.py
RENAMED
|
File without changes
|
|
File without changes
|