sl-shared-assets 3.0.0rc7__tar.gz → 3.0.0rc9__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-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/PKG-INFO +1 -1
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/pyproject.toml +1 -1
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/__init__.py +2 -2
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/__init__.pyi +2 -2
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/data_classes/__init__.py +2 -2
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/data_classes/__init__.pyi +2 -2
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/data_classes/configuration_data.py +45 -20
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/data_classes/configuration_data.pyi +14 -10
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/data_classes/session_data.py +22 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/data_classes/session_data.pyi +8 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/tools/ascension_tools.py +3 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/.gitignore +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/LICENSE +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/README.md +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/docs/Makefile +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/docs/make.bat +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/docs/source/api.rst +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/docs/source/conf.py +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/docs/source/index.rst +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/docs/source/welcome.rst +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/envs/slsa_dev_lin.yml +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/envs/slsa_dev_lin_spec.txt +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/cli.py +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/cli.pyi +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/data_classes/runtime_data.py +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/data_classes/runtime_data.pyi +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/data_classes/surgery_data.py +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/data_classes/surgery_data.pyi +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/py.typed +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/server/__init__.py +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/server/__init__.pyi +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/server/job.py +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/server/job.pyi +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/server/server.py +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/server/server.pyi +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/tools/__init__.py +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/tools/__init__.pyi +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/tools/ascension_tools.pyi +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/tools/packaging_tools.py +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/tools/packaging_tools.pyi +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/tools/project_management_tools.py +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/tools/project_management_tools.pyi +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/tools/transfer_tools.py +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/tools/transfer_tools.pyi +0 -0
- {sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sl-shared-assets
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0rc9
|
|
4
4
|
Summary: Provides data acquisition and processing assets shared between Sun (NeuroAI) lab libraries.
|
|
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 = "3.0.
|
|
11
|
+
version = "3.0.0rc9"
|
|
12
12
|
description = "Provides data acquisition and processing assets shared between Sun (NeuroAI) lab libraries."
|
|
13
13
|
readme = "README.md"
|
|
14
14
|
license = { file = "LICENSE" }
|
|
@@ -26,8 +26,8 @@ from .data_classes import (
|
|
|
26
26
|
MesoscopePaths,
|
|
27
27
|
ZaberPositions,
|
|
28
28
|
ExperimentState,
|
|
29
|
+
ExperimentTrial,
|
|
29
30
|
MesoscopeCameras,
|
|
30
|
-
TrialCueSequence,
|
|
31
31
|
ProcessingTracker,
|
|
32
32
|
MesoscopePositions,
|
|
33
33
|
RunTrainingDescriptor,
|
|
@@ -78,7 +78,7 @@ __all__ = [
|
|
|
78
78
|
"MesoscopeAdditionalFirmware",
|
|
79
79
|
"get_system_configuration_data",
|
|
80
80
|
"set_system_configuration_file",
|
|
81
|
-
"
|
|
81
|
+
"ExperimentTrial",
|
|
82
82
|
# Tools package
|
|
83
83
|
"resolve_p53_marker",
|
|
84
84
|
"transfer_directory",
|
|
@@ -22,8 +22,8 @@ from .data_classes import (
|
|
|
22
22
|
MesoscopePaths as MesoscopePaths,
|
|
23
23
|
ZaberPositions as ZaberPositions,
|
|
24
24
|
ExperimentState as ExperimentState,
|
|
25
|
+
ExperimentTrial as ExperimentTrial,
|
|
25
26
|
MesoscopeCameras as MesoscopeCameras,
|
|
26
|
-
TrialCueSequence as TrialCueSequence,
|
|
27
27
|
ProcessingTracker as ProcessingTracker,
|
|
28
28
|
MesoscopePositions as MesoscopePositions,
|
|
29
29
|
RunTrainingDescriptor as RunTrainingDescriptor,
|
|
@@ -68,7 +68,7 @@ __all__ = [
|
|
|
68
68
|
"MesoscopeAdditionalFirmware",
|
|
69
69
|
"get_system_configuration_data",
|
|
70
70
|
"set_system_configuration_file",
|
|
71
|
-
"
|
|
71
|
+
"ExperimentTrial",
|
|
72
72
|
"resolve_p53_marker",
|
|
73
73
|
"transfer_directory",
|
|
74
74
|
"calculate_directory_checksum",
|
|
@@ -23,8 +23,8 @@ from .surgery_data import (
|
|
|
23
23
|
from .configuration_data import (
|
|
24
24
|
MesoscopePaths,
|
|
25
25
|
ExperimentState,
|
|
26
|
+
ExperimentTrial,
|
|
26
27
|
MesoscopeCameras,
|
|
27
|
-
TrialCueSequence,
|
|
28
28
|
MesoscopeMicroControllers,
|
|
29
29
|
MesoscopeAdditionalFirmware,
|
|
30
30
|
MesoscopeSystemConfiguration,
|
|
@@ -59,5 +59,5 @@ __all__ = [
|
|
|
59
59
|
"MesoscopeMicroControllers",
|
|
60
60
|
"MesoscopeAdditionalFirmware",
|
|
61
61
|
"ProcessingTracker",
|
|
62
|
-
"
|
|
62
|
+
"ExperimentTrial",
|
|
63
63
|
]
|
|
@@ -23,8 +23,8 @@ from .surgery_data import (
|
|
|
23
23
|
from .configuration_data import (
|
|
24
24
|
MesoscopePaths as MesoscopePaths,
|
|
25
25
|
ExperimentState as ExperimentState,
|
|
26
|
+
ExperimentTrial as ExperimentTrial,
|
|
26
27
|
MesoscopeCameras as MesoscopeCameras,
|
|
27
|
-
TrialCueSequence as TrialCueSequence,
|
|
28
28
|
MesoscopeMicroControllers as MesoscopeMicroControllers,
|
|
29
29
|
MesoscopeAdditionalFirmware as MesoscopeAdditionalFirmware,
|
|
30
30
|
MesoscopeSystemConfiguration as MesoscopeSystemConfiguration,
|
|
@@ -59,5 +59,5 @@ __all__ = [
|
|
|
59
59
|
"MesoscopeMicroControllers",
|
|
60
60
|
"MesoscopeAdditionalFirmware",
|
|
61
61
|
"ProcessingTracker",
|
|
62
|
-
"
|
|
62
|
+
"ExperimentTrial",
|
|
63
63
|
]
|
|
@@ -56,14 +56,14 @@ class ExperimentState:
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
@dataclass()
|
|
59
|
-
class
|
|
60
|
-
"""Encapsulates information about
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
some
|
|
65
|
-
this class can be used to specify supported trial structures
|
|
66
|
-
|
|
59
|
+
class ExperimentTrial:
|
|
60
|
+
"""Encapsulates information about a single experiment trial.
|
|
61
|
+
|
|
62
|
+
All Virtual Reality tasks can be broadly conceptualized as repeating motifs (sequences) of wall cues,
|
|
63
|
+
associated with a specific rewarded goal. These repeated motifs are typically used to define experiment trials
|
|
64
|
+
during analysis. Since some experiments can use multiple trial types as part of the same experiment session,
|
|
65
|
+
multiple instances of this class can be used to specify supported trial structures and trial parameters for a
|
|
66
|
+
given experiment.
|
|
67
67
|
"""
|
|
68
68
|
|
|
69
69
|
cue_sequence: list[int]
|
|
@@ -72,6 +72,15 @@ class TrialCueSequence:
|
|
|
72
72
|
"""The length of the trial cue sequence, in Unity units."""
|
|
73
73
|
trial_length_cm: float
|
|
74
74
|
"""The length of the trial cue sequence in centimeters."""
|
|
75
|
+
trial_reward_size_ul: float
|
|
76
|
+
"""The volume of water, in microliters, to be dispensed when the animal successfully completes the trial task."""
|
|
77
|
+
reward_zone_start_cm: float
|
|
78
|
+
"""Specifies the starting boundary of the trial reward zone, in centimeters."""
|
|
79
|
+
reward_zone_end_cm: float
|
|
80
|
+
"""Specifies the ending boundary of the trial reward zone, in centimeters."""
|
|
81
|
+
guidance_trigger_location_cm: float
|
|
82
|
+
"""Specifies the location of the invisible boundary (wall) with which the animal must collide to elicit automated
|
|
83
|
+
water reward during guided trials."""
|
|
75
84
|
|
|
76
85
|
|
|
77
86
|
# noinspection PyArgumentList
|
|
@@ -98,6 +107,14 @@ class MesoscopeExperimentConfiguration(YamlConfig):
|
|
|
98
107
|
"""A dictionary that maps each integer-code associated with a wall cue used in the Virtual Reality experiment
|
|
99
108
|
environment to its length in real-world centimeters. It is used to map each VR cue to the distance the animal needs
|
|
100
109
|
to travel to fully traverse the wall cue region from start to end."""
|
|
110
|
+
cue_offset_cm: float = 10.0
|
|
111
|
+
"""Specifies the positive offset distance, in centimeters, by which the animal's running track is shifted
|
|
112
|
+
relative to experiment environment onset. Due to how the VR environment is revealed to the animal, most runtimes
|
|
113
|
+
need to shift the animal slightly forward relative to the track origin (0), to prevent it from seeing the area
|
|
114
|
+
before the first VR wall cue when the task starts and when the animal is teleported to the beginning of the track.
|
|
115
|
+
This offset statically shifts the entire track (in centimeters) against the set of VR wall cues used during
|
|
116
|
+
runtime. Storing this static offset as part of experiment configuration is crucial for correctly interpreting the
|
|
117
|
+
data acquiring during runtime."""
|
|
101
118
|
experiment_states: dict[str, ExperimentState] = field(
|
|
102
119
|
default_factory=lambda: {
|
|
103
120
|
"baseline": ExperimentState(
|
|
@@ -128,15 +145,22 @@ class MesoscopeExperimentConfiguration(YamlConfig):
|
|
|
128
145
|
)
|
|
129
146
|
"""A dictionary that uses human-readable state-names as keys and ExperimentState instances as values. Each
|
|
130
147
|
ExperimentState instance represents a phase of the experiment."""
|
|
131
|
-
trial_structures: dict[str,
|
|
148
|
+
trial_structures: dict[str, ExperimentTrial] = field(
|
|
132
149
|
default_factory=lambda: {
|
|
133
|
-
"
|
|
134
|
-
cue_sequence=[
|
|
150
|
+
"cyclic_4_cue": ExperimentTrial(
|
|
151
|
+
cue_sequence=[1, 0, 2, 0, 3, 0, 4, 0],
|
|
152
|
+
trial_length_unity_unit=24.0,
|
|
153
|
+
trial_length_cm=240.0,
|
|
154
|
+
trial_reward_size_ul=5.0,
|
|
155
|
+
reward_zone_start_cm=208.0,
|
|
156
|
+
reward_zone_end_cm=222.0,
|
|
157
|
+
guidance_trigger_location_cm=208.0,
|
|
135
158
|
)
|
|
136
159
|
}
|
|
137
160
|
)
|
|
138
|
-
"""A dictionary that maps human-readable trial structure names as keys and
|
|
139
|
-
Each
|
|
161
|
+
"""A dictionary that maps human-readable trial structure names as keys and ExperimentTrial instances as values.
|
|
162
|
+
Each ExperimentTrial instance specifies the Virtual Reality layout and runtime parameters associated with a single
|
|
163
|
+
type of trials supported by the experiment runtime."""
|
|
140
164
|
|
|
141
165
|
|
|
142
166
|
@dataclass()
|
|
@@ -231,9 +255,6 @@ class MesoscopeMicroControllers:
|
|
|
231
255
|
"""Determines whether to run the managed acquisition system in the 'debug mode'. This mode should be disabled
|
|
232
256
|
during most runtimes. It is used during initial system calibration and testing and prints a lot of generally
|
|
233
257
|
redundant information into the terminal."""
|
|
234
|
-
mesoscope_ttl_pulse_duration_ms: int = 10
|
|
235
|
-
"""The duration of the HIGH phase of all outgoing TTL pulses that target the Mesoscope (enable or disable mesoscope
|
|
236
|
-
frame acquisition), in milliseconds."""
|
|
237
258
|
minimum_break_strength_g_cm: float = 43.2047
|
|
238
259
|
"""The minimum torque applied by the running wheel break in gram centimeter. This is the torque the break delivers
|
|
239
260
|
at minimum voltage (break is disabled)."""
|
|
@@ -253,8 +274,10 @@ class MesoscopeMicroControllers:
|
|
|
253
274
|
"""The minimum absolute difference in raw analog units recorded by a 12-bit Analog-to-Digital-Converter (ADC) for
|
|
254
275
|
the change to be reported to the PC. This is used to prevent reporting repeated non-lick or lick readouts to the
|
|
255
276
|
PC, conserving communication bandwidth."""
|
|
256
|
-
lick_averaging_pool_size: int =
|
|
257
|
-
"""The number of lick sensor readouts to average together to produce the final lick sensor readout value.
|
|
277
|
+
lick_averaging_pool_size: int = 1
|
|
278
|
+
"""The number of lick sensor readouts to average together to produce the final lick sensor readout value. Note,
|
|
279
|
+
when using a Teensy controller, this number is multiplied by the built-in analog readout averaging (default is 4).
|
|
280
|
+
"""
|
|
258
281
|
torque_baseline_voltage_adc: int = 2046
|
|
259
282
|
"""The voltage level, in raw analog units measured by 3.3v Analog-to-Digital-Converter (ADC) at 12-bit resolution
|
|
260
283
|
after the AD620 amplifier, that corresponds to no (0) torque readout. Usually, for a 3.3v ADC, this would be
|
|
@@ -278,8 +301,10 @@ class MesoscopeMicroControllers:
|
|
|
278
301
|
"""The minimum absolute difference in raw analog units recorded by a 12-bit Analog-to-Digital-Converter (ADC) for
|
|
279
302
|
the change to be reported to the PC. This is used to prevent reporting repeated static torque readouts to the
|
|
280
303
|
PC, conserving communication bandwidth."""
|
|
281
|
-
torque_averaging_pool_size: int =
|
|
282
|
-
"""The number of torque sensor readouts to average together to produce the final torque sensor readout value.
|
|
304
|
+
torque_averaging_pool_size: int = 1
|
|
305
|
+
"""The number of torque sensor readouts to average together to produce the final torque sensor readout value. Note,
|
|
306
|
+
when using a Teensy controller, this number is multiplied by the built-in analog readout averaging (default is 4).
|
|
307
|
+
"""
|
|
283
308
|
wheel_encoder_ppr: int = 8192
|
|
284
309
|
"""The resolution of the managed quadrature encoder, in Pulses Per Revolution (PPR). This is the number of
|
|
285
310
|
quadrature pulses the encoder emits per full 360-degree rotation."""
|
|
@@ -28,19 +28,23 @@ class ExperimentState:
|
|
|
28
28
|
recovery_guided_trials: int
|
|
29
29
|
|
|
30
30
|
@dataclass()
|
|
31
|
-
class
|
|
32
|
-
"""Encapsulates information about
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
some
|
|
37
|
-
this class can be used to specify supported trial structures
|
|
38
|
-
|
|
31
|
+
class ExperimentTrial:
|
|
32
|
+
"""Encapsulates information about a single experiment trial.
|
|
33
|
+
|
|
34
|
+
All Virtual Reality tasks can be broadly conceptualized as repeating motifs (sequences) of wall cues,
|
|
35
|
+
associated with a specific rewarded goal. These repeated motifs are typically used to define experiment trials
|
|
36
|
+
during analysis. Since some experiments can use multiple trial types as part of the same experiment session,
|
|
37
|
+
multiple instances of this class can be used to specify supported trial structures and trial parameters for a
|
|
38
|
+
given experiment.
|
|
39
39
|
"""
|
|
40
40
|
|
|
41
41
|
cue_sequence: list[int]
|
|
42
42
|
trial_length_unity_unit: float
|
|
43
43
|
trial_length_cm: float
|
|
44
|
+
trial_reward_size_ul: float
|
|
45
|
+
reward_zone_start_cm: float
|
|
46
|
+
reward_zone_end_cm: float
|
|
47
|
+
guidance_trigger_location_cm: float
|
|
44
48
|
|
|
45
49
|
@dataclass()
|
|
46
50
|
class MesoscopeExperimentConfiguration(YamlConfig):
|
|
@@ -62,8 +66,9 @@ class MesoscopeExperimentConfiguration(YamlConfig):
|
|
|
62
66
|
"""
|
|
63
67
|
|
|
64
68
|
cue_map: dict[int, float] = field(default_factory=Incomplete)
|
|
69
|
+
cue_offset_cm: float = ...
|
|
65
70
|
experiment_states: dict[str, ExperimentState] = field(default_factory=Incomplete)
|
|
66
|
-
trial_structures: dict[str,
|
|
71
|
+
trial_structures: dict[str, ExperimentTrial] = field(default_factory=Incomplete)
|
|
67
72
|
|
|
68
73
|
@dataclass()
|
|
69
74
|
class MesoscopePaths:
|
|
@@ -105,7 +110,6 @@ class MesoscopeMicroControllers:
|
|
|
105
110
|
sensor_port: str = ...
|
|
106
111
|
encoder_port: str = ...
|
|
107
112
|
debug: bool = ...
|
|
108
|
-
mesoscope_ttl_pulse_duration_ms: int = ...
|
|
109
113
|
minimum_break_strength_g_cm: float = ...
|
|
110
114
|
maximum_break_strength_g_cm: float = ...
|
|
111
115
|
wheel_diameter_cm: float = ...
|
|
@@ -103,6 +103,13 @@ class RawData:
|
|
|
103
103
|
the long-term storage destinations (NAS and Server) and the integrity of the moved data is verified on at least one
|
|
104
104
|
destination. During 'purge' sl-experiment runtimes, the library discovers and removes all session data marked with
|
|
105
105
|
'ubiquitin.bin' files from the machine that runs the code."""
|
|
106
|
+
nk_path: Path = Path()
|
|
107
|
+
"""Stores the path to the nk.bin file. This file is used during new data acquisition by the sl-experiment library
|
|
108
|
+
to mark sessions going through initial runtime initialization. Since runtime initialization is a complex process
|
|
109
|
+
that may fail at many different time-points, it is important to know whether the runtime initialized before
|
|
110
|
+
encountering an error. The presence of an nk.bin marker notifies post-runtime processes that the runtime failed to
|
|
111
|
+
initialize, marking that session's data for immediate deletion from all sources, as it does not contain any valid
|
|
112
|
+
information."""
|
|
106
113
|
integrity_verification_tracker_path: Path = Path()
|
|
107
114
|
"""Stores the path to the integrity_verification.yaml tracker file. This file stores the current state of the data
|
|
108
115
|
integrity verification pipeline. It prevents more than one instance of the pipeline from working with the data
|
|
@@ -137,6 +144,7 @@ class RawData:
|
|
|
137
144
|
self.system_configuration_path = self.raw_data_path.joinpath("system_configuration.yaml")
|
|
138
145
|
self.telomere_path = self.raw_data_path.joinpath("telomere.bin")
|
|
139
146
|
self.ubiquitin_path = self.raw_data_path.joinpath("ubiquitin.bin")
|
|
147
|
+
self.nk_path = self.raw_data_path.joinpath("nk.bin")
|
|
140
148
|
self.integrity_verification_tracker_path = self.raw_data_path.joinpath("integrity_verification_tracker.yaml")
|
|
141
149
|
|
|
142
150
|
def make_directories(self) -> None:
|
|
@@ -406,6 +414,11 @@ class SessionData(YamlConfig):
|
|
|
406
414
|
)
|
|
407
415
|
sh.copy2(experiment_configuration_path, instance.raw_data.experiment_configuration_path)
|
|
408
416
|
|
|
417
|
+
# All newly created sessions are marked with the 'nk.bin' file. If the marker is not removed during runtime,
|
|
418
|
+
# the session becomes a valid target for deletion (purging) runtimes operating from the main acquisition
|
|
419
|
+
# machine of any data acquisition system.
|
|
420
|
+
instance.raw_data.nk_path.touch()
|
|
421
|
+
|
|
409
422
|
# Returns the initialized SessionData instance to caller
|
|
410
423
|
return instance
|
|
411
424
|
|
|
@@ -485,6 +498,15 @@ class SessionData(YamlConfig):
|
|
|
485
498
|
# Returns the initialized SessionData instance to caller
|
|
486
499
|
return instance
|
|
487
500
|
|
|
501
|
+
def mark_initialization(self) -> None:
|
|
502
|
+
"""Ensures that the 'nk.bin' marker file is removed from the session's raw_dat folder.
|
|
503
|
+
|
|
504
|
+
This marker is generated as part of the SessionData initialization (creation) process to mark sessions that did
|
|
505
|
+
not fully initialize during runtime. Call this method after fully initializing the data acquisition runtime
|
|
506
|
+
control class to ensure that the session is not marker for automated deletion upon runtime completion.
|
|
507
|
+
"""
|
|
508
|
+
self.raw_data.nk_path.unlink(missing_ok=True)
|
|
509
|
+
|
|
488
510
|
def _save(self) -> None:
|
|
489
511
|
"""Saves the instance data to the 'raw_data' directory of the managed session as a 'session_data.yaml' file.
|
|
490
512
|
|
|
@@ -37,6 +37,7 @@ class RawData:
|
|
|
37
37
|
checksum_path: Path = ...
|
|
38
38
|
telomere_path: Path = ...
|
|
39
39
|
ubiquitin_path: Path = ...
|
|
40
|
+
nk_path: Path = ...
|
|
40
41
|
integrity_verification_tracker_path: Path = ...
|
|
41
42
|
def resolve_paths(self, root_directory_path: Path) -> None:
|
|
42
43
|
"""Resolves all paths managed by the class instance based on the input root directory path.
|
|
@@ -190,6 +191,13 @@ class SessionData(YamlConfig):
|
|
|
190
191
|
Raises:
|
|
191
192
|
FileNotFoundError: If the 'session_data.yaml' file is not found under the session_path/raw_data/ subfolder.
|
|
192
193
|
|
|
194
|
+
"""
|
|
195
|
+
def mark_initialization(self) -> None:
|
|
196
|
+
"""Ensures that the 'nk.bin' marker file is removed from the session's raw_dat folder.
|
|
197
|
+
|
|
198
|
+
This marker is generated as part of the SessionData initialization (creation) process to mark sessions that did
|
|
199
|
+
not fully initialize during runtime. Call this method after fully initializing the data acquisition runtime
|
|
200
|
+
control class to ensure that the session is not marker for automated deletion upon runtime completion.
|
|
193
201
|
"""
|
|
194
202
|
def _save(self) -> None:
|
|
195
203
|
"""Saves the instance data to the 'raw_data' directory of the managed session as a 'session_data.yaml' file.
|
|
@@ -226,6 +226,9 @@ def ascend_tyche_data(root_directory: Path) -> None:
|
|
|
226
226
|
experiment_name=None,
|
|
227
227
|
)
|
|
228
228
|
|
|
229
|
+
# Since this runtime reprocesses already acquired data, marks the session as fully initialized.
|
|
230
|
+
session_data.mark_initialization()
|
|
231
|
+
|
|
229
232
|
# Moves the data from the old hierarchy to the new hierarchy. If the process runs as expected, and
|
|
230
233
|
# fully empties the source acquisition folder, destroys the folder. Otherwise, notifies the user that
|
|
231
234
|
# the runtime did not fully process the session data and requests intervention.
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/server/__init__.py
RENAMED
|
File without changes
|
{sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/server/__init__.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/server/server.py
RENAMED
|
File without changes
|
{sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/server/server.pyi
RENAMED
|
File without changes
|
{sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/tools/__init__.py
RENAMED
|
File without changes
|
{sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/tools/__init__.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sl_shared_assets-3.0.0rc7 → sl_shared_assets-3.0.0rc9}/src/sl_shared_assets/tools/transfer_tools.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|