ephys-link 2.1.0b0__tar.gz → 2.1.0b1__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.
Files changed (34) hide show
  1. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/PKG-INFO +1 -1
  2. ephys_link-2.1.0b1/src/ephys_link/__about__.py +1 -0
  3. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/bindings/ump_binding.py +13 -17
  4. ephys_link-2.1.0b0/src/ephys_link/__about__.py +0 -1
  5. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/.gitignore +0 -0
  6. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/LICENSE +0 -0
  7. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/README.md +0 -0
  8. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/ephys_link.spec +0 -0
  9. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/mkdocs.yml +0 -0
  10. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/pyproject.toml +0 -0
  11. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/scripts/__init__.py +0 -0
  12. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/scripts/gen_ref_pages.py +0 -0
  13. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/scripts/logger_test.py +0 -0
  14. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/scripts/move_tester.py +0 -0
  15. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/scripts/server_tester.py +0 -0
  16. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/__init__.py +0 -0
  17. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/__main__.py +0 -0
  18. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/back_end/__init__.py +0 -0
  19. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/back_end/platform_handler.py +0 -0
  20. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/back_end/server.py +0 -0
  21. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/bindings/__init__.py +0 -0
  22. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/bindings/fake_binding.py +0 -0
  23. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/bindings/mpm_binding.py +0 -0
  24. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/front_end/__init__.py +0 -0
  25. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/front_end/cli.py +0 -0
  26. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/front_end/gui.py +0 -0
  27. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/resources/libum.dll +0 -0
  28. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/utils/__init__.py +0 -0
  29. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/utils/base_binding.py +0 -0
  30. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/utils/console.py +0 -0
  31. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/utils/constants.py +0 -0
  32. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/utils/converters.py +0 -0
  33. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/src/ephys_link/utils/startup.py +0 -0
  34. {ephys_link-2.1.0b0 → ephys_link-2.1.0b1}/tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ephys-link
3
- Version: 2.1.0b0
3
+ Version: 2.1.0b1
4
4
  Summary: A Python Socket.IO server that allows any Socket.IO-compliant application to communicate with manipulators used in electrophysiology experiments.
5
5
  Project-URL: Documentation, https://virtualbrainlab.org/ephys_link/installation_and_use.html
6
6
  Project-URL: Issues, https://github.com/VirtualBrainLab/ephys-link/issues
@@ -0,0 +1 @@
1
+ __version__ = "2.1.0b1"
@@ -34,20 +34,9 @@ class UmpBinding(BaseBinding):
34
34
  UMP.set_library_path(RESOURCES_DIRECTORY)
35
35
  self._ump: UMP = UMP.get_ump() # pyright: ignore [reportUnknownMemberType]
36
36
 
37
- # Exit if no manipulators are connected.
38
- device_ids: list[str] = list(map(str, self._ump.list_devices()))
39
- if len(device_ids) == 0:
40
- msg = "No manipulators connected."
41
- raise RuntimeError(msg)
42
-
43
- # Currently only supports using uMp-4 XOR uMp-3. Exit if both are connected.
44
-
45
- # Use the first device as the reference for the number of axes.
46
- self.num_axes: int = self._get_device(device_ids[0]).n_axes()
47
-
48
- if any(self._get_device(device_id).n_axes() != self.num_axes for device_id in device_ids): # pyright: ignore [reportUnknownArgumentType, reportUnknownMemberType]
49
- msg = "uMp-4 and uMp-3 cannot be used at the same time."
50
- raise RuntimeError(msg)
37
+ # Compute axis count, assumed as the first device. 0 if no devices are connected.
38
+ device_ids = list(map(str, self._ump.list_devices()))
39
+ self.axis_count: int = 0 if len(device_ids) == 0 else self._get_device(device_ids[0]).n_axes()
51
40
 
52
41
  @staticmethod
53
42
  @override
@@ -61,11 +50,18 @@ class UmpBinding(BaseBinding):
61
50
 
62
51
  @override
63
52
  async def get_manipulators(self) -> list[str]:
64
- return list(map(str, self._ump.list_devices()))
53
+ device_ids = list(map(str, self._ump.list_devices()))
54
+
55
+ # Currently only supports using uMp-4 XOR uMp-3. Throw error if both are connected.
56
+ if any(self._get_device(device_id).n_axes() != self.axis_count for device_id in device_ids): # pyright: ignore [reportUnknownArgumentType]
57
+ msg = "uMp-4 and uMp-3 cannot be used at the same time."
58
+ raise RuntimeError(msg)
59
+
60
+ return device_ids
65
61
 
66
62
  @override
67
63
  async def get_axes_count(self) -> int:
68
- return self.num_axes
64
+ return self.axis_count
69
65
 
70
66
  @override
71
67
  def get_dimensions(self) -> Vector4:
@@ -236,4 +232,4 @@ class UmpBinding(BaseBinding):
236
232
  Returns:
237
233
  True if the device is uMp-3, False otherwise.
238
234
  """
239
- return self.num_axes == self.UMP_3_NUM_AXES
235
+ return self.axis_count == self.UMP_3_NUM_AXES
@@ -1 +0,0 @@
1
- __version__ = "2.1.0b0"
File without changes
File without changes
File without changes
File without changes