sl-shared-assets 1.0.0rc23__tar.gz → 1.0.0rc24__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.

Files changed (45) hide show
  1. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/PKG-INFO +1 -1
  2. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/pyproject.toml +1 -1
  3. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/data_classes/configuration_data.py +5 -0
  4. sl_shared_assets-1.0.0rc23/src/sl_shared_assets/data_classes/configuration_data.pyi +0 -198
  5. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/.gitignore +0 -0
  6. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/LICENSE +0 -0
  7. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/README.md +0 -0
  8. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/docs/Makefile +0 -0
  9. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/docs/make.bat +0 -0
  10. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/docs/source/api.rst +0 -0
  11. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/docs/source/conf.py +0 -0
  12. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/docs/source/index.rst +0 -0
  13. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/docs/source/welcome.rst +0 -0
  14. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/envs/slsa_dev_lin.yml +0 -0
  15. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/envs/slsa_dev_lin_spec.txt +0 -0
  16. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/__init__.py +0 -0
  17. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/__init__.pyi +0 -0
  18. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/cli.py +0 -0
  19. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/cli.pyi +0 -0
  20. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/data_classes/__init__.py +0 -0
  21. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/data_classes/__init__.pyi +0 -0
  22. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/data_classes/runtime_data.py +0 -0
  23. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/data_classes/runtime_data.pyi +0 -0
  24. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/data_classes/session_data.py +0 -0
  25. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/data_classes/session_data.pyi +0 -0
  26. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/data_classes/surgery_data.py +0 -0
  27. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/data_classes/surgery_data.pyi +0 -0
  28. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/py.typed +0 -0
  29. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/server/__init__.py +0 -0
  30. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/server/__init__.pyi +0 -0
  31. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/server/job.py +0 -0
  32. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/server/job.pyi +0 -0
  33. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/server/server.py +0 -0
  34. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/server/server.pyi +0 -0
  35. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/tools/__init__.py +0 -0
  36. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/tools/__init__.pyi +0 -0
  37. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/tools/ascension_tools.py +0 -0
  38. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/tools/ascension_tools.pyi +0 -0
  39. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/tools/packaging_tools.py +0 -0
  40. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/tools/packaging_tools.pyi +0 -0
  41. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/tools/project_management_tools.py +0 -0
  42. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/tools/project_management_tools.pyi +0 -0
  43. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/tools/transfer_tools.py +0 -0
  44. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/src/sl_shared_assets/tools/transfer_tools.pyi +0 -0
  45. {sl_shared_assets-1.0.0rc23 → sl_shared_assets-1.0.0rc24}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sl-shared-assets
3
- Version: 1.0.0rc23
3
+ Version: 1.0.0rc24
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.0rc23"
11
+ version = "1.0.0rc24"
12
12
  description = "Stores assets shared between multiple Sun (NeuroAI) lab data pipelines."
13
13
  readme = "README.md"
14
14
  license = { file = "LICENSE" }
@@ -114,6 +114,9 @@ class MesoscopePaths:
114
114
  server_processed_data_root: Path = Path("/workdir/sun_data")
115
115
  """The absolute path to the BioHPC server directory used to store the processed data from all Sun lab projects.
116
116
  This path is relative to the server root and is only used when submitting remote jobs to the server."""
117
+ server_raw_data_root: Path = Path("/storage/sun_data")
118
+ """The absolute path to the BioHPC server directory used to store the raw data from all Sun lab projects.
119
+ This path is relative to the server root and is only used when submitting remote jobs to the server."""
117
120
 
118
121
 
119
122
  @dataclass()
@@ -302,6 +305,7 @@ class MesoscopeSystemConfiguration(YamlConfig):
302
305
  self.paths.mesoscope_directory = Path(self.paths.mesoscope_directory)
303
306
  self.paths.harvesters_cti_path = Path(self.paths.harvesters_cti_path)
304
307
  self.paths.server_processed_data_root = Path(self.paths.server_processed_data_root)
308
+ self.paths.server_raw_data_root = Path(self.paths.server_raw_data_root)
305
309
 
306
310
  # Converts valve_calibration data from dictionary to a tuple of tuples format
307
311
  if not isinstance(self.microcontrollers.valve_calibration_data, tuple):
@@ -351,6 +355,7 @@ class MesoscopeSystemConfiguration(YamlConfig):
351
355
  original.paths.mesoscope_directory = str(original.paths.mesoscope_directory) # type: ignore
352
356
  original.paths.harvesters_cti_path = str(original.paths.harvesters_cti_path) # type: ignore
353
357
  original.paths.server_processed_data_root = str(original.paths.server_processed_data_root) # type: ignore
358
+ original.paths.server_raw_data_root = str(original.paths.server_raw_data_root) # type: ignore
354
359
 
355
360
  # Converts valve calibration data into dictionary format
356
361
  if isinstance(original.microcontrollers.valve_calibration_data, tuple):
@@ -1,198 +0,0 @@
1
- from pathlib import Path
2
- from dataclasses import field, dataclass
3
-
4
- from _typeshed import Incomplete
5
- from ataraxis_data_structures import YamlConfig
6
-
7
- @dataclass()
8
- class ExperimentState:
9
- """Encapsulates the information used to set and maintain the desired experiment and system state.
10
-
11
- Broadly, each experiment runtime can be conceptualized as a two state-system. The first state is that of the
12
- experimental task, which reflects the behavior goal, the rules for achieving the goal, and the reward for
13
- achieving the goal. The second state is that of the data acquisition and experiment control system, which is a
14
- snapshot of all hardware module states that make up the system that acquires the data and controls the task
15
- environment. Overall, experiment state is about 'what the animal is doing', while the system state is about
16
- 'what the hardware is doing'.
17
-
18
- Note:
19
- This class is acquisition-system-agnostic. It can be used to define the ExperimentConfiguration class for any
20
- valid data acquisition system.
21
- """
22
-
23
- experiment_state_code: int
24
- system_state_code: int
25
- state_duration_s: float
26
-
27
- @dataclass()
28
- class MesoscopeExperimentConfiguration(YamlConfig):
29
- """Stores the configuration of a single experiment runtime that uses the Mesoscope_VR data acquisition system.
30
-
31
- Primarily, this includes the sequence of experiment and system states that defines the flow of the experiment
32
- runtime. During runtime, the main runtime control function traverses the sequence of states stored in this class
33
- instance start-to-end in the exact order specified by the user. Together with custom Unity projects that define
34
- the task logic (how the system responds to animal interactions with the VR system) this class allows flexibly
35
- implementing a wide range of experiments using the Mesoscope-VR system.
36
-
37
- Each project should define one or more experiment configurations and save them as .yaml files inside the project
38
- 'configuration' folder. The name for each configuration file is defined by the user and is used to identify and load
39
- the experiment configuration when 'sl-experiment' CLI command exposed by the sl-experiment library is executed.
40
-
41
- Notes:
42
- This class is designed exclusively for the Mesoscope-VR system. Any other system needs to define a separate
43
- ExperimentConfiguration class to specify its experiment runtimes and additional data.
44
- """
45
-
46
- cue_map: dict[int, float] = field(default_factory=Incomplete)
47
- experiment_states: dict[str, ExperimentState] = field(default_factory=Incomplete)
48
-
49
- @dataclass()
50
- class MesoscopePaths:
51
- """Stores the filesystem configuration parameters for the Mesoscope-VR data acquisition system."""
52
-
53
- server_credentials_path: Path = ...
54
- google_credentials_path: Path = ...
55
- root_directory: Path = ...
56
- server_storage_directory: Path = ...
57
- server_working_directory: Path = ...
58
- nas_directory: Path = ...
59
- mesoscope_directory: Path = ...
60
- harvesters_cti_path: Path = ...
61
- server_processed_data_root: Path = ...
62
-
63
- @dataclass()
64
- class MesoscopeCameras:
65
- """Stores the configuration parameters for the cameras used by the Mesoscope-VR system to record behavior videos."""
66
-
67
- face_camera_index: int = ...
68
- left_camera_index: int = ...
69
- right_camera_index: int = ...
70
- face_camera_quantization_parameter: int = ...
71
- body_camera_quantization_parameter: int = ...
72
- display_face_camera_frames: bool = ...
73
- display_body_camera_frames: bool = ...
74
-
75
- @dataclass()
76
- class MesoscopeMicroControllers:
77
- """Stores the configuration parameters for the microcontrollers used by the Mesoscope-VR system."""
78
-
79
- actor_port: str = ...
80
- sensor_port: str = ...
81
- encoder_port: str = ...
82
- debug: bool = ...
83
- mesoscope_ttl_pulse_duration_ms: int = ...
84
- minimum_break_strength_g_cm: float = ...
85
- maximum_break_strength_g_cm: float = ...
86
- wheel_diameter_cm: float = ...
87
- lick_threshold_adc: int = ...
88
- lick_signal_threshold_adc: int = ...
89
- lick_delta_threshold_adc: int = ...
90
- lick_averaging_pool_size: int = ...
91
- torque_baseline_voltage_adc: int = ...
92
- torque_maximum_voltage_adc: int = ...
93
- torque_sensor_capacity_g_cm: float = ...
94
- torque_report_cw: bool = ...
95
- torque_report_ccw: bool = ...
96
- torque_signal_threshold_adc: int = ...
97
- torque_delta_threshold_adc: int = ...
98
- torque_averaging_pool_size: int = ...
99
- wheel_encoder_ppr = ...
100
- wheel_encoder_report_cw: bool = ...
101
- wheel_encoder_report_ccw: bool = ...
102
- wheel_encoder_delta_threshold_pulse: int = ...
103
- wheel_encoder_polling_delay_us = ...
104
- cm_per_unity_unit = ...
105
- screen_trigger_pulse_duration_ms: int = ...
106
- auditory_tone_duration_ms: int = ...
107
- valve_calibration_pulse_count: int = ...
108
- sensor_polling_delay_ms: int = ...
109
- valve_calibration_data: dict[int | float, int | float] | tuple[tuple[int | float, int | float], ...] = ...
110
-
111
- @dataclass()
112
- class MesoscopeAdditionalFirmware:
113
- """Stores the configuration parameters for all firmware and hardware components not assembled in the Sun lab."""
114
-
115
- headbar_port: str = ...
116
- lickport_port: str = ...
117
- wheel_port: str = ...
118
- unity_ip: str = ...
119
- unity_port: int = ...
120
-
121
- @dataclass()
122
- class MesoscopeSystemConfiguration(YamlConfig):
123
- """Stores the hardware and filesystem configuration parameters for the Mesoscope-VR data acquisition system used in
124
- the Sun lab.
125
-
126
- This class is specifically designed to encapsulate the configuration parameters for the Mesoscope-VR system. It
127
- expects the system to be configured according to the specifications available from the sl_experiment repository
128
- (https://github.com/Sun-Lab-NBB/sl-experiment) and should be used exclusively by the VRPC machine
129
- (main Mesoscope-VR PC).
130
-
131
- Notes:
132
- Each SystemConfiguration class is uniquely tied to a specific hardware configuration used in the lab. This
133
- class will only work with the Mesoscope-VR system. Any other data acquisition and runtime management system in
134
- the lab should define its own SystemConfiguration class to specify its own hardware and filesystem configuration
135
- parameters.
136
- """
137
-
138
- name: str = ...
139
- paths: MesoscopePaths = field(default_factory=MesoscopePaths)
140
- cameras: MesoscopeCameras = field(default_factory=MesoscopeCameras)
141
- microcontrollers: MesoscopeMicroControllers = field(default_factory=MesoscopeMicroControllers)
142
- additional_firmware: MesoscopeAdditionalFirmware = field(default_factory=MesoscopeAdditionalFirmware)
143
- def __post_init__(self) -> None:
144
- """Ensures that variables converted to different types for storage purposes are always set to expected types
145
- upon class instantiation."""
146
- def save(self, path: Path) -> None:
147
- """Saves class instance data to disk as a 'mesoscope_system_configuration.yaml' file.
148
-
149
- This method converts certain class variables to yaml-safe types (for example, Path objects -> strings) and
150
- saves class data to disk as a .yaml file. The method is intended to be used solely by the
151
- set_system_configuration_file() function and should not be called from any other context.
152
-
153
- Args:
154
- path: The path to the .yaml file to save the data to.
155
- """
156
-
157
- _supported_configuration_files: Incomplete
158
-
159
- def set_system_configuration_file(path: Path) -> None:
160
- """Sets the system configuration .yaml file specified by the input path as the default system configuration file for
161
- the managed machine (PC).
162
-
163
- This function is used to initially configure or override the existing configuration of any data acquisition system
164
- used in the lab. The path to the configuration file is stored inside the user's data directory, so that all
165
- Sun lab libraries can automatically access that information during every runtime. Since the storage directory is
166
- typically hidden and varies between OSes and machines, this function provides a convenient way for setting that
167
- path without manually editing the storage cache.
168
-
169
- Notes:
170
- If the input path does not point to an existing file, but the file name and extension are correct, the function
171
- will automatically generate a default SystemConfiguration class instance and save it under the specified path.
172
-
173
- A data acquisition system can include multiple machines (PCs). However, the configuration file is typically
174
- only present on the 'main' machine that manages all runtimes.
175
-
176
- Args:
177
- path: The path to the new system configuration file to be used by the local data acquisition system (PC).
178
-
179
- Raises:
180
- ValueError: If the input path is not a valid system configuration file or does not use a supported data
181
- acquisition system name.
182
- """
183
-
184
- def get_system_configuration_data() -> MesoscopeSystemConfiguration:
185
- """Resolves the path to the local system configuration file and loads the system configuration data.
186
-
187
- This service function is used by all Sun lab data acquisition runtimes to load the system configuration data from
188
- the shared configuration file. It supports resolving and returning the data for all data acquisition systems used
189
- in the lab.
190
-
191
- Returns:
192
- The initialized SystemConfiguration class instance for the local acquisition system that stores the loaded
193
- configuration parameters.
194
-
195
- Raises:
196
- FileNotFoundError: If the local machine does not have the Sun lab data directory, or the system configuration
197
- file does not exist.
198
- """