ezmsg-baseproc 1.0.2__tar.gz → 1.0.3__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.
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/PKG-INFO +3 -3
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/README.md +2 -2
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/src/ezmsg/baseproc/__version__.py +2 -2
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/src/ezmsg/baseproc/protocols.py +3 -1
- ezmsg_baseproc-1.0.2/examples/example.py +0 -44
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/.github/workflows/docs.yml +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/.github/workflows/python-publish.yml +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/.github/workflows/python-tests.yml +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/.gitignore +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/.pre-commit-config.yaml +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/LICENSE +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/Makefile +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/make.bat +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/_templates/autosummary/module.rst +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/api/index.rst +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/conf.py +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/ProcessorsBase.md +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/adaptive.rst +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/checkpoint.rst +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/composite.rst +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/content-processors.rst +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/processor.rst +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/standalone.rst +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/stateful.rst +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/unit.rst +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/index.rst +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/pyproject.toml +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/src/ezmsg/baseproc/__init__.py +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/src/ezmsg/baseproc/composite.py +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/src/ezmsg/baseproc/processor.py +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/src/ezmsg/baseproc/stateful.py +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/src/ezmsg/baseproc/units.py +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/src/ezmsg/baseproc/util/__init__.py +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/src/ezmsg/baseproc/util/asio.py +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/src/ezmsg/baseproc/util/message.py +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/src/ezmsg/baseproc/util/profile.py +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/src/ezmsg/baseproc/util/typeresolution.py +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/tests/test_baseproc.py +0 -0
- {ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/tests/test_profile.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ezmsg-baseproc
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: Base processor classes and protocols for ezmsg signal processing pipelines
|
|
5
5
|
Author-email: Griffin Milsap <griffin.milsap@gmail.com>, Preston Peranich <pperanich@gmail.com>, Chadwick Boulay <chadwick.boulay@gmail.com>, Kyle McGraw <kmcgraw@blackrockneuro.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -52,7 +52,7 @@ ezmsg.baseproc/
|
|
|
52
52
|
```python
|
|
53
53
|
from dataclasses import dataclass
|
|
54
54
|
from ezmsg.baseproc import BaseTransformer
|
|
55
|
-
from ezmsg.util.messages.axisarray import AxisArray
|
|
55
|
+
from ezmsg.util.messages.axisarray import AxisArray, replace
|
|
56
56
|
|
|
57
57
|
@dataclass
|
|
58
58
|
class MySettings:
|
|
@@ -60,7 +60,7 @@ class MySettings:
|
|
|
60
60
|
|
|
61
61
|
class MyTransformer(BaseTransformer[MySettings, AxisArray, AxisArray]):
|
|
62
62
|
def _process(self, message: AxisArray) -> AxisArray:
|
|
63
|
-
return
|
|
63
|
+
return replace(message, data=message.data * self.settings.scale)
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
### Creating a Stateful Transformer
|
|
@@ -40,7 +40,7 @@ ezmsg.baseproc/
|
|
|
40
40
|
```python
|
|
41
41
|
from dataclasses import dataclass
|
|
42
42
|
from ezmsg.baseproc import BaseTransformer
|
|
43
|
-
from ezmsg.util.messages.axisarray import AxisArray
|
|
43
|
+
from ezmsg.util.messages.axisarray import AxisArray, replace
|
|
44
44
|
|
|
45
45
|
@dataclass
|
|
46
46
|
class MySettings:
|
|
@@ -48,7 +48,7 @@ class MySettings:
|
|
|
48
48
|
|
|
49
49
|
class MyTransformer(BaseTransformer[MySettings, AxisArray, AxisArray]):
|
|
50
50
|
def _process(self, message: AxisArray) -> AxisArray:
|
|
51
|
-
return
|
|
51
|
+
return replace(message, data=message.data * self.settings.scale)
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
### Creating a Stateful Transformer
|
|
@@ -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 = '1.0.
|
|
32
|
-
__version_tuple__ = version_tuple = (1, 0,
|
|
31
|
+
__version__ = version = '1.0.3'
|
|
32
|
+
__version_tuple__ = version_tuple = (1, 0, 3)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -4,6 +4,8 @@ import functools
|
|
|
4
4
|
import typing
|
|
5
5
|
from dataclasses import dataclass
|
|
6
6
|
|
|
7
|
+
import ezmsg.core as ez
|
|
8
|
+
|
|
7
9
|
from .util.message import SampleMessage
|
|
8
10
|
|
|
9
11
|
# --- Processor state decorator ---
|
|
@@ -12,7 +14,7 @@ processor_state = functools.partial(dataclass, unsafe_hash=True, frozen=False, i
|
|
|
12
14
|
# --- Type variables for protocols and processors ---
|
|
13
15
|
MessageInType = typing.TypeVar("MessageInType")
|
|
14
16
|
MessageOutType = typing.TypeVar("MessageOutType")
|
|
15
|
-
SettingsType = typing.TypeVar("SettingsType")
|
|
17
|
+
SettingsType = typing.TypeVar("SettingsType", bound=ez.Settings)
|
|
16
18
|
StateType = typing.TypeVar("StateType")
|
|
17
19
|
|
|
18
20
|
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"""Example usage of ezmsg-baseproc package."""
|
|
2
|
-
|
|
3
|
-
import asyncio
|
|
4
|
-
|
|
5
|
-
import ezmsg.core as ez
|
|
6
|
-
|
|
7
|
-
# Import your units from the package
|
|
8
|
-
# from ezmsg.baseproc import MyUnit
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class ExampleSettings(ez.Settings):
|
|
12
|
-
"""Settings for ExampleUnit."""
|
|
13
|
-
|
|
14
|
-
message: str = "Hello from ezmsg-baseproc!"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class ExampleUnit(ez.Unit):
|
|
18
|
-
"""Example ezmsg Unit demonstrating basic patterns."""
|
|
19
|
-
|
|
20
|
-
SETTINGS = ExampleSettings
|
|
21
|
-
|
|
22
|
-
INPUT = ez.InputStream(str)
|
|
23
|
-
OUTPUT = ez.OutputStream(str)
|
|
24
|
-
|
|
25
|
-
@ez.subscriber(INPUT)
|
|
26
|
-
@ez.publisher(OUTPUT)
|
|
27
|
-
async def on_message(self, message: str) -> ez.AsyncGenerator:
|
|
28
|
-
"""Process incoming messages."""
|
|
29
|
-
result = f"{self.SETTINGS.message} Received: {message}"
|
|
30
|
-
yield self.OUTPUT, result
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
async def main():
|
|
34
|
-
"""Run the example."""
|
|
35
|
-
print("ezmsg-baseproc loaded successfully!")
|
|
36
|
-
print(f"Version: {__import__('ezmsg.baseproc').__version__}")
|
|
37
|
-
|
|
38
|
-
# Example: Create and run a simple system
|
|
39
|
-
# system = ExampleSystem()
|
|
40
|
-
# await ez.run(SYSTEM=system)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if __name__ == "__main__":
|
|
44
|
-
asyncio.run(main())
|
|
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
|
{ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/adaptive.rst
RENAMED
|
File without changes
|
{ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/checkpoint.rst
RENAMED
|
File without changes
|
{ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/composite.rst
RENAMED
|
File without changes
|
|
File without changes
|
{ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/processor.rst
RENAMED
|
File without changes
|
{ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/standalone.rst
RENAMED
|
File without changes
|
{ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/stateful.rst
RENAMED
|
File without changes
|
{ezmsg_baseproc-1.0.2 → ezmsg_baseproc-1.0.3}/docs/source/guides/how-tos/processors/unit.rst
RENAMED
|
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
|