sl-shared-assets 1.0.0rc28__py3-none-any.whl → 1.0.2__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/cli.py +1 -1
- sl_shared_assets/data_classes/configuration_data.py +3 -3
- sl_shared_assets/data_classes/configuration_data.pyi +3 -3
- sl_shared_assets/data_classes/session_data.py +1 -1
- sl_shared_assets/server/server.py +2 -1
- sl_shared_assets/tools/packaging_tools.py +1 -0
- sl_shared_assets/tools/project_management_tools.py +5 -4
- {sl_shared_assets-1.0.0rc28.dist-info → sl_shared_assets-1.0.2.dist-info}/METADATA +10 -7
- {sl_shared_assets-1.0.0rc28.dist-info → sl_shared_assets-1.0.2.dist-info}/RECORD +12 -12
- {sl_shared_assets-1.0.0rc28.dist-info → sl_shared_assets-1.0.2.dist-info}/WHEEL +0 -0
- {sl_shared_assets-1.0.0rc28.dist-info → sl_shared_assets-1.0.2.dist-info}/entry_points.txt +0 -0
- {sl_shared_assets-1.0.0rc28.dist-info → sl_shared_assets-1.0.2.dist-info}/licenses/LICENSE +0 -0
sl_shared_assets/cli.py
CHANGED
|
@@ -33,7 +33,7 @@ from .data_classes import (
|
|
|
33
33
|
show_default=True,
|
|
34
34
|
default=False,
|
|
35
35
|
help=(
|
|
36
|
-
"Determines whether to
|
|
36
|
+
"Determines whether to create the processed data hierarchy. This flag should be disabled for most runtimes. "
|
|
37
37
|
"Primarily, it is used by lab acquisition system code to generate processed data directories on the remote "
|
|
38
38
|
"compute servers as part of the data preprocessing pipeline."
|
|
39
39
|
),
|
|
@@ -207,7 +207,7 @@ class MesoscopeMicroControllers:
|
|
|
207
207
|
PC, conserving communication bandwidth."""
|
|
208
208
|
torque_averaging_pool_size: int = 10
|
|
209
209
|
"""The number of torque sensor readouts to average together to produce the final torque sensor readout value."""
|
|
210
|
-
wheel_encoder_ppr = 8192
|
|
210
|
+
wheel_encoder_ppr: int = 8192
|
|
211
211
|
"""The resolution of the managed quadrature encoder, in Pulses Per Revolution (PPR). This is the number of
|
|
212
212
|
quadrature pulses the encoder emits per full 360-degree rotation."""
|
|
213
213
|
wheel_encoder_report_cw: bool = False
|
|
@@ -219,9 +219,9 @@ class MesoscopeMicroControllers:
|
|
|
219
219
|
wheel_encoder_delta_threshold_pulse: int = 15
|
|
220
220
|
"""The minimum difference, in encoder pulse counts, between two encoder readouts for the change to be reported to
|
|
221
221
|
the PC. This is used to prevent reporting idle readouts and filter out sub-threshold noise."""
|
|
222
|
-
wheel_encoder_polling_delay_us = 500
|
|
222
|
+
wheel_encoder_polling_delay_us: int = 500
|
|
223
223
|
"""The delay, in microseconds, between any two successive encoder state readouts."""
|
|
224
|
-
cm_per_unity_unit = 10.0
|
|
224
|
+
cm_per_unity_unit: float = 10.0
|
|
225
225
|
"""The length of each Unity 'unit' in real-world centimeters recorded by the running wheel encoder."""
|
|
226
226
|
screen_trigger_pulse_duration_ms: int = 500
|
|
227
227
|
"""The duration of the HIGH phase of the TTL pulse used to toggle the VR screens between ON and OFF states."""
|
|
@@ -97,12 +97,12 @@ class MesoscopeMicroControllers:
|
|
|
97
97
|
torque_signal_threshold_adc: int = ...
|
|
98
98
|
torque_delta_threshold_adc: int = ...
|
|
99
99
|
torque_averaging_pool_size: int = ...
|
|
100
|
-
wheel_encoder_ppr = ...
|
|
100
|
+
wheel_encoder_ppr: int = ...
|
|
101
101
|
wheel_encoder_report_cw: bool = ...
|
|
102
102
|
wheel_encoder_report_ccw: bool = ...
|
|
103
103
|
wheel_encoder_delta_threshold_pulse: int = ...
|
|
104
|
-
wheel_encoder_polling_delay_us = ...
|
|
105
|
-
cm_per_unity_unit = ...
|
|
104
|
+
wheel_encoder_polling_delay_us: int = ...
|
|
105
|
+
cm_per_unity_unit: float = ...
|
|
106
106
|
screen_trigger_pulse_duration_ms: int = ...
|
|
107
107
|
auditory_tone_duration_ms: int = ...
|
|
108
108
|
valve_calibration_pulse_count: int = ...
|
|
@@ -587,7 +587,7 @@ class SessionData(YamlConfig):
|
|
|
587
587
|
|
|
588
588
|
# Unless a different root is provided for processed data, it uses the same root as raw_data.
|
|
589
589
|
if processed_data_root is None:
|
|
590
|
-
processed_data_root =
|
|
590
|
+
processed_data_root = local_root
|
|
591
591
|
|
|
592
592
|
# Regenerates the processed_data path depending on the root resolution above
|
|
593
593
|
instance.processed_data.resolve_paths(
|
|
@@ -75,7 +75,7 @@ class Server:
|
|
|
75
75
|
"""
|
|
76
76
|
|
|
77
77
|
def __init__(self, credentials_path: Path) -> None:
|
|
78
|
-
# Tracker used to prevent __del__ from
|
|
78
|
+
# Tracker used to prevent __del__ from calling stop() for a partially initialized class.
|
|
79
79
|
self._open: bool = False
|
|
80
80
|
|
|
81
81
|
# Loads the credentials from the provided .yaml file
|
|
@@ -95,6 +95,7 @@ class Server:
|
|
|
95
95
|
self._credentials.host, username=self._credentials.username, password=self._credentials.password
|
|
96
96
|
)
|
|
97
97
|
console.echo(f"Connected to {self._credentials.host}", level=LogLevel.SUCCESS)
|
|
98
|
+
self._open = True
|
|
98
99
|
break
|
|
99
100
|
except paramiko.AuthenticationException:
|
|
100
101
|
message = (
|
|
@@ -176,6 +176,11 @@ def verify_session_checksum(
|
|
|
176
176
|
make_processed_data_directory=create_processed_data_directory,
|
|
177
177
|
)
|
|
178
178
|
|
|
179
|
+
# Unlinks the verified.bin marker if it exists. The presence or absence of the marker is used as the
|
|
180
|
+
# primary heuristic for determining if the session data passed verification. Unlinking it early helps in the case
|
|
181
|
+
# the verification procedure aborts unexpectedly for any reason.
|
|
182
|
+
session_data.raw_data.verified_bin_path.unlink(missing_ok=True)
|
|
183
|
+
|
|
179
184
|
# Re-calculates the checksum for the raw_data directory
|
|
180
185
|
calculated_checksum = calculate_directory_checksum(
|
|
181
186
|
directory=session_data.raw_data.raw_data_path, batch=False, save_checksum=False
|
|
@@ -191,10 +196,6 @@ def verify_session_checksum(
|
|
|
191
196
|
# all other Sun lab runtimes.
|
|
192
197
|
session_data.raw_data.telomere_path.unlink(missing_ok=True)
|
|
193
198
|
|
|
194
|
-
# Also unlinks the verified.bin marker if it exists. The presence or absence of the marker is used as the
|
|
195
|
-
# primary heuristic for determining if the session data passed verification.
|
|
196
|
-
session_data.raw_data.verified_bin_path.unlink(missing_ok=True)
|
|
197
|
-
|
|
198
199
|
# Otherwise, ensures that the session is marked with the verified.bin marker file.
|
|
199
200
|
else:
|
|
200
201
|
session_data.raw_data.verified_bin_path.touch(exist_ok=True)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sl-shared-assets
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
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/
|
|
@@ -768,16 +768,16 @@ ___
|
|
|
768
768
|
|
|
769
769
|
## Detailed Description
|
|
770
770
|
|
|
771
|
-
Primarily, this library is designed to make the two main Sun lab libraries used
|
|
771
|
+
Primarily, this library is designed to make the two main Sun lab libraries used for data acquisition
|
|
772
772
|
([sl-experiment](https://github.com/Sun-Lab-NBB/sl-experiment)) and processing
|
|
773
773
|
([sl-forgery](https://github.com/Sun-Lab-NBB/sl-forgery)) independent of each other. This is beneficial, as both
|
|
774
|
-
libraries feature an extensive and
|
|
774
|
+
libraries feature an extensive and largely incompatible set of runtime dependencies. Moreover, having a shared
|
|
775
775
|
repository of classes and tools reused across Sun lab pipelines streamlines the maintenance of these tools.
|
|
776
776
|
|
|
777
777
|
The library broadly stores two types of assets. First, it stores various dataclasses used to save the data acquired
|
|
778
|
-
during experiments in the lab
|
|
779
|
-
|
|
780
|
-
|
|
778
|
+
during experiments in the lab and the dataclasses used to configure data acquisition and processing runtimes. Secondly,
|
|
779
|
+
it stores the tools used to safely move the data between the machines (computers) used in the data acquisition and
|
|
780
|
+
processing, and provides the API for running various data processing jobs on remote compute servers.
|
|
781
781
|
|
|
782
782
|
---
|
|
783
783
|
|
|
@@ -819,7 +819,10 @@ Use the following command to install the library using pip: ```pip install sl-sh
|
|
|
819
819
|
## Usage
|
|
820
820
|
|
|
821
821
|
All library components are intended to be used via other Sun lab libraries. Developers should study the API and CLI
|
|
822
|
-
documentation below to learn how to use library components in other Sun lab libraries.
|
|
822
|
+
documentation below to learn how to use library components in other Sun lab libraries. For notes on using shared
|
|
823
|
+
assets for data acquisition, see the [sl-experiment](https://github.com/Sun-Lab-NBB/sl-experiment) library ReadMe.
|
|
824
|
+
For notes on using shared assets for data processing, see the [sl-forgery](https://github.com/Sun-Lab-NBB/sl-forgery)
|
|
825
|
+
library ReadMe.
|
|
823
826
|
|
|
824
827
|
---
|
|
825
828
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
sl_shared_assets/__init__.py,sha256=rscR353jiyUQ-wpguTLOM-A5Lqr1ftQtuTan1D0AtR0,2196
|
|
2
2
|
sl_shared_assets/__init__.pyi,sha256=Ye6eY_y_l9CTqwbCf-OxXOphxXKfn9UJnuw09DdLEtc,2405
|
|
3
|
-
sl_shared_assets/cli.py,sha256=
|
|
3
|
+
sl_shared_assets/cli.py,sha256=Rfc0W0yUgFi3ohL7Jmx6kh_V-h3qsqPYSpxjqNYtnEE,17433
|
|
4
4
|
sl_shared_assets/cli.pyi,sha256=p1tUflODySXx1_2IrLZ_uqixopbQPTearuJvqJ4jKI4,6075
|
|
5
5
|
sl_shared_assets/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
sl_shared_assets/data_classes/__init__.py,sha256=b0BwTAJCD1zbwjd2UdpXheq61q1sgBuYhtAL-GHA2h4,1835
|
|
7
7
|
sl_shared_assets/data_classes/__init__.pyi,sha256=e2082sm5pSw3bxNZGqwcRhuKLH8T7hcEo6kWtOZNDBU,1968
|
|
8
|
-
sl_shared_assets/data_classes/configuration_data.py,sha256=
|
|
9
|
-
sl_shared_assets/data_classes/configuration_data.pyi,sha256=
|
|
8
|
+
sl_shared_assets/data_classes/configuration_data.py,sha256=ZVk1ynk25CfVuQfMofoH90BUaOPqk7zW8ukY6ls_Pp0,30360
|
|
9
|
+
sl_shared_assets/data_classes/configuration_data.pyi,sha256=h7AV3z73SC2ITXWcnsShczuezC1Is7L4WSMnEWGSLPQ,9617
|
|
10
10
|
sl_shared_assets/data_classes/runtime_data.py,sha256=Q7Ykf9hgrw1jYKXa53mn_LW8G2cPmLLuxgGkP6qQcc4,15483
|
|
11
11
|
sl_shared_assets/data_classes/runtime_data.pyi,sha256=PxaCbeF9COR4ri91pdzh7zVrqaz2KEDYB1EoLhZQC_c,6618
|
|
12
|
-
sl_shared_assets/data_classes/session_data.py,sha256=
|
|
12
|
+
sl_shared_assets/data_classes/session_data.py,sha256=Rd3KFKWTHCUgMrMZ0HHfZq6Bc-9tZSzvIX6KFHrDJwk,38331
|
|
13
13
|
sl_shared_assets/data_classes/session_data.pyi,sha256=eLemAagVD6TQ-9pzMIc0eXDgnh-quJwEidKHYitvsjQ,13243
|
|
14
14
|
sl_shared_assets/data_classes/surgery_data.py,sha256=qsMj3NkjhylAT9b_wHBY-1XwTu2xsZcZatdECmkA7Bs,7437
|
|
15
15
|
sl_shared_assets/data_classes/surgery_data.pyi,sha256=rf59lJ3tGSYKHQlEGXg75MnjajBwl0DYhL4TClAO4SM,2605
|
|
@@ -17,20 +17,20 @@ sl_shared_assets/server/__init__.py,sha256=nyX6-9ACcrQeRQOCNvBVrWSTHGjRPANIG_u0a
|
|
|
17
17
|
sl_shared_assets/server/__init__.pyi,sha256=7o99f8uf6NuBjMZjNAM1FX69Qbu5uBluRSAyaUWbXOU,263
|
|
18
18
|
sl_shared_assets/server/job.py,sha256=GB31yYPEqXR6MgwNmnQrSQuHRJqUHFXcd6p7hb38q_c,7928
|
|
19
19
|
sl_shared_assets/server/job.pyi,sha256=cxgHMpuwHsJGf_ZcTSSa2tZNzeR_GxqlICOsYGV_oy0,5655
|
|
20
|
-
sl_shared_assets/server/server.py,sha256=
|
|
20
|
+
sl_shared_assets/server/server.py,sha256=SkFJA8eYlZrm2dag7sF_CyPiBphFgoq32zV10kqnedc,9414
|
|
21
21
|
sl_shared_assets/server/server.pyi,sha256=SoTRqSPJ1GQ5i5gV3N57rDT9xzeT47RjMRH1FYKsOkg,4143
|
|
22
22
|
sl_shared_assets/tools/__init__.py,sha256=N95ZPMz-_HdNPrbVieCFza-QSVS6BV2KRB4K1OLRttc,636
|
|
23
23
|
sl_shared_assets/tools/__init__.pyi,sha256=xeDF8itMc0JRgLrO_IN_9gW7cp_Ld-Gf-rjtrgWvQ2I,551
|
|
24
24
|
sl_shared_assets/tools/ascension_tools.py,sha256=kIqYGX9F8lRao_LaVOacIiT8J9SypTvarb9mgaI9ZPs,15387
|
|
25
25
|
sl_shared_assets/tools/ascension_tools.pyi,sha256=tQCDdWZ20ZjUjpMs8aGIN0yBg5ff3j6spi62b3Han4o,3755
|
|
26
|
-
sl_shared_assets/tools/packaging_tools.py,sha256=
|
|
26
|
+
sl_shared_assets/tools/packaging_tools.py,sha256=2yaIysL11g5m-j0i4I2MRVzHA6_37WdyLYqXMl2FPAc,7289
|
|
27
27
|
sl_shared_assets/tools/packaging_tools.pyi,sha256=vgGbAQCExwg-0A5F72MzEhzHxu97Nqg1yuz-5P89ycU,3118
|
|
28
|
-
sl_shared_assets/tools/project_management_tools.py,sha256=
|
|
28
|
+
sl_shared_assets/tools/project_management_tools.py,sha256=aMOCq3nCR2xOTDMQpXbXEh90IuKOvSbIfeKh2VaZIXw,11215
|
|
29
29
|
sl_shared_assets/tools/project_management_tools.pyi,sha256=HiU1qqumscmXtAXNX6eaSrkwanGHEvk-lromwZ2ijD8,3445
|
|
30
30
|
sl_shared_assets/tools/transfer_tools.py,sha256=J26kwOp_NpPSY0-xu5FTw9udte-rm_mW1FJyaTNoqQI,6606
|
|
31
31
|
sl_shared_assets/tools/transfer_tools.pyi,sha256=FoH7eYZe7guGHfPr0MK5ggO62uXKwD2aJ7h1Bu7PaEE,3294
|
|
32
|
-
sl_shared_assets-1.0.
|
|
33
|
-
sl_shared_assets-1.0.
|
|
34
|
-
sl_shared_assets-1.0.
|
|
35
|
-
sl_shared_assets-1.0.
|
|
36
|
-
sl_shared_assets-1.0.
|
|
32
|
+
sl_shared_assets-1.0.2.dist-info/METADATA,sha256=fMc6X-sMqNzyERNvE6DrkRKLgeubNLmk9KVh8KuFD8Y,48890
|
|
33
|
+
sl_shared_assets-1.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
34
|
+
sl_shared_assets-1.0.2.dist-info/entry_points.txt,sha256=76c00fRS4IuXBP2xOBdvycT15Zen-lHiDg2FaSt-HB4,547
|
|
35
|
+
sl_shared_assets-1.0.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
36
|
+
sl_shared_assets-1.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|