ezmsg-simbiophys 1.0.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.
- ezmsg_simbiophys-1.0.0/.github/workflows/docs.yml +66 -0
- ezmsg_simbiophys-1.0.0/.github/workflows/python-publish.yml +28 -0
- ezmsg_simbiophys-1.0.0/.github/workflows/python-tests.yml +36 -0
- ezmsg_simbiophys-1.0.0/.gitignore +129 -0
- ezmsg_simbiophys-1.0.0/.pre-commit-config.yaml +9 -0
- ezmsg_simbiophys-1.0.0/LICENSE +21 -0
- ezmsg_simbiophys-1.0.0/PKG-INFO +46 -0
- ezmsg_simbiophys-1.0.0/README.md +32 -0
- ezmsg_simbiophys-1.0.0/docs/Makefile +20 -0
- ezmsg_simbiophys-1.0.0/docs/make.bat +35 -0
- ezmsg_simbiophys-1.0.0/docs/source/api/index.rst +8 -0
- ezmsg_simbiophys-1.0.0/docs/source/conf.py +122 -0
- ezmsg_simbiophys-1.0.0/docs/source/index.rst +66 -0
- ezmsg_simbiophys-1.0.0/examples/example.py +49 -0
- ezmsg_simbiophys-1.0.0/pyproject.toml +75 -0
- ezmsg_simbiophys-1.0.0/src/ezmsg/simbiophys/__init__.py +125 -0
- ezmsg_simbiophys-1.0.0/src/ezmsg/simbiophys/__version__.py +34 -0
- ezmsg_simbiophys-1.0.0/src/ezmsg/simbiophys/_base.py +60 -0
- ezmsg_simbiophys-1.0.0/src/ezmsg/simbiophys/clock.py +99 -0
- ezmsg_simbiophys-1.0.0/src/ezmsg/simbiophys/cosine_tuning.py +249 -0
- ezmsg_simbiophys-1.0.0/src/ezmsg/simbiophys/counter.py +224 -0
- ezmsg_simbiophys-1.0.0/src/ezmsg/simbiophys/dynamic_colored_noise.py +352 -0
- ezmsg_simbiophys-1.0.0/src/ezmsg/simbiophys/eeg.py +73 -0
- ezmsg_simbiophys-1.0.0/src/ezmsg/simbiophys/noise.py +122 -0
- ezmsg_simbiophys-1.0.0/src/ezmsg/simbiophys/oscillator.py +133 -0
- ezmsg_simbiophys-1.0.0/tests/__init__.py +0 -0
- ezmsg_simbiophys-1.0.0/tests/conftest.py +18 -0
- ezmsg_simbiophys-1.0.0/tests/helpers/__init__.py +0 -0
- ezmsg_simbiophys-1.0.0/tests/helpers/util.py +24 -0
- ezmsg_simbiophys-1.0.0/tests/integration/__init__.py +0 -0
- ezmsg_simbiophys-1.0.0/tests/integration/test_synth_system.py +238 -0
- ezmsg_simbiophys-1.0.0/tests/unit/__init__.py +0 -0
- ezmsg_simbiophys-1.0.0/tests/unit/test_clock.py +54 -0
- ezmsg_simbiophys-1.0.0/tests/unit/test_cosine_tuning.py +254 -0
- ezmsg_simbiophys-1.0.0/tests/unit/test_counter.py +80 -0
- ezmsg_simbiophys-1.0.0/tests/unit/test_dynamic_colored_noise.py +593 -0
- ezmsg_simbiophys-1.0.0/tests/unit/test_oscillator.py +38 -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,28 @@
|
|
|
1
|
+
# This workflow will upload a Python Package using Twine when a release is created
|
|
2
|
+
|
|
3
|
+
name: Upload Python Package
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
release:
|
|
7
|
+
types: [published]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
name: build and upload release to PyPI
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
environment: "release"
|
|
15
|
+
permissions:
|
|
16
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v6
|
|
23
|
+
|
|
24
|
+
- name: Build Package
|
|
25
|
+
run: uv build
|
|
26
|
+
|
|
27
|
+
- name: Publish package distributions to PyPI
|
|
28
|
+
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,129 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
*.manifest
|
|
31
|
+
*.spec
|
|
32
|
+
|
|
33
|
+
# Installer logs
|
|
34
|
+
pip-log.txt
|
|
35
|
+
pip-delete-this-directory.txt
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
*.py,cover
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
cover/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Sphinx documentation
|
|
57
|
+
docs/_build/
|
|
58
|
+
docs/build/
|
|
59
|
+
docs/source/_build
|
|
60
|
+
docs/source/generated
|
|
61
|
+
docs/source/api/generated
|
|
62
|
+
|
|
63
|
+
# PyBuilder
|
|
64
|
+
.pybuilder/
|
|
65
|
+
target/
|
|
66
|
+
|
|
67
|
+
# Jupyter Notebook
|
|
68
|
+
.ipynb_checkpoints
|
|
69
|
+
|
|
70
|
+
# IPython
|
|
71
|
+
profile_default/
|
|
72
|
+
ipython_config.py
|
|
73
|
+
|
|
74
|
+
# pyenv
|
|
75
|
+
# .python-version
|
|
76
|
+
|
|
77
|
+
# PEP 582
|
|
78
|
+
__pypackages__/
|
|
79
|
+
|
|
80
|
+
# Environments
|
|
81
|
+
.env
|
|
82
|
+
.venv
|
|
83
|
+
env/
|
|
84
|
+
venv/
|
|
85
|
+
ENV/
|
|
86
|
+
env.bak/
|
|
87
|
+
venv.bak/
|
|
88
|
+
|
|
89
|
+
# Spyder project settings
|
|
90
|
+
.spyderproject
|
|
91
|
+
.spyproject
|
|
92
|
+
|
|
93
|
+
# Rope project settings
|
|
94
|
+
.ropeproject
|
|
95
|
+
|
|
96
|
+
# mkdocs documentation
|
|
97
|
+
/site
|
|
98
|
+
|
|
99
|
+
# mypy
|
|
100
|
+
.mypy_cache/
|
|
101
|
+
.dmypy.json
|
|
102
|
+
dmypy.json
|
|
103
|
+
|
|
104
|
+
# Pyre type checker
|
|
105
|
+
.pyre/
|
|
106
|
+
|
|
107
|
+
# pytype static type analyzer
|
|
108
|
+
.pytype/
|
|
109
|
+
|
|
110
|
+
# Cython debug symbols
|
|
111
|
+
cython_debug/
|
|
112
|
+
|
|
113
|
+
# JetBrains IDE
|
|
114
|
+
.idea/
|
|
115
|
+
|
|
116
|
+
# VS Code
|
|
117
|
+
.vscode/
|
|
118
|
+
|
|
119
|
+
# Ruff cache
|
|
120
|
+
.ruff_cache/
|
|
121
|
+
|
|
122
|
+
# hatch-vcs generated version file
|
|
123
|
+
src/ezmsg/simbiophys/__version__.py
|
|
124
|
+
|
|
125
|
+
# uv lockfile (optional - comment if you want to track it)
|
|
126
|
+
uv.lock
|
|
127
|
+
|
|
128
|
+
# Claude
|
|
129
|
+
settings.local.json
|
|
@@ -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,46 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ezmsg-simbiophys
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Signal simulation and synthesis for ezmsg
|
|
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-baseproc>=1.0.3
|
|
10
|
+
Requires-Dist: ezmsg-sigproc>=2.6.0
|
|
11
|
+
Requires-Dist: ezmsg>=3.6.0
|
|
12
|
+
Requires-Dist: numpy>=1.26.0
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
# ezmsg-simbiophys
|
|
16
|
+
|
|
17
|
+
ezmsg namespace package for simulating biophysical signals such as ECG, EEG, and intracranial recordings.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install ezmsg-simbiophys
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Dependencies
|
|
26
|
+
|
|
27
|
+
- `ezmsg`
|
|
28
|
+
- `ezmsg-baseproc`
|
|
29
|
+
- `ezmsg-sigproc`
|
|
30
|
+
- `numpy`
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Development
|
|
34
|
+
|
|
35
|
+
We use [`uv`](https://docs.astral.sh/uv/getting-started/installation/) for development.
|
|
36
|
+
|
|
37
|
+
1. Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/) if not already installed.
|
|
38
|
+
2. Fork this repository and clone your fork locally.
|
|
39
|
+
3. Open a terminal and `cd` to the cloned folder.
|
|
40
|
+
4. Run `uv sync` to create a `.venv` and install dependencies.
|
|
41
|
+
5. (Optional) Install pre-commit hooks: `uv run pre-commit install`
|
|
42
|
+
6. After making changes, run the test suite: `uv run pytest tests`
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# ezmsg-simbiophys
|
|
2
|
+
|
|
3
|
+
ezmsg namespace package for simulating biophysical signals such as ECG, EEG, and intracranial recordings.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install ezmsg-simbiophys
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Dependencies
|
|
12
|
+
|
|
13
|
+
- `ezmsg`
|
|
14
|
+
- `ezmsg-baseproc`
|
|
15
|
+
- `ezmsg-sigproc`
|
|
16
|
+
- `numpy`
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## Development
|
|
20
|
+
|
|
21
|
+
We use [`uv`](https://docs.astral.sh/uv/getting-started/installation/) for development.
|
|
22
|
+
|
|
23
|
+
1. Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/) if not already installed.
|
|
24
|
+
2. Fork this repository and clone your fork locally.
|
|
25
|
+
3. Open a terminal and `cd` to the cloned folder.
|
|
26
|
+
4. Run `uv sync` to create a `.venv` and install dependencies.
|
|
27
|
+
5. (Optional) Install pre-commit hooks: `uv run pre-commit install`
|
|
28
|
+
6. After making changes, run the test suite: `uv run pytest tests`
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
@@ -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
|
+
%SPHINXBUILD% >NUL 2>NUL
|
|
14
|
+
if errorlevel 9009 (
|
|
15
|
+
echo.
|
|
16
|
+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
|
17
|
+
echo.installed, then set the SPHINXBUILD environment variable to point
|
|
18
|
+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
|
19
|
+
echo.may add the Sphinx directory to PATH.
|
|
20
|
+
echo.
|
|
21
|
+
echo.If you don't have Sphinx installed, grab it from
|
|
22
|
+
echo.https://www.sphinx-doc.org/
|
|
23
|
+
exit /b 1
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
if "%1" == "" goto help
|
|
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,122 @@
|
|
|
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.simbiophys"
|
|
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.simbiophys.__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_autodoc_typehints",
|
|
34
|
+
"sphinx_copybutton",
|
|
35
|
+
"myst_parser", # For markdown files
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
templates_path = ["_templates"]
|
|
39
|
+
source_suffix = {
|
|
40
|
+
".rst": "restructuredtext",
|
|
41
|
+
".md": "markdown",
|
|
42
|
+
}
|
|
43
|
+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
44
|
+
|
|
45
|
+
# The toctree master document
|
|
46
|
+
master_doc = "index"
|
|
47
|
+
|
|
48
|
+
# -- Autodoc configuration ------------------------------
|
|
49
|
+
|
|
50
|
+
# Auto-generate API docs
|
|
51
|
+
autosummary_generate = True
|
|
52
|
+
autosummary_imported_members = False
|
|
53
|
+
autodoc_typehints = "description"
|
|
54
|
+
autodoc_member_order = "bysource"
|
|
55
|
+
autodoc_typehints_format = "short"
|
|
56
|
+
python_use_unqualified_type_names = True
|
|
57
|
+
autodoc_default_options = {
|
|
58
|
+
"members": True,
|
|
59
|
+
"member-order": "bysource",
|
|
60
|
+
"special-members": "__init__",
|
|
61
|
+
"undoc-members": True,
|
|
62
|
+
"show-inheritance": True,
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
# Don't show the full module path in the docs
|
|
66
|
+
add_module_names = False
|
|
67
|
+
|
|
68
|
+
# -- Intersphinx configuration --------------------------
|
|
69
|
+
|
|
70
|
+
intersphinx_mapping = {
|
|
71
|
+
"python": ("https://docs.python.org/3/", None),
|
|
72
|
+
"numpy": ("https://numpy.org/doc/stable/", None),
|
|
73
|
+
"ezmsg": ("https://www.ezmsg.org/ezmsg/", None),
|
|
74
|
+
}
|
|
75
|
+
intersphinx_disabled_domains = ["std"]
|
|
76
|
+
|
|
77
|
+
# -- Options for HTML output -----------------------------
|
|
78
|
+
|
|
79
|
+
html_theme = "pydata_sphinx_theme"
|
|
80
|
+
html_static_path = ["_static"]
|
|
81
|
+
|
|
82
|
+
# Set the base URL for the documentation
|
|
83
|
+
html_baseurl = "https://www.ezmsg.org/ezmsg-simbiophys/"
|
|
84
|
+
|
|
85
|
+
html_theme_options = {
|
|
86
|
+
"logo": {
|
|
87
|
+
"text": f"ezmsg.simbiophys {version}",
|
|
88
|
+
"link": "https://ezmsg.org",
|
|
89
|
+
},
|
|
90
|
+
"header_links_before_dropdown": 4,
|
|
91
|
+
"navbar_start": ["navbar-logo"],
|
|
92
|
+
"navbar_end": ["theme-switcher", "navbar-icon-links"],
|
|
93
|
+
"icon_links": [
|
|
94
|
+
{
|
|
95
|
+
"name": "GitHub",
|
|
96
|
+
"url": "https://github.com/ezmsg-org/ezmsg-simbiophys",
|
|
97
|
+
"icon": "fa-brands fa-github",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "ezmsg.org",
|
|
101
|
+
"url": "https://www.ezmsg.org",
|
|
102
|
+
"icon": "fa-solid fa-house",
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
# Timestamp is inserted at every page bottom in this strftime format.
|
|
108
|
+
html_last_updated_fmt = "%Y-%m-%d"
|
|
109
|
+
|
|
110
|
+
# -- Options for linkcode -----------------------------
|
|
111
|
+
|
|
112
|
+
branch = "main"
|
|
113
|
+
code_url = f"https://github.com/ezmsg-org/ezmsg-simbiophys/blob/{branch}/"
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def linkcode_resolve(domain, info):
|
|
117
|
+
if domain != "py":
|
|
118
|
+
return None
|
|
119
|
+
if not info["module"]:
|
|
120
|
+
return None
|
|
121
|
+
filename = info["module"].replace(".", "/")
|
|
122
|
+
return f"{code_url}src/{filename}.py"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
ezmsg.simbiophys
|
|
2
|
+
=============
|
|
3
|
+
|
|
4
|
+
Short description of your ezmsg package.
|
|
5
|
+
|
|
6
|
+
Overview
|
|
7
|
+
--------
|
|
8
|
+
|
|
9
|
+
``ezmsg-simbiophys`` provides ... for the `ezmsg <https://www.ezmsg.org>`_ framework.
|
|
10
|
+
|
|
11
|
+
Key features:
|
|
12
|
+
|
|
13
|
+
* **Feature 1** - Description
|
|
14
|
+
* **Feature 2** - Description
|
|
15
|
+
* **Feature 3** - Description
|
|
16
|
+
|
|
17
|
+
Installation
|
|
18
|
+
------------
|
|
19
|
+
|
|
20
|
+
Install from PyPI:
|
|
21
|
+
|
|
22
|
+
.. code-block:: bash
|
|
23
|
+
|
|
24
|
+
pip install ezmsg-simbiophys
|
|
25
|
+
|
|
26
|
+
Or install the latest development version:
|
|
27
|
+
|
|
28
|
+
.. code-block:: bash
|
|
29
|
+
|
|
30
|
+
pip install git+https://github.com/ezmsg-org/ezmsg-simbiophys@main
|
|
31
|
+
|
|
32
|
+
Dependencies
|
|
33
|
+
^^^^^^^^^^^^
|
|
34
|
+
|
|
35
|
+
Core dependencies:
|
|
36
|
+
|
|
37
|
+
* ``ezmsg`` - Core messaging framework
|
|
38
|
+
* ``numpy`` - Numerical computing
|
|
39
|
+
|
|
40
|
+
Quick Start
|
|
41
|
+
-----------
|
|
42
|
+
|
|
43
|
+
For general ezmsg tutorials and guides, visit `ezmsg.org <https://www.ezmsg.org>`_.
|
|
44
|
+
|
|
45
|
+
.. code-block:: python
|
|
46
|
+
|
|
47
|
+
import ezmsg.core as ez
|
|
48
|
+
from ezmsg.simbiophys import MyUnit
|
|
49
|
+
|
|
50
|
+
# Your example code here
|
|
51
|
+
|
|
52
|
+
Documentation
|
|
53
|
+
-------------
|
|
54
|
+
|
|
55
|
+
.. toctree::
|
|
56
|
+
:maxdepth: 2
|
|
57
|
+
:caption: Contents:
|
|
58
|
+
|
|
59
|
+
api/index
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
Indices and tables
|
|
63
|
+
------------------
|
|
64
|
+
|
|
65
|
+
* :ref:`genindex`
|
|
66
|
+
* :ref:`modindex`
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Example usage of ezmsg-simbiophys package.
|
|
3
|
+
This is just a placeholder to test importing. Actual usage example to come.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import asyncio
|
|
7
|
+
import importlib
|
|
8
|
+
import typing
|
|
9
|
+
|
|
10
|
+
import ezmsg.core as ez
|
|
11
|
+
|
|
12
|
+
# Import your units from the package
|
|
13
|
+
# from ezmsg.simbiophys import MyUnit
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ExampleSettings(ez.Settings):
|
|
17
|
+
"""Settings for ExampleUnit."""
|
|
18
|
+
|
|
19
|
+
message: str = "Hello from ezmsg-simbiophys!"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class ExampleUnit(ez.Unit):
|
|
23
|
+
"""Example ezmsg Unit demonstrating basic patterns."""
|
|
24
|
+
|
|
25
|
+
SETTINGS = ExampleSettings
|
|
26
|
+
|
|
27
|
+
INPUT = ez.InputStream(str)
|
|
28
|
+
OUTPUT = ez.OutputStream(str)
|
|
29
|
+
|
|
30
|
+
@ez.subscriber(INPUT)
|
|
31
|
+
@ez.publisher(OUTPUT)
|
|
32
|
+
async def on_message(self, message: str) -> typing.AsyncGenerator:
|
|
33
|
+
"""Process incoming messages."""
|
|
34
|
+
result = f"{self.SETTINGS.message} Received: {message}"
|
|
35
|
+
yield self.OUTPUT, result
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
async def main():
|
|
39
|
+
"""Run the example."""
|
|
40
|
+
print("ezmsg-simbiophys loaded successfully!")
|
|
41
|
+
print(f"Version: {importlib.import_module('ezmsg.simbiophys').__version__}")
|
|
42
|
+
|
|
43
|
+
# Example: Create and run a simple system
|
|
44
|
+
# system = ExampleSystem()
|
|
45
|
+
# await ez.run(SYSTEM=system)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
if __name__ == "__main__":
|
|
49
|
+
asyncio.run(main())
|