ezmsg 3.6.2__tar.gz → 3.7.2__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-3.6.2 → ezmsg-3.7.2}/.git-blame-ignore-revs +2 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/.github/workflows/ci.yml +12 -11
- ezmsg-3.7.2/.github/workflows/docs.yml +66 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/.github/workflows/publish.yml +1 -1
- {ezmsg-3.6.2 → ezmsg-3.7.2}/.gitignore +4 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/PKG-INFO +18 -15
- {ezmsg-3.6.2 → ezmsg-3.7.2}/README.md +13 -0
- ezmsg-3.7.2/docs/source/_static/_images/cloning.png +0 -0
- ezmsg-3.7.2/docs/source/_static/_images/tutorial_graph.png +0 -0
- ezmsg-3.7.2/docs/source/_static/_images/tutorial_graph_compact.png +0 -0
- ezmsg-3.7.2/docs/source/_static/_images/tutorial_graphviz.png +0 -0
- ezmsg-3.7.2/docs/source/_static/_images/tutorial_pipeline.png +0 -0
- ezmsg-3.7.2/docs/source/_static/_images/tutorial_system.png +0 -0
- ezmsg-3.7.2/docs/source/_static/custom.css +77 -0
- ezmsg-3.7.2/docs/source/conf.py +108 -0
- ezmsg-3.7.2/docs/source/index.rst +21 -0
- ezmsg-3.7.2/docs/source/reference/API/axisarray-util-units.rst +42 -0
- ezmsg-3.7.2/docs/source/reference/API/axisarray.rst +7 -0
- ezmsg-3.7.2/docs/source/reference/API/components.rst +68 -0
- ezmsg-3.7.2/docs/source/reference/API/content-api.rst +13 -0
- ezmsg-3.7.2/docs/source/reference/API/entrypoint.rst +9 -0
- ezmsg-3.7.2/docs/source/reference/API/functiondecorators.rst +18 -0
- ezmsg-3.7.2/docs/source/reference/API/util-units.rst +71 -0
- ezmsg-3.7.2/docs/source/reference/content-reference.rst +7 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/examples/ezmsg_attach.py +1 -1
- {ezmsg-3.6.2 → ezmsg-3.7.2}/examples/ezmsg_configs.py +3 -4
- {ezmsg-3.6.2 → ezmsg-3.7.2}/examples/ezmsg_count.py +1 -2
- {ezmsg-3.6.2 → ezmsg-3.7.2}/examples/ezmsg_generator.py +55 -2
- {ezmsg-3.6.2 → ezmsg-3.7.2}/examples/ezmsg_intro.py +2 -2
- ezmsg-3.7.2/examples/ezmsg_leaky_subscriber.py +168 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/examples/ezmsg_normalterm.py +1 -1
- {ezmsg-3.6.2 → ezmsg-3.7.2}/examples/ezmsg_stop.py +1 -1
- {ezmsg-3.6.2 → ezmsg-3.7.2}/examples/ezmsg_toy.py +6 -6
- ezmsg-3.7.2/examples/lowlevel_api.py +119 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/pyproject.toml +40 -14
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/core/__init__.py +7 -1
- ezmsg-3.7.2/src/ezmsg/core/addressable.py +75 -0
- ezmsg-3.7.2/src/ezmsg/core/backend.py +576 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/core/backendprocess.py +144 -46
- ezmsg-3.7.2/src/ezmsg/core/backpressure.py +186 -0
- ezmsg-3.7.2/src/ezmsg/core/channelmanager.py +132 -0
- ezmsg-3.7.2/src/ezmsg/core/collection.py +91 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/core/command.py +75 -28
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/core/component.py +61 -17
- ezmsg-3.7.2/src/ezmsg/core/dag.py +173 -0
- ezmsg-3.7.2/src/ezmsg/core/graph_util.py +272 -0
- ezmsg-3.7.2/src/ezmsg/core/graphcontext.py +173 -0
- ezmsg-3.7.2/src/ezmsg/core/graphserver.py +614 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/core/message.py +21 -16
- ezmsg-3.7.2/src/ezmsg/core/messagecache.py +138 -0
- ezmsg-3.7.2/src/ezmsg/core/messagechannel.py +442 -0
- ezmsg-3.7.2/src/ezmsg/core/messagemarshal.py +227 -0
- ezmsg-3.7.2/src/ezmsg/core/netprotocol.py +355 -0
- ezmsg-3.7.2/src/ezmsg/core/pubclient.py +511 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/core/settings.py +24 -4
- ezmsg-3.7.2/src/ezmsg/core/shm.py +262 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/core/state.py +25 -10
- ezmsg-3.7.2/src/ezmsg/core/stream.py +155 -0
- ezmsg-3.7.2/src/ezmsg/core/subclient.py +294 -0
- ezmsg-3.7.2/src/ezmsg/core/test.py +58 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/core/unit.py +107 -28
- ezmsg-3.7.2/src/ezmsg/core/util.py +58 -0
- ezmsg-3.7.2/src/ezmsg/util/__init__.py +18 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/util/debuglog.py +3 -2
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/util/gen_to_unit.py +10 -19
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/util/generator.py +14 -2
- ezmsg-3.7.2/src/ezmsg/util/messagecodec.py +209 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/util/messagegate.py +16 -4
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/util/messagelogger.py +35 -12
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/util/messagequeue.py +4 -3
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/util/messagereplay.py +8 -7
- ezmsg-3.7.2/src/ezmsg/util/messages/__init__.py +14 -0
- ezmsg-3.7.2/src/ezmsg/util/messages/axisarray.py +907 -0
- ezmsg-3.7.2/src/ezmsg/util/messages/chunker.py +155 -0
- ezmsg-3.7.2/src/ezmsg/util/messages/key.py +145 -0
- ezmsg-3.7.2/src/ezmsg/util/messages/modify.py +122 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/util/messages/util.py +7 -0
- ezmsg-3.7.2/src/ezmsg/util/perf/analysis.py +499 -0
- ezmsg-3.7.2/src/ezmsg/util/perf/command.py +19 -0
- ezmsg-3.7.2/src/ezmsg/util/perf/envinfo.py +106 -0
- ezmsg-3.7.2/src/ezmsg/util/perf/impl.py +379 -0
- ezmsg-3.7.2/src/ezmsg/util/perf/run.py +345 -0
- ezmsg-3.7.2/src/ezmsg/util/perf/util.py +278 -0
- ezmsg-3.7.2/src/ezmsg/util/profiler.py +183 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/util/rate.py +29 -9
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/util/terminate.py +7 -4
- {ezmsg-3.6.2 → ezmsg-3.7.2}/tests/ez_test_utils.py +20 -10
- {ezmsg-3.6.2 → ezmsg-3.7.2}/tests/messages/test_axisarray.py +167 -19
- ezmsg-3.7.2/tests/messages/test_key.py +142 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/tests/messages/test_modify.py +1 -2
- {ezmsg-3.6.2 → ezmsg-3.7.2}/tests/test_attach.py +5 -6
- ezmsg-3.7.2/tests/test_channel.py +93 -0
- ezmsg-3.7.2/tests/test_channelmanager.py +105 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/tests/test_connections.py +1 -1
- {ezmsg-3.6.2 → ezmsg-3.7.2}/tests/test_generator.py +53 -49
- {ezmsg-3.6.2 → ezmsg-3.7.2}/tests/test_graph.py +40 -2
- ezmsg-3.7.2/tests/test_graph_visualization.py +397 -0
- ezmsg-3.7.2/tests/test_leaky_subscriber.py +397 -0
- ezmsg-3.7.2/tests/test_perf_configs.py +99 -0
- ezmsg-3.7.2/tests/test_profiler.py +215 -0
- ezmsg-3.7.2/tests/test_run.py +131 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/tests/test_shm.py +16 -17
- {ezmsg-3.6.2 → ezmsg-3.7.2}/tests/test_state.py +10 -12
- ezmsg-3.6.2/.python-version +0 -1
- ezmsg-3.6.2/.readthedocs.yaml +0 -13
- ezmsg-3.6.2/docs/requirements.txt +0 -2
- ezmsg-3.6.2/docs/source/about.rst +0 -4
- ezmsg-3.6.2/docs/source/api.rst +0 -84
- ezmsg-3.6.2/docs/source/conf.py +0 -59
- ezmsg-3.6.2/docs/source/developer.rst +0 -12
- ezmsg-3.6.2/docs/source/extensions/sigproc.rst +0 -148
- ezmsg-3.6.2/docs/source/extensions.rst +0 -7
- ezmsg-3.6.2/docs/source/getting-started.rst +0 -53
- ezmsg-3.6.2/docs/source/index.rst +0 -31
- ezmsg-3.6.2/docs/source/other.rst +0 -23
- ezmsg-3.6.2/docs/source/utils.rst +0 -58
- ezmsg-3.6.2/src/ezmsg/core/addressable.py +0 -40
- ezmsg-3.6.2/src/ezmsg/core/backend.py +0 -334
- ezmsg-3.6.2/src/ezmsg/core/backpressure.py +0 -80
- ezmsg-3.6.2/src/ezmsg/core/collection.py +0 -71
- ezmsg-3.6.2/src/ezmsg/core/dag.py +0 -91
- ezmsg-3.6.2/src/ezmsg/core/graphcontext.py +0 -120
- ezmsg-3.6.2/src/ezmsg/core/graphserver.py +0 -444
- ezmsg-3.6.2/src/ezmsg/core/messagecache.py +0 -77
- ezmsg-3.6.2/src/ezmsg/core/messagemarshal.py +0 -129
- ezmsg-3.6.2/src/ezmsg/core/netprotocol.py +0 -199
- ezmsg-3.6.2/src/ezmsg/core/pubclient.py +0 -312
- ezmsg-3.6.2/src/ezmsg/core/server.py +0 -156
- ezmsg-3.6.2/src/ezmsg/core/shmserver.py +0 -273
- ezmsg-3.6.2/src/ezmsg/core/stream.py +0 -59
- ezmsg-3.6.2/src/ezmsg/core/subclient.py +0 -229
- ezmsg-3.6.2/src/ezmsg/core/util.py +0 -42
- ezmsg-3.6.2/src/ezmsg/util/messagecodec.py +0 -132
- ezmsg-3.6.2/src/ezmsg/util/messages/axisarray.py +0 -489
- ezmsg-3.6.2/src/ezmsg/util/messages/chunker.py +0 -101
- ezmsg-3.6.2/src/ezmsg/util/messages/key.py +0 -88
- ezmsg-3.6.2/src/ezmsg/util/messages/modify.py +0 -93
- ezmsg-3.6.2/src/ezmsg/util/perf_test.py +0 -220
- ezmsg-3.6.2/tests/messages/__init__.py +0 -0
- ezmsg-3.6.2/tests/messages/test_key.py +0 -144
- ezmsg-3.6.2/tests/test_run.py +0 -131
- ezmsg-3.6.2/uv.lock +0 -831
- {ezmsg-3.6.2 → ezmsg-3.7.2}/.flake8 +0 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/.pre-commit-config.yaml +0 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/LICENSE +0 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/docs/Makefile +0 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/docs/make.bat +0 -0
- /ezmsg-3.6.2/docs/source/logo.png → /ezmsg-3.7.2/docs/source/_static/_images/ezmsg_logo.png +0 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/examples/.gitignore +0 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/examples/ezmsg_log_to_file.py +0 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/src/ezmsg/core/__main__.py +0 -0
- {ezmsg-3.6.2/src/ezmsg/util → ezmsg-3.7.2/src/ezmsg/util/perf}/__init__.py +0 -0
- {ezmsg-3.6.2/src/ezmsg/util/messages → ezmsg-3.7.2/tests}/__init__.py +0 -0
- {ezmsg-3.6.2/tests → ezmsg-3.7.2/tests/messages}/__init__.py +0 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/tests/messages/test_chunker.py +0 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/tests/test_addressable.py +0 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/tests/test_dag.py +0 -0
- {ezmsg-3.6.2 → ezmsg-3.7.2}/tests/test_test.py +0 -0
|
@@ -2,16 +2,20 @@ name: Test package
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
branches:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- dev
|
|
6
8
|
pull_request:
|
|
7
|
-
branches:
|
|
9
|
+
branches:
|
|
10
|
+
- main
|
|
11
|
+
- dev
|
|
8
12
|
workflow_dispatch:
|
|
9
13
|
|
|
10
14
|
jobs:
|
|
11
|
-
|
|
15
|
+
pytest:
|
|
12
16
|
strategy:
|
|
13
17
|
matrix:
|
|
14
|
-
python-version: ["3.
|
|
18
|
+
python-version: ["3.10.15", "3.11"] # Omit until shutdown fixed: , "3.12", "3.13"]
|
|
15
19
|
os:
|
|
16
20
|
- "ubuntu-latest"
|
|
17
21
|
- "windows-latest"
|
|
@@ -22,16 +26,13 @@ jobs:
|
|
|
22
26
|
- uses: actions/checkout@v4
|
|
23
27
|
|
|
24
28
|
- name: Install uv
|
|
25
|
-
uses: astral-sh/setup-uv@
|
|
29
|
+
uses: astral-sh/setup-uv@v6
|
|
26
30
|
with:
|
|
27
31
|
enable-cache: true
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
31
|
-
run: uv python install ${{ matrix.python-version }}
|
|
32
|
+
python-version: ${{ matrix.python-version }}
|
|
32
33
|
|
|
33
34
|
- name: Install the project
|
|
34
|
-
run: uv sync
|
|
35
|
+
run: uv sync
|
|
35
36
|
|
|
36
37
|
- name: Run tests
|
|
37
|
-
run: uv run pytest tests
|
|
38
|
+
run: uv run pytest tests --benchmark-disable
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- 'v*'
|
|
9
|
+
pull_request:
|
|
10
|
+
branches:
|
|
11
|
+
- dev
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
pages: write
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
# Allow only one concurrent deployment
|
|
20
|
+
concurrency:
|
|
21
|
+
group: "pages"
|
|
22
|
+
cancel-in-progress: false
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
build:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
|
|
30
|
+
- name: Install system dependencies
|
|
31
|
+
run: sudo apt-get update && sudo apt-get install -y graphviz
|
|
32
|
+
|
|
33
|
+
- name: Install uv
|
|
34
|
+
uses: astral-sh/setup-uv@v6
|
|
35
|
+
with:
|
|
36
|
+
enable-cache: true
|
|
37
|
+
python-version: "3.12"
|
|
38
|
+
|
|
39
|
+
- name: Install the project
|
|
40
|
+
run: uv sync --only-group docs
|
|
41
|
+
|
|
42
|
+
- name: Build documentation
|
|
43
|
+
run: |
|
|
44
|
+
cd docs
|
|
45
|
+
uv run make html
|
|
46
|
+
|
|
47
|
+
- name: Add .nojekyll file
|
|
48
|
+
run: touch docs/build/html/.nojekyll
|
|
49
|
+
|
|
50
|
+
- name: Upload artifact
|
|
51
|
+
uses: actions/upload-pages-artifact@v3
|
|
52
|
+
with:
|
|
53
|
+
path: 'docs/build/html'
|
|
54
|
+
|
|
55
|
+
deploy:
|
|
56
|
+
# Only deploy on push to main or release tags
|
|
57
|
+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
|
|
58
|
+
environment:
|
|
59
|
+
name: github-pages
|
|
60
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
needs: build
|
|
63
|
+
steps:
|
|
64
|
+
- name: Deploy to GitHub Pages
|
|
65
|
+
id: deployment
|
|
66
|
+
uses: actions/deploy-pages@v4
|
|
@@ -70,6 +70,7 @@ instance/
|
|
|
70
70
|
|
|
71
71
|
# Sphinx documentation
|
|
72
72
|
docs/_build/
|
|
73
|
+
docs/build/
|
|
73
74
|
docs/source/_build
|
|
74
75
|
docs/source/generated
|
|
75
76
|
|
|
@@ -114,6 +115,7 @@ venv/
|
|
|
114
115
|
ENV/
|
|
115
116
|
env.bak/
|
|
116
117
|
venv.bak/
|
|
118
|
+
uv.lock
|
|
117
119
|
|
|
118
120
|
# Spyder project settings
|
|
119
121
|
.spyderproject
|
|
@@ -141,3 +143,5 @@ cython_debug/
|
|
|
141
143
|
|
|
142
144
|
# JetBrains
|
|
143
145
|
.idea/
|
|
146
|
+
|
|
147
|
+
*.local.json
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ezmsg
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.7.2
|
|
4
4
|
Summary: A simple DAG-based computation model
|
|
5
5
|
Author-email: Griffin Milsap <griffin.milsap@gmail.com>, Preston Peranich <pperanich@gmail.com>, Chadwick Boulay <chadwick.boulay@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -15,21 +15,11 @@ License: MIT License
|
|
|
15
15
|
License-File: LICENSE
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Requires-Python: >=3.
|
|
19
|
-
Requires-Dist:
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Requires-Dist: array-api-compat>=1.12.0
|
|
20
|
+
Requires-Dist: typing-extensions>=4.14.1
|
|
20
21
|
Provides-Extra: axisarray
|
|
21
|
-
Requires-Dist: numpy>=
|
|
22
|
-
Provides-Extra: docs
|
|
23
|
-
Requires-Dist: ezmsg-sigproc>=1.2.3; extra == 'docs'
|
|
24
|
-
Requires-Dist: sphinx-rtd-theme==2.0.0; extra == 'docs'
|
|
25
|
-
Requires-Dist: sphinx<=7.2; extra == 'docs'
|
|
26
|
-
Provides-Extra: test
|
|
27
|
-
Requires-Dist: flake8>=5.0.4; extra == 'test'
|
|
28
|
-
Requires-Dist: numpy>=1.24.4; extra == 'test'
|
|
29
|
-
Requires-Dist: pytest-asyncio>=0.23.8; extra == 'test'
|
|
30
|
-
Requires-Dist: pytest-cov>=5.0.0; extra == 'test'
|
|
31
|
-
Requires-Dist: pytest>=7.0.0; extra == 'test'
|
|
32
|
-
Requires-Dist: xarray>=2023.1.0; (python_version < '3.13') and extra == 'test'
|
|
22
|
+
Requires-Dist: numpy>=2.2.6; extra == 'axisarray'
|
|
33
23
|
Description-Content-Type: text/markdown
|
|
34
24
|
|
|
35
25
|
# <img src="https://raw.githubusercontent.com/iscoe/ezmsg/main/docs/source/logo.png" width="50"/> ezmsg
|
|
@@ -71,6 +61,19 @@ Note that it is generally recommended to install poetry into its own standalone
|
|
|
71
61
|
|
|
72
62
|
## Documentation
|
|
73
63
|
|
|
64
|
+
To build the documentation in this branch, install sphinx
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install sphinx
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Then change directory to the `docs/` folder and run the `make.bat` file with an html specification.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cd docs
|
|
74
|
+
uv run make.bat html
|
|
75
|
+
```
|
|
76
|
+
|
|
74
77
|
https://ezmsg.readthedocs.io/en/latest/
|
|
75
78
|
|
|
76
79
|
`ezmsg` is very similar to [`labgraph`](https://www.github.com/facebookresearch/labgraph), so you might get a primer with their documentation and examples. Additionally, there are many examples provided in the examples/tests directories strewn throughout this repository.
|
|
@@ -37,6 +37,19 @@ Note that it is generally recommended to install poetry into its own standalone
|
|
|
37
37
|
|
|
38
38
|
## Documentation
|
|
39
39
|
|
|
40
|
+
To build the documentation in this branch, install sphinx
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pip install sphinx
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then change directory to the `docs/` folder and run the `make.bat` file with an html specification.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cd docs
|
|
50
|
+
uv run make.bat html
|
|
51
|
+
```
|
|
52
|
+
|
|
40
53
|
https://ezmsg.readthedocs.io/en/latest/
|
|
41
54
|
|
|
42
55
|
`ezmsg` is very similar to [`labgraph`](https://www.github.com/facebookresearch/labgraph), so you might get a primer with their documentation and examples. Additionally, there are many examples provided in the examples/tests directories strewn throughout this repository.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/* -- theme ------------------------------------------------------------------------------ */
|
|
2
|
+
/* -- some theme elements are taken from the Jupyter theme, see -------------------------- */
|
|
3
|
+
/* -- https://github.com/jupyter/jupyter/blob/master/docs/source/_static/custom.css ------ */
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
/* colors from from https://github.com/jupyter/jupyter.github.io/blob/master/_sass/settings/_colors.scss */
|
|
7
|
+
--color-dark-orange: 197, 84, 11;
|
|
8
|
+
--color-dark-grey: 77, 77, 77;
|
|
9
|
+
--pst-color-link: var(--color-dark-orange);
|
|
10
|
+
|
|
11
|
+
--pst-color-h1: var(--color-dark-grey);
|
|
12
|
+
--pst-color-h2: var(--color-dark-grey);
|
|
13
|
+
--pst-color-h3: var(--color-dark-grey);
|
|
14
|
+
--pst-color-h4: var(--color-dark-grey);
|
|
15
|
+
--pst-color-h5: var(--color-dark-grey);
|
|
16
|
+
--pst-color-h6: var(--color-dark-grey);
|
|
17
|
+
|
|
18
|
+
--pst-color-active-navigation: var(--color-dark-orange);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* -- navbar ------------------------------------------------------------- */
|
|
22
|
+
|
|
23
|
+
.navbar-brand {
|
|
24
|
+
padding: 0.4em;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* -- topics ------------------------------------------------------------- */
|
|
28
|
+
|
|
29
|
+
div.topic {
|
|
30
|
+
border: 0px solid #ccc;
|
|
31
|
+
padding: 7px 7px 0 7px;
|
|
32
|
+
margin: 10px 0 10px 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
p.topic-title {
|
|
36
|
+
font-size: 1.1em;
|
|
37
|
+
font-weight: bold;
|
|
38
|
+
margin-top: 10px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.alert {
|
|
42
|
+
color: #222222;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
p.first.admonition-title {
|
|
46
|
+
color: #ffffff;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
/* Front page table styling */
|
|
51
|
+
|
|
52
|
+
.front-page-table td > p {
|
|
53
|
+
margin-bottom: 0em;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.front-page-table td > p:last-child {
|
|
57
|
+
font-style: italic;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.front-page-table a.reference {
|
|
61
|
+
font-size: 1.3em;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.front-page-table.table td, .front-page-table.table th {
|
|
65
|
+
border: none;
|
|
66
|
+
padding-top: .3em;
|
|
67
|
+
padding-bottom: .3em;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
div.sd-card ul.simple {
|
|
71
|
+
list-style: none;
|
|
72
|
+
padding-left: 1em;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.bd-content .sd-card .sd-card-header {
|
|
76
|
+
background-color: var(--pst-color-surface);
|
|
77
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
# -- Project information --------------------------
|
|
6
|
+
|
|
7
|
+
project = "ezmsg"
|
|
8
|
+
copyright = "2022, JHU/APL"
|
|
9
|
+
author = "JHU/APL"
|
|
10
|
+
|
|
11
|
+
# Read version from pyproject.toml
|
|
12
|
+
try:
|
|
13
|
+
import tomllib
|
|
14
|
+
except ImportError:
|
|
15
|
+
import tomli as tomllib
|
|
16
|
+
|
|
17
|
+
pyproject_path = os.path.join(os.path.dirname(__file__), "../../pyproject.toml")
|
|
18
|
+
with open(pyproject_path, "rb") as f:
|
|
19
|
+
pyproject_data = tomllib.load(f)
|
|
20
|
+
release = pyproject_data["project"]["version"]
|
|
21
|
+
version = release
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# -- General configuration --------------------------
|
|
25
|
+
|
|
26
|
+
extensions = [
|
|
27
|
+
"sphinx.ext.autodoc",
|
|
28
|
+
"sphinx.ext.autosummary",
|
|
29
|
+
"sphinx.ext.doctest",
|
|
30
|
+
"sphinx.ext.duration",
|
|
31
|
+
"sphinx.ext.intersphinx",
|
|
32
|
+
"sphinx.ext.linkcode",
|
|
33
|
+
"sphinx.ext.napoleon",
|
|
34
|
+
"sphinx_autodoc_typehints",
|
|
35
|
+
"sphinx_copybutton",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
templates_path = ["_templates"]
|
|
39
|
+
|
|
40
|
+
source_suffix = [".rst"]
|
|
41
|
+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
42
|
+
|
|
43
|
+
add_module_names = True
|
|
44
|
+
|
|
45
|
+
# The toctree master document
|
|
46
|
+
master_doc = "index"
|
|
47
|
+
|
|
48
|
+
# When set to True, `todo` and `todoList` produce output, else they produce nothing.
|
|
49
|
+
todo_include_todos = False
|
|
50
|
+
|
|
51
|
+
# -- Autodoc configuration ------------------------------
|
|
52
|
+
autodoc_typehints_format = "short"
|
|
53
|
+
python_use_unqualified_type_names = True
|
|
54
|
+
|
|
55
|
+
# -- Intersphinx configuration --------------------------
|
|
56
|
+
|
|
57
|
+
intersphinx_mapping = {
|
|
58
|
+
"python": ("https://docs.python.org/3", None),
|
|
59
|
+
"sphinx": ("https://www.sphinx-doc.org/en/master", None),
|
|
60
|
+
"numpy": ("https://numpy.org/doc/stable", None),
|
|
61
|
+
"ezmsg.sigproc": ("https://www.ezmsg.org/ezmsg-sigproc", None),
|
|
62
|
+
"ezmsg.learn": ("https://www.ezmsg.org/ezmsg-learn", None),
|
|
63
|
+
"ezmsg.blackrock": ("https://www.ezmsg.org/ezmsg-blackrock", None),
|
|
64
|
+
"ezmsg.event": ("https://www.ezmsg.org/ezmsg-event", None),
|
|
65
|
+
"ezmsg.lsl": ("https://www.ezmsg.org/ezmsg-lsl", None),
|
|
66
|
+
"ezmsg.tools": ("https://www.ezmsg.org/ezmsg-tools", None),
|
|
67
|
+
"ezmsg.xdf": ("https://www.ezmsg.org/ezmsg-xdf", None),
|
|
68
|
+
"ezmsg.zmq": ("https://www.ezmsg.org/ezmsg-zmq", None),
|
|
69
|
+
}
|
|
70
|
+
intersphinx_disabled_domains = ["std"]
|
|
71
|
+
|
|
72
|
+
# -- Options for HTML output -----------------------------
|
|
73
|
+
|
|
74
|
+
html_theme = "pydata_sphinx_theme"
|
|
75
|
+
html_logo = "_static/_images/ezmsg_logo.png"
|
|
76
|
+
html_favicon = "_static/_images/ezmsg_logo.png"
|
|
77
|
+
html_title = f"ezmsg {version}"
|
|
78
|
+
|
|
79
|
+
html_static_path = ["_static"]
|
|
80
|
+
|
|
81
|
+
# Timestamp is inserted at every page bottom in this strftime format.
|
|
82
|
+
html_last_updated_fmt = "%Y-%m-%d"
|
|
83
|
+
|
|
84
|
+
# -- Options for EPUB output --------------------------
|
|
85
|
+
epub_show_urls = "footnote"
|
|
86
|
+
|
|
87
|
+
branch = "main"
|
|
88
|
+
code_url = f"https://github.com/ezmsg-org/ezmsg/blob/{branch}/"
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def linkcode_resolve(domain, info):
|
|
92
|
+
if domain != "py":
|
|
93
|
+
return None
|
|
94
|
+
if not info["module"]:
|
|
95
|
+
return None
|
|
96
|
+
filename = info["module"].replace(".", "/")
|
|
97
|
+
if "core" in filename:
|
|
98
|
+
return f"{code_url}src/ezmsg/core/__init__.py"
|
|
99
|
+
else:
|
|
100
|
+
return f"{code_url}src/{filename}.py"
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
# -- Options for graphviz -----------------------------
|
|
104
|
+
graphviz_output_format = "svg"
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def setup(app):
|
|
108
|
+
app.add_css_file("custom.css")
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
ezmsg API Reference
|
|
2
|
+
####################
|
|
3
|
+
|
|
4
|
+
This is the API reference documentation for the **ezmsg** core library.
|
|
5
|
+
|
|
6
|
+
For tutorials, guides, examples, and general documentation, visit `<https://www.ezmsg.org>`_
|
|
7
|
+
|
|
8
|
+
API Documentation
|
|
9
|
+
*****************
|
|
10
|
+
|
|
11
|
+
.. toctree::
|
|
12
|
+
:maxdepth: 2
|
|
13
|
+
|
|
14
|
+
reference/content-reference
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Indices and tables
|
|
18
|
+
******************
|
|
19
|
+
|
|
20
|
+
* :ref:`genindex`
|
|
21
|
+
* :ref:`modindex`
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
AxisArray Utility Methods and Units
|
|
2
|
+
=================================================
|
|
3
|
+
|
|
4
|
+
Utility classes which implement functionality related to messages. These include a method for instantiating new instances of a dataclass given an existing instance:
|
|
5
|
+
|
|
6
|
+
- :class:`replace <ezmsg.util.messages.axisarray.replace>` - Function for creating a new dataclass instance by replacing attributes of an existing instance
|
|
7
|
+
|
|
8
|
+
and several :class:`ezmsg Unit <ezmsg.core.Unit>` classes which operate on :class:`AxisArray <ezmsg.util.messages.axisarray.AxisArray>` messages:
|
|
9
|
+
|
|
10
|
+
- :class:`ArrayChunker <ezmsg.util.messages.chunker.ArrayChunker>` - ezmsg Unit to chunk AxisArray messages along specified axes
|
|
11
|
+
- :class:`SetKey <ezmsg.util.messages.key.SetKey>` - ezmsg Unit for setting the key of incoming AxisArray messages
|
|
12
|
+
- :class:`FilterOnKey <ezmsg.util.messages.key.FilterOnKey>` - ezmsg Unit for filtering an AxisArray based on its key.
|
|
13
|
+
- :class:`ModifyAxis <ezmsg.util.messages.modify.ModifyAxis>` - ezmsg Unit for modifying axis names and dimensions of AxisArray messages.
|
|
14
|
+
|
|
15
|
+
replace
|
|
16
|
+
------------
|
|
17
|
+
|
|
18
|
+
.. autofunction:: ezmsg.util.messages.axisarray.replace
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Array Chunking
|
|
22
|
+
---------------
|
|
23
|
+
|
|
24
|
+
.. automodule:: ezmsg.util.messages.chunker
|
|
25
|
+
:show-inheritance:
|
|
26
|
+
:members:
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
Modifying AxisArray "key"
|
|
30
|
+
---------------------------
|
|
31
|
+
|
|
32
|
+
.. automodule:: ezmsg.util.messages.key
|
|
33
|
+
:show-inheritance:
|
|
34
|
+
:members:
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
Modifying AxisArray "axes"
|
|
38
|
+
------------------------------
|
|
39
|
+
|
|
40
|
+
.. automodule:: ezmsg.util.messages.modify
|
|
41
|
+
:show-inheritance:
|
|
42
|
+
:members:
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
Components - Units and Collections
|
|
2
|
+
===================================
|
|
3
|
+
|
|
4
|
+
An ezmsg pipeline is created from a few basic components. ezmsg provides a framework for you to define your own graphs using its building blocks. The nodes of the graph that defines a pipeline all inherit from the base class :class:`Component <ezmsg.core.Component>`. The two types of Component are :class:`Unit <ezmsg.core.Unit>` and :class:`Collection <ezmsg.core.Collection>`.
|
|
5
|
+
|
|
6
|
+
.. note:: It is convention to ``import ezmsg.core as ez`` and then use this shorthand in your code. e.g.,
|
|
7
|
+
|
|
8
|
+
.. code-block:: python
|
|
9
|
+
|
|
10
|
+
class MyUnit(ez.Unit):
|
|
11
|
+
...
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
Component
|
|
15
|
+
----------
|
|
16
|
+
|
|
17
|
+
.. autoclass:: ezmsg.core.Component
|
|
18
|
+
|
|
19
|
+
Unit
|
|
20
|
+
---------
|
|
21
|
+
|
|
22
|
+
The basic nodes of an ezmsg pipeline graph are :class:`Units <ezmsg.core.Unit>`.
|
|
23
|
+
|
|
24
|
+
.. autoclass:: ezmsg.core.Unit
|
|
25
|
+
:show-inheritance:
|
|
26
|
+
:members:
|
|
27
|
+
:inherited-members:
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
Collection
|
|
31
|
+
------------
|
|
32
|
+
|
|
33
|
+
A :class:`Collection <ezmsg.core.Collection>` is a special type of :class:`Component <ezmsg.core.Component>` that contains other :class:`Components <ezmsg.core.Component>` (:class:`Units <ezmsg.core.Unit>` and/or other :class:`Collections <ezmsg.core.Collection>`).
|
|
34
|
+
|
|
35
|
+
.. autoclass:: ezmsg.core.NetworkDefinition
|
|
36
|
+
|
|
37
|
+
.. autoclass:: ezmsg.core.Collection
|
|
38
|
+
:show-inheritance:
|
|
39
|
+
:members:
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
Component Interaction
|
|
43
|
+
---------------------
|
|
44
|
+
|
|
45
|
+
Two fundamental attributes of a :class:`Component <ezmsg.core.Component>` are its :class:`Settings <ezmsg.core.Settings>` and :class:`State <ezmsg.core.State>`, both of which are optional but initialised by the ezmsg backend during :class:`Unit <ezmsg.core.Unit>` initialisation (if present).
|
|
46
|
+
|
|
47
|
+
.. autoclass:: ezmsg.core.Settings
|
|
48
|
+
|
|
49
|
+
.. autoclass:: ezmsg.core.State
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
Stream
|
|
53
|
+
------
|
|
54
|
+
|
|
55
|
+
Facilitates a flow of Messages into or out of a :class:`Component <ezmsg.core.Component>`.
|
|
56
|
+
|
|
57
|
+
.. autoclass:: ezmsg.core.InputStream
|
|
58
|
+
|
|
59
|
+
.. autoclass:: ezmsg.core.OutputStream
|
|
60
|
+
|
|
61
|
+
Custom Exceptions
|
|
62
|
+
-----------------
|
|
63
|
+
|
|
64
|
+
These are custom exceptions defined in ezmsg.
|
|
65
|
+
|
|
66
|
+
.. autoclass:: ezmsg.core.Complete
|
|
67
|
+
|
|
68
|
+
.. autoclass:: ezmsg.core.NormalTermination
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
`ezmsg` Entry Point
|
|
2
|
+
========================
|
|
3
|
+
|
|
4
|
+
An ezmsg pipeline is instantiated through a call to ``ezmsg.core.run()``.
|
|
5
|
+
|
|
6
|
+
.. note:: It is convention to ``import ezmsg.core as ez`` and then use this shorthand in your code.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
.. autofunction:: ezmsg.core.run
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Unit Function Decorators
|
|
2
|
+
******************************************
|
|
3
|
+
|
|
4
|
+
These function decorators can be added to member functions of an ezmsg ``Unit`` or ``Collection``.
|
|
5
|
+
|
|
6
|
+
.. autodecorator:: ezmsg.core.subscriber
|
|
7
|
+
|
|
8
|
+
.. autodecorator:: ezmsg.core.publisher
|
|
9
|
+
|
|
10
|
+
.. autodecorator:: ezmsg.core.main
|
|
11
|
+
|
|
12
|
+
.. autodecorator:: ezmsg.core.thread
|
|
13
|
+
|
|
14
|
+
.. autodecorator:: ezmsg.core.task
|
|
15
|
+
|
|
16
|
+
.. autodecorator:: ezmsg.core.process
|
|
17
|
+
|
|
18
|
+
.. autodecorator:: ezmsg.core.timeit
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Utility Units and Classes
|
|
2
|
+
===========================
|
|
3
|
+
|
|
4
|
+
Utility :class:`ezmsg Units <ezmsg.core.Unit>` and associated classes for `ezmsg` pipelines. Currently includes the following Units:
|
|
5
|
+
|
|
6
|
+
- :class:`DebugLog <ezmsg.util.debuglog.DebugLog>`: An ezmsg Unit for logging message debug information. Convenient way to print message contents without modifying other units.
|
|
7
|
+
- :class:`TerminateOnTimeout <ezmsg.util.terminate.TerminateOnTimeout>`: An ezmsg Unit that terminates the pipeline after a specified timeout period.
|
|
8
|
+
- :class:`TerminateOnTotal <ezmsg.util.terminate.TerminateOnTotal>`: An ezmsg Unit that terminates the pipeline after a specified total number of messages have been processed.
|
|
9
|
+
- :class:`MessageGate <ezmsg.util.messagegate.MessageGate>`: An ezmsg Unit that blocks messages based on a condition: open, open after N messages, closed, or closed after N messages.
|
|
10
|
+
- :class:`MessageLogger <ezmsg.util.messagelogger.MessageLogger>`: An ezmsg Unit that logs all messages passing through it to a file.
|
|
11
|
+
- :class:`MessageQueue <ezmsg.util.messagequeue.MessageQueue>`: An ezmsg Unit that is placed between two other Units to induce backpressure.
|
|
12
|
+
- :class:`MessageCollector <ezmsg.util.messagereplay.MessageCollector>`: An ezmsg Unit that collects messages into a local list.
|
|
13
|
+
- :class:`MessageReplay <ezmsg.util.messagereplay.MessageReplay>`: An ezmsg Unit that streams messages from :class:`MessageLogger <ezmsg.util.messagelogger.MessageLogger>` created files.
|
|
14
|
+
|
|
15
|
+
and utility classes for encoding/decoding messages:
|
|
16
|
+
|
|
17
|
+
- :class:`MessageDecoder <ezmsg.util.messagecodec.MessageDecoder>`: Utility class that decodes ezmsg messages from their JSON representation.
|
|
18
|
+
- :class:`MessageEncoder <ezmsg.util.messagecodec.MessageEncoder>`: Utility class that encodes ezmsg messages to their JSON representation.
|
|
19
|
+
|
|
20
|
+
DebugLog
|
|
21
|
+
--------
|
|
22
|
+
|
|
23
|
+
.. automodule:: ezmsg.util.debuglog
|
|
24
|
+
:show-inheritance:
|
|
25
|
+
:members:
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
Terminate
|
|
29
|
+
---------
|
|
30
|
+
|
|
31
|
+
.. automodule:: ezmsg.util.terminate
|
|
32
|
+
:show-inheritance:
|
|
33
|
+
:members:
|
|
34
|
+
|
|
35
|
+
MessageReplay
|
|
36
|
+
-------------
|
|
37
|
+
|
|
38
|
+
.. automodule:: ezmsg.util.messagereplay
|
|
39
|
+
:show-inheritance:
|
|
40
|
+
:members:
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
MessageGate
|
|
44
|
+
-----------
|
|
45
|
+
|
|
46
|
+
.. automodule:: ezmsg.util.messagegate
|
|
47
|
+
:show-inheritance:
|
|
48
|
+
:members:
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
MessageLogger
|
|
52
|
+
-------------
|
|
53
|
+
|
|
54
|
+
.. automodule:: ezmsg.util.messagelogger
|
|
55
|
+
:show-inheritance:
|
|
56
|
+
:members:
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
MessageQueue
|
|
60
|
+
------------
|
|
61
|
+
|
|
62
|
+
.. automodule:: ezmsg.util.messagequeue
|
|
63
|
+
:show-inheritance:
|
|
64
|
+
:members:
|
|
65
|
+
|
|
66
|
+
MessageCodec
|
|
67
|
+
------------
|
|
68
|
+
|
|
69
|
+
.. automodule:: ezmsg.util.messagecodec
|
|
70
|
+
:show-inheritance:
|
|
71
|
+
:members:
|