ezmsg-tools 0.1.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 (37) hide show
  1. ezmsg_tools-0.1.0/.github/workflows/docs.yml +66 -0
  2. ezmsg_tools-0.1.0/.github/workflows/python-publish.yml +26 -0
  3. ezmsg_tools-0.1.0/.github/workflows/python-tests.yml +36 -0
  4. ezmsg_tools-0.1.0/.gitignore +55 -0
  5. ezmsg_tools-0.1.0/.pre-commit-config.yaml +9 -0
  6. ezmsg_tools-0.1.0/LICENSE +21 -0
  7. ezmsg_tools-0.1.0/PKG-INFO +115 -0
  8. ezmsg_tools-0.1.0/README.md +90 -0
  9. ezmsg_tools-0.1.0/docs/Makefile +20 -0
  10. ezmsg_tools-0.1.0/docs/make.bat +35 -0
  11. ezmsg_tools-0.1.0/docs/source/_templates/autosummary/module.rst +64 -0
  12. ezmsg_tools-0.1.0/docs/source/api/index.rst +11 -0
  13. ezmsg_tools-0.1.0/docs/source/conf.py +121 -0
  14. ezmsg_tools-0.1.0/docs/source/index.rst +69 -0
  15. ezmsg_tools-0.1.0/pyproject.toml +92 -0
  16. ezmsg_tools-0.1.0/scripts_nbs/orphan/run_attach.py +81 -0
  17. ezmsg_tools-0.1.0/scripts_nbs/profiler/ecog_preproc.py +68 -0
  18. ezmsg_tools-0.1.0/scripts_nbs/profiler/mp_demo.py +44 -0
  19. ezmsg_tools-0.1.0/scripts_nbs/profiler/parse_profiler.ipynb +1043 -0
  20. ezmsg_tools-0.1.0/scripts_nbs/profiler/profiler.py +55 -0
  21. ezmsg_tools-0.1.0/src/ezmsg/tools/__init__.py +1 -0
  22. ezmsg_tools-0.1.0/src/ezmsg/tools/__version__.py +34 -0
  23. ezmsg_tools-0.1.0/src/ezmsg/tools/dag.py +146 -0
  24. ezmsg_tools-0.1.0/src/ezmsg/tools/perfmon/__init__.py +0 -0
  25. ezmsg_tools-0.1.0/src/ezmsg/tools/perfmon/main.py +283 -0
  26. ezmsg_tools-0.1.0/src/ezmsg/tools/proc.py +87 -0
  27. ezmsg_tools-0.1.0/src/ezmsg/tools/shmem/__init__.py +0 -0
  28. ezmsg_tools-0.1.0/src/ezmsg/tools/shmem/shmem.py +422 -0
  29. ezmsg_tools-0.1.0/src/ezmsg/tools/shmem/shmem_mirror.py +244 -0
  30. ezmsg_tools-0.1.0/src/ezmsg/tools/sigmon/__init__.py +0 -0
  31. ezmsg_tools-0.1.0/src/ezmsg/tools/sigmon/main.py +95 -0
  32. ezmsg_tools-0.1.0/src/ezmsg/tools/sigmon/ui/__init__.py +0 -0
  33. ezmsg_tools-0.1.0/src/ezmsg/tools/sigmon/ui/base.py +96 -0
  34. ezmsg_tools-0.1.0/src/ezmsg/tools/sigmon/ui/dag.py +101 -0
  35. ezmsg_tools-0.1.0/src/ezmsg/tools/sigmon/ui/timeseries.py +263 -0
  36. ezmsg_tools-0.1.0/tests/test_shmem_mirror.py +177 -0
  37. ezmsg_tools-0.1.0/tests/test_shmem_sink.py +117 -0
@@ -0,0 +1,66 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+ - dev
11
+ release:
12
+ types: [published]
13
+ workflow_dispatch:
14
+
15
+ permissions:
16
+ contents: read
17
+ pages: write
18
+ id-token: write
19
+
20
+ # Allow only one concurrent deployment
21
+ concurrency:
22
+ group: "pages"
23
+ cancel-in-progress: false
24
+
25
+ jobs:
26
+ build:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 0 # Needed for hatch-vcs to determine version
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 when a release is published
57
+ if: github.event_name == 'release'
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
@@ -0,0 +1,26 @@
1
+ name: Upload Python Package
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ build:
10
+ name: build and upload release to PyPI
11
+ runs-on: ubuntu-latest
12
+ environment: "release"
13
+ permissions:
14
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Install the latest version of uv
20
+ uses: astral-sh/setup-uv@v6
21
+
22
+ - name: Build Package
23
+ run: uv build
24
+
25
+ - name: Publish package distributions to PyPI
26
+ run: uv publish
@@ -0,0 +1,36 @@
1
+ name: Test package
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches:
8
+ - main
9
+ - dev
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ build:
14
+ strategy:
15
+ matrix:
16
+ python-version: ["3.10.15", "3.11", "3.12", "3.13"]
17
+ os:
18
+ - "ubuntu-latest"
19
+ - "windows-latest"
20
+ - "macos-latest"
21
+ runs-on: ${{matrix.os}}
22
+
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+
26
+ - name: Install the latest version of uv
27
+ uses: astral-sh/setup-uv@v6
28
+
29
+ - name: Install the project
30
+ run: uv sync --python ${{ matrix.python-version }}
31
+
32
+ - name: Lint
33
+ run: uv tool run ruff check --output-format=github src
34
+
35
+ - name: Run tests
36
+ run: uv run pytest tests
@@ -0,0 +1,55 @@
1
+ # These are some examples of commonly ignored file patterns.
2
+ # You should customize this list as applicable to your project.
3
+ # Learn more about .gitignore:
4
+ # https://www.atlassian.com/git/tutorials/saving-changes/gitignore
5
+
6
+ # Node artifact files
7
+ node_modules/
8
+ dist/
9
+
10
+ # Compiled Java class files
11
+ *.class
12
+
13
+ # Compiled Python bytecode
14
+ *.py[cod]
15
+
16
+ # Log files
17
+ *.log
18
+
19
+ # Package files
20
+ *.jar
21
+
22
+ # Maven
23
+ target/
24
+ dist/
25
+
26
+ # JetBrains IDE
27
+ .idea/
28
+
29
+ # Unit test reports
30
+ TEST*.xml
31
+
32
+ # Generated by MacOS
33
+ .DS_Store
34
+
35
+ # Generated by Windows
36
+ Thumbs.db
37
+
38
+ # Applications
39
+ *.app
40
+ *.exe
41
+ *.war
42
+
43
+ # Large media files
44
+ *.mp4
45
+ *.tiff
46
+ *.avi
47
+ *.flv
48
+ *.mov
49
+ *.wmv
50
+
51
+ .venv/
52
+ src/ezmsg/tools/__version__.py
53
+
54
+ uv.lock
55
+ settings.local.json
@@ -0,0 +1,9 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.8.3
4
+ hooks:
5
+ # Run the linter.
6
+ - id: ruff
7
+ args: [ --fix ]
8
+ # Run the formatter.
9
+ - id: ruff-format
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 ezmsg-org
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,115 @@
1
+ Metadata-Version: 2.4
2
+ Name: ezmsg-tools
3
+ Version: 0.1.0
4
+ Summary: ezmsg namespace package containing tools for working with ezmsg graphs.
5
+ Author-email: Chadwick Boulay <chadwick.boulay@gmail.com>
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.10.15
9
+ Requires-Dist: ezmsg>=3.6.1
10
+ Requires-Dist: numpy>=1.26.0
11
+ Provides-Extra: perfmon
12
+ Requires-Dist: dash-bootstrap-components>=1.6.0; extra == 'perfmon'
13
+ Requires-Dist: dash-extensions>=1.0.19; extra == 'perfmon'
14
+ Requires-Dist: dash>=2.18.2; extra == 'perfmon'
15
+ Requires-Dist: ezmsg-baseproc; extra == 'perfmon'
16
+ Requires-Dist: pandas>=2.2.3; extra == 'perfmon'
17
+ Requires-Dist: plotly>=5.24.1; extra == 'perfmon'
18
+ Requires-Dist: pygtail>=0.14.0; extra == 'perfmon'
19
+ Requires-Dist: typer>=0.15.1; extra == 'perfmon'
20
+ Provides-Extra: sigmon
21
+ Requires-Dist: pygame>=2.6.1; extra == 'sigmon'
22
+ Requires-Dist: pygraphviz>=1.14; extra == 'sigmon'
23
+ Requires-Dist: typer>=0.15.1; extra == 'sigmon'
24
+ Description-Content-Type: text/markdown
25
+
26
+ # ezmsg-tools
27
+
28
+ A namespace package for [ezmsg](https://github.com/iscoe/ezmsg) to visualize running graphs and data.
29
+
30
+ The data visualization is highly fragile. Expect bugs.
31
+
32
+ ## Installation
33
+
34
+ ### Pre-requisites
35
+
36
+ * [graphviz](https://graphviz.org/download/)
37
+
38
+ On Mac, you should use brew:
39
+
40
+ * `brew install graphviz`
41
+ * `export CFLAGS="-I $(brew --prefix graphviz)/include"`
42
+ * `export LDFLAGS="-L $(brew --prefix graphviz)/lib"`
43
+
44
+ ### Release
45
+
46
+ Install the latest release from pypi with: `pip install ezmsg-tools` (or `uv add ...` or `poetry add ...`).
47
+
48
+ More than likely, you will want to include at least one of the extras when installing:
49
+
50
+ `pip install "ezmsg-tools[all]"`
51
+
52
+ ### Development Version
53
+
54
+ If you intend to edit `ezmsg-tools` then please refer to the [Developers](#developers) section below.
55
+
56
+ You can add the development version of ezmsg-tools directly from GitHub:
57
+
58
+ * Using `pip`: `pip install git+https://github.com/ezmsg-org/ezmsg-tools.git@dev`
59
+ * Using `poetry`: `poetry add "git+https://github.com/ezmsg-org/ezmsg-tools.git@dev"`
60
+ * Using `uv`: `uv add git+https://github.com/ezmsg-org/ezmsg-tools --branch dev`
61
+
62
+ You probably want to include the extras when installing the development version:
63
+
64
+ * `pip install "ezmsg-tools[all] @ git+https://github.com/ezmsg-org/ezmsg-tools.git@dev"`
65
+
66
+ ## Getting Started
67
+
68
+ This package includes some entrypoints with useful tools.
69
+
70
+ ### ezmsg-performance-monitor
71
+
72
+ This tool operates on logfiles created by ezmsg. Logfiles will automatically be created when running a pipeline containing nodes decorated with `ezmsg.sigproc.util.profile.profile_subpub`,
73
+ and if the `EZMSG_LOGLEVEL` environment variable is set to DEBUG. The logfiles will be created in `~/.ezmsg/profile/ezprofiler.log` by default but this can be changed with the `EZMSG_PROFILE` environment variable.
74
+
75
+ Most of the nodes provided by `ezmsg.sigproc` are already decorated to enable profiling, as is any custom nodes that inherit from `ezmsg.sigproc.base.GenAxisArray`.
76
+ You can decorate other nodes with `ezmsg.sigproc.util.profile.profile_subpub` to enable profiling.
77
+
78
+ During a run with profiling enabled, the logfiles will be created in the specified location. You may wish to additionally create a graph file: (`uv run`) `EZMSG_LOGLEVEL=WARN ezmsg mermaid > ~/.ezmsg/profile/ezprofiler.mermaid`
79
+
80
+ During or after a pipeline run with profiling enabled, you can run (`uv run `) `performance-monitor` to visualize the performance of the nodes in the pipeline.
81
+
82
+ > Unlike `signal-monitor`, this tool does not require the pipeline to attach to an existing graph service because it relies exclusively on the logfile.
83
+
84
+ ### ezmsg-signal-monitor
85
+
86
+ The pipeline must be running on a graph service exposed on the network. For example, first, run the GraphService on an open port:
87
+
88
+ `ezmsg --address 127.0.0.1:25978 start`
89
+
90
+ Then run your usual pipeline but make sure it attaches to the graph address by passing `graph_address=("127.0.0.1", 25978)` as a kwarg to `ez.run`.
91
+
92
+ While the pipeline is running, you can run the signal-monitor tool with (`uv run`) `signal-monitor --graph-addr 127.0.0.1:25978`.
93
+
94
+ This launches a window with graph visualized on the left. Click on a node's output box to get a live visualization on the right side of the screen plotting the data as it leaves that node. Use `a` to toggle auto-scaling. With auto-scaling off, use `-`, and `=` to zoom out and in, respectively.
95
+
96
+ > Currently only 2-D outputs are supported!
97
+
98
+ Don't forget to shutdown your graph service when you are done, e.g.: `ezmsg --address 127.0.0.1:25978 shutdown`
99
+
100
+ ## Developers
101
+
102
+ We use [`uv`](https://docs.astral.sh/uv/getting-started/installation/) for development. It is not strictly required, but if you intend to contribute to ezmsg-tools then using `uv` will lead to the smoothest collaboration.
103
+
104
+ 1. Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/) if not already installed.
105
+ 2. Fork ezmsg-tools and clone your fork to your local computer.
106
+ 3. Open a terminal and `cd` to the cloned folder.
107
+ 4. Make sure `pygraphviz` [pre-requisites](#pre-requisites) are installed.
108
+ * On mac: `export CFLAGS="-I $(brew --prefix graphviz)/include"` and `export LDFLAGS="-L $(brew --prefix graphviz)/lib"`
109
+ 5. `uv sync --all-extras --python 3.10` to create a .venv and install ezmsg-tools including dev and test dependencies.
110
+ 6. After editing code and making commits, Run the test suite before making a PR: `uv run pytest`
111
+
112
+ ## Troubleshooting
113
+
114
+ Graphviz can be difficult to install on some systems. The simplest may be to use conda/mamba: `conda install graphviz`.
115
+ If that fails, [see here](https://github.com/pygraphviz/pygraphviz/issues/398#issuecomment-1038476921).
@@ -0,0 +1,90 @@
1
+ # ezmsg-tools
2
+
3
+ A namespace package for [ezmsg](https://github.com/iscoe/ezmsg) to visualize running graphs and data.
4
+
5
+ The data visualization is highly fragile. Expect bugs.
6
+
7
+ ## Installation
8
+
9
+ ### Pre-requisites
10
+
11
+ * [graphviz](https://graphviz.org/download/)
12
+
13
+ On Mac, you should use brew:
14
+
15
+ * `brew install graphviz`
16
+ * `export CFLAGS="-I $(brew --prefix graphviz)/include"`
17
+ * `export LDFLAGS="-L $(brew --prefix graphviz)/lib"`
18
+
19
+ ### Release
20
+
21
+ Install the latest release from pypi with: `pip install ezmsg-tools` (or `uv add ...` or `poetry add ...`).
22
+
23
+ More than likely, you will want to include at least one of the extras when installing:
24
+
25
+ `pip install "ezmsg-tools[all]"`
26
+
27
+ ### Development Version
28
+
29
+ If you intend to edit `ezmsg-tools` then please refer to the [Developers](#developers) section below.
30
+
31
+ You can add the development version of ezmsg-tools directly from GitHub:
32
+
33
+ * Using `pip`: `pip install git+https://github.com/ezmsg-org/ezmsg-tools.git@dev`
34
+ * Using `poetry`: `poetry add "git+https://github.com/ezmsg-org/ezmsg-tools.git@dev"`
35
+ * Using `uv`: `uv add git+https://github.com/ezmsg-org/ezmsg-tools --branch dev`
36
+
37
+ You probably want to include the extras when installing the development version:
38
+
39
+ * `pip install "ezmsg-tools[all] @ git+https://github.com/ezmsg-org/ezmsg-tools.git@dev"`
40
+
41
+ ## Getting Started
42
+
43
+ This package includes some entrypoints with useful tools.
44
+
45
+ ### ezmsg-performance-monitor
46
+
47
+ This tool operates on logfiles created by ezmsg. Logfiles will automatically be created when running a pipeline containing nodes decorated with `ezmsg.sigproc.util.profile.profile_subpub`,
48
+ and if the `EZMSG_LOGLEVEL` environment variable is set to DEBUG. The logfiles will be created in `~/.ezmsg/profile/ezprofiler.log` by default but this can be changed with the `EZMSG_PROFILE` environment variable.
49
+
50
+ Most of the nodes provided by `ezmsg.sigproc` are already decorated to enable profiling, as is any custom nodes that inherit from `ezmsg.sigproc.base.GenAxisArray`.
51
+ You can decorate other nodes with `ezmsg.sigproc.util.profile.profile_subpub` to enable profiling.
52
+
53
+ During a run with profiling enabled, the logfiles will be created in the specified location. You may wish to additionally create a graph file: (`uv run`) `EZMSG_LOGLEVEL=WARN ezmsg mermaid > ~/.ezmsg/profile/ezprofiler.mermaid`
54
+
55
+ During or after a pipeline run with profiling enabled, you can run (`uv run `) `performance-monitor` to visualize the performance of the nodes in the pipeline.
56
+
57
+ > Unlike `signal-monitor`, this tool does not require the pipeline to attach to an existing graph service because it relies exclusively on the logfile.
58
+
59
+ ### ezmsg-signal-monitor
60
+
61
+ The pipeline must be running on a graph service exposed on the network. For example, first, run the GraphService on an open port:
62
+
63
+ `ezmsg --address 127.0.0.1:25978 start`
64
+
65
+ Then run your usual pipeline but make sure it attaches to the graph address by passing `graph_address=("127.0.0.1", 25978)` as a kwarg to `ez.run`.
66
+
67
+ While the pipeline is running, you can run the signal-monitor tool with (`uv run`) `signal-monitor --graph-addr 127.0.0.1:25978`.
68
+
69
+ This launches a window with graph visualized on the left. Click on a node's output box to get a live visualization on the right side of the screen plotting the data as it leaves that node. Use `a` to toggle auto-scaling. With auto-scaling off, use `-`, and `=` to zoom out and in, respectively.
70
+
71
+ > Currently only 2-D outputs are supported!
72
+
73
+ Don't forget to shutdown your graph service when you are done, e.g.: `ezmsg --address 127.0.0.1:25978 shutdown`
74
+
75
+ ## Developers
76
+
77
+ We use [`uv`](https://docs.astral.sh/uv/getting-started/installation/) for development. It is not strictly required, but if you intend to contribute to ezmsg-tools then using `uv` will lead to the smoothest collaboration.
78
+
79
+ 1. Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/) if not already installed.
80
+ 2. Fork ezmsg-tools and clone your fork to your local computer.
81
+ 3. Open a terminal and `cd` to the cloned folder.
82
+ 4. Make sure `pygraphviz` [pre-requisites](#pre-requisites) are installed.
83
+ * On mac: `export CFLAGS="-I $(brew --prefix graphviz)/include"` and `export LDFLAGS="-L $(brew --prefix graphviz)/lib"`
84
+ 5. `uv sync --all-extras --python 3.10` to create a .venv and install ezmsg-tools including dev and test dependencies.
85
+ 6. After editing code and making commits, Run the test suite before making a PR: `uv run pytest`
86
+
87
+ ## Troubleshooting
88
+
89
+ Graphviz can be difficult to install on some systems. The simplest may be to use conda/mamba: `conda install graphviz`.
90
+ If that fails, [see here](https://github.com/pygraphviz/pygraphviz/issues/398#issuecomment-1038476921).
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = source
9
+ BUILDDIR = build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,35 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=source
11
+ set BUILDDIR=build
12
+
13
+ if "%1" == "" goto help
14
+
15
+ %SPHINXBUILD% >NUL 2>NUL
16
+ if errorlevel 9009 (
17
+ echo.
18
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19
+ echo.installed, then set the SPHINXBUILD environment variable to point
20
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
21
+ echo.may add the Sphinx directory to PATH.
22
+ echo.
23
+ echo.If you don't have Sphinx installed, grab it from
24
+ echo.http://sphinx-doc.org/
25
+ exit /b 1
26
+ )
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd
@@ -0,0 +1,64 @@
1
+ {{ fullname | escape | underline}}
2
+
3
+ .. automodule:: {{ fullname }}
4
+
5
+ {% block attributes %}
6
+ {% if attributes %}
7
+ .. rubric:: Module Attributes
8
+
9
+ .. autosummary::
10
+ :toctree:
11
+ {% for item in attributes %}
12
+ {{ item }}
13
+ {%- endfor %}
14
+ {% endif %}
15
+ {% endblock %}
16
+
17
+ {% block functions %}
18
+ {% if functions %}
19
+ .. rubric:: Functions
20
+
21
+ {% for item in functions %}
22
+ .. autofunction:: {{ item }}
23
+ {%- endfor %}
24
+ {% endif %}
25
+ {% endblock %}
26
+
27
+ {% block classes %}
28
+ {% if classes %}
29
+ .. rubric:: Classes
30
+
31
+ {% for item in classes %}
32
+ .. autoclass:: {{ item }}
33
+ :members:
34
+ :undoc-members:
35
+ :show-inheritance:
36
+ :special-members: __init__
37
+ {%- endfor %}
38
+ {% endif %}
39
+ {% endblock %}
40
+
41
+ {% block exceptions %}
42
+ {% if exceptions %}
43
+ .. rubric:: Exceptions
44
+
45
+ {% for item in exceptions %}
46
+ .. autoexception:: {{ item }}
47
+ :members:
48
+ :show-inheritance:
49
+ {%- endfor %}
50
+ {% endif %}
51
+ {% endblock %}
52
+
53
+ {% block modules %}
54
+ {% if modules %}
55
+ .. rubric:: Modules
56
+
57
+ .. autosummary::
58
+ :toctree:
59
+ :recursive:
60
+ {% for item in modules %}
61
+ {{ item }}
62
+ {%- endfor %}
63
+ {% endif %}
64
+ {% endblock %}
@@ -0,0 +1,11 @@
1
+ API Reference
2
+ =============
3
+
4
+ This page contains auto-generated API reference documentation.
5
+
6
+ .. autosummary::
7
+ :toctree: generated
8
+ :recursive:
9
+ :template: autosummary/module.rst
10
+
11
+ ezmsg.tools
@@ -0,0 +1,121 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+
3
+ import os
4
+ import sys
5
+
6
+ # Add the source directory to the path
7
+ sys.path.insert(0, os.path.abspath("../../src"))
8
+
9
+ # -- Project information --------------------------
10
+
11
+ project = "ezmsg.tools"
12
+ copyright = "2025, ezmsg Contributors"
13
+ author = "ezmsg Contributors"
14
+
15
+ # The version is managed by hatch-vcs and stored in __version__.py
16
+ try:
17
+ from ezmsg.tools.__version__ import version as release
18
+ except ImportError:
19
+ release = "unknown"
20
+
21
+ # For display purposes, extract the base version without git commit info
22
+ version = release.split("+")[0] if release != "unknown" else release
23
+
24
+ # -- General configuration --------------------------
25
+
26
+ extensions = [
27
+ "sphinx.ext.autodoc",
28
+ "sphinx.ext.autosummary",
29
+ "sphinx.ext.napoleon",
30
+ "sphinx.ext.intersphinx",
31
+ "sphinx.ext.viewcode",
32
+ "sphinx.ext.duration",
33
+ "sphinx_copybutton",
34
+ "myst_parser", # For markdown files
35
+ ]
36
+
37
+ templates_path = ["_templates"]
38
+ source_suffix = {
39
+ ".rst": "restructuredtext",
40
+ ".md": "markdown",
41
+ }
42
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
43
+
44
+ # The toctree master document
45
+ master_doc = "index"
46
+
47
+ # -- Autodoc configuration ------------------------------
48
+
49
+ # Auto-generate API docs
50
+ autosummary_generate = True
51
+ autosummary_imported_members = False
52
+ autodoc_typehints = "description"
53
+ autodoc_member_order = "bysource"
54
+ autodoc_typehints_format = "short"
55
+ python_use_unqualified_type_names = True
56
+ autodoc_default_options = {
57
+ "members": True,
58
+ "member-order": "bysource",
59
+ "special-members": "__init__",
60
+ "undoc-members": True,
61
+ "show-inheritance": True,
62
+ }
63
+
64
+ # Don't show the full module path in the docs
65
+ add_module_names = False
66
+
67
+ # -- Intersphinx configuration --------------------------
68
+
69
+ intersphinx_mapping = {
70
+ "python": ("https://docs.python.org/3/", None),
71
+ "numpy": ("https://numpy.org/doc/stable/", None),
72
+ "ezmsg": ("https://www.ezmsg.org/ezmsg/", None),
73
+ }
74
+ intersphinx_disabled_domains = ["std"]
75
+
76
+ # -- Options for HTML output -----------------------------
77
+
78
+ html_theme = "pydata_sphinx_theme"
79
+ html_static_path = ["_static"]
80
+
81
+ # Set the base URL for the documentation
82
+ html_baseurl = "https://www.ezmsg.org/ezmsg-tools/"
83
+
84
+ html_theme_options = {
85
+ "logo": {
86
+ "text": f"ezmsg.tools {version}",
87
+ "link": "https://ezmsg.org", # Link back to main site
88
+ },
89
+ "header_links_before_dropdown": 4,
90
+ "navbar_start": ["navbar-logo"],
91
+ "navbar_end": ["theme-switcher", "navbar-icon-links"],
92
+ "icon_links": [
93
+ {
94
+ "name": "GitHub",
95
+ "url": "https://github.com/ezmsg-org/ezmsg-tools",
96
+ "icon": "fa-brands fa-github",
97
+ },
98
+ {
99
+ "name": "ezmsg.org",
100
+ "url": "https://www.ezmsg.org",
101
+ "icon": "fa-solid fa-house",
102
+ },
103
+ ],
104
+ }
105
+
106
+ # Timestamp is inserted at every page bottom in this strftime format.
107
+ html_last_updated_fmt = "%Y-%m-%d"
108
+
109
+ # -- Options for linkcode -----------------------------
110
+
111
+ branch = "main"
112
+ code_url = f"https://github.com/ezmsg-org/ezmsg-tools/blob/{branch}/"
113
+
114
+
115
+ def linkcode_resolve(domain, info):
116
+ if domain != "py":
117
+ return None
118
+ if not info["module"]:
119
+ return None
120
+ filename = info["module"].replace(".", "/")
121
+ return f"{code_url}src/{filename}.py"