ezmsg-peripheraldevice 0.1.0__tar.gz → 0.2.0__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 (22) hide show
  1. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/PKG-INFO +1 -1
  2. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/examples/mouse_poll.py +1 -2
  3. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/src/ezmsg/peripheraldevice/__version__.py +2 -2
  4. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/src/ezmsg/peripheraldevice/mouse.py +4 -4
  5. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/tests/test_mouse.py +3 -3
  6. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/.github/workflows/docs.yml +0 -0
  7. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/.github/workflows/python-publish.yml +0 -0
  8. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/.github/workflows/python-tests.yml +0 -0
  9. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/.gitignore +0 -0
  10. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/.pre-commit-config.yaml +0 -0
  11. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/LICENSE +0 -0
  12. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/README.md +0 -0
  13. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/docs/Makefile +0 -0
  14. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/docs/make.bat +0 -0
  15. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/docs/source/_templates/autosummary/module.rst +0 -0
  16. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/docs/source/api/index.rst +0 -0
  17. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/docs/source/conf.py +0 -0
  18. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/docs/source/index.md +0 -0
  19. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/examples/mouse_listen.py +0 -0
  20. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/pyproject.toml +0 -0
  21. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/src/ezmsg/peripheraldevice/__init__.py +0 -0
  22. {ezmsg_peripheraldevice-0.1.0 → ezmsg_peripheraldevice-0.2.0}/tests/test_example.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ezmsg-peripheraldevice
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Modules to stream data from peripheral devices into ezmsg
5
5
  Author-email: Chadwick Boulay <chadwick.boulay@gmail.com>
6
6
  License-Expression: MIT
@@ -15,7 +15,7 @@ import ezmsg.core as ez
15
15
  from ezmsg.baseproc import Clock, ClockSettings
16
16
  from ezmsg.util.debuglog import DebugLog
17
17
 
18
- from ezmsg.peripheraldevice import MousePoller, MousePollerSettings
18
+ from ezmsg.peripheraldevice import MousePoller
19
19
 
20
20
 
21
21
  class MousePollSettings(ez.Settings):
@@ -40,7 +40,6 @@ class MousePollSystem(ez.Collection):
40
40
 
41
41
  def configure(self) -> None:
42
42
  self.CLOCK.apply_settings(ClockSettings(dispatch_rate=self.SETTINGS.poll_rate))
43
- self.MOUSE.apply_settings(MousePollerSettings())
44
43
 
45
44
  def network(self) -> ez.NetworkDefinition:
46
45
  return (
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.1.0'
32
- __version_tuple__ = version_tuple = (0, 1, 0)
31
+ __version__ = version = '0.2.0'
32
+ __version_tuple__ = version_tuple = (0, 2, 0)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -61,10 +61,10 @@ class MousePollerTransformer(
61
61
  data=np.zeros((1, 2), dtype=np.float64),
62
62
  dims=["time", "ch"],
63
63
  axes={
64
- "time": AxisArray.CoordinateAxis(
65
- data=np.array([message.offset]),
66
- dims=["time"],
64
+ "time": AxisArray.LinearAxis(
67
65
  unit="s",
66
+ gain=message.gain,
67
+ offset=message.offset,
68
68
  ),
69
69
  "ch": AxisArray.CoordinateAxis(
70
70
  data=np.array(["x", "y"]),
@@ -82,7 +82,7 @@ class MousePollerTransformer(
82
82
  data = np.array([[pos[0], pos[1]]], dtype=np.float64)
83
83
  time_axis = replace(
84
84
  self._state.template.axes["time"],
85
- data=np.array([message.offset]),
85
+ offset=message.offset,
86
86
  )
87
87
 
88
88
  return replace(
@@ -83,8 +83,8 @@ class TestMousePollerTransformer:
83
83
 
84
84
  # Check that time axis offset matches input
85
85
  time_axis = result.axes["time"]
86
- assert isinstance(time_axis, AxisArray.CoordinateAxis)
87
- assert time_axis.data[0] == 1.5
86
+ assert isinstance(time_axis, AxisArray.LinearAxis)
87
+ assert time_axis.offset == 1.5
88
88
 
89
89
  @patch("ezmsg.peripheraldevice.mouse.Controller")
90
90
  def test_multiple_calls(self, mock_controller_class):
@@ -105,7 +105,7 @@ class TestMousePollerTransformer:
105
105
  assert result.data.shape == (1, 2)
106
106
  assert np.all(np.isfinite(result.data))
107
107
  # Time axis should have offset matching clock tick
108
- assert result.axes["time"].data[0] == i * 0.1
108
+ assert result.axes["time"].offset == i * 0.1
109
109
  # Data should match mock position
110
110
  np.testing.assert_array_equal(result.data[0], [i * 10, i * 20])
111
111