Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Documentation

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- dev
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed for hatch-vcs to determine version

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
python-version: "3.12"

- name: Install the project
run: uv sync --only-group docs

- name: Build documentation
run: |
cd docs
uv run make html

- name: Add .nojekyll file
run: touch docs/build/html/.nojekyll

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/build/html'

deploy:
# Only deploy on push to main or release tags
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,5 @@ Processing units include dimensionality reduction, linear regression, and classi
This ezmsg namespace package is still highly experimental and under active development. It is not yet available on PyPI, so you will need to install it from source. The easiest way to do this is to use the `pip` command to install the package directly from GitHub:

```bash
pip install git+ssh://git@github.com/ezmsg-org/ezmsg-learn
```

Note that this package depends on a specific version of `ezmsg-sigproc` (specifically, [this branch]("70-use-protocols-for-axisarray-transformers")) that has yet to be merged and released. This may conflict with your project's separate dependency on ezmsg-sigproc. However, this specific version of ezmsg-sigproc should be backwards compatible with its main branch, so in your project you can modify the dependency on ezmsg-sigproc to point to the new branch. e.g.,

```bash
pip install git+ssh://git@github.com/ezmsg-org/ezmsg-sigproc@70-use-protocols-for-axisarray-transformers
pip install git+https://github.com/ezmsg-org/ezmsg-learn
```
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ezmsg.learn.dim\_reduce.adaptive\_decomp
========================================

.. automodule:: ezmsg.learn.dim_reduce.adaptive_decomp


.. rubric:: Classes

.. autosummary::

AdaptiveDecompSettings
AdaptiveDecompState
AdaptiveDecompTransformer
BaseAdaptiveDecompUnit
IncrementalPCASettings
IncrementalPCATransformer
IncrementalPCAUnit
MiniBatchNMFSettings
MiniBatchNMFTransformer
MiniBatchNMFUnit

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ezmsg.learn.dim\_reduce.incremental\_decomp
===========================================

.. automodule:: ezmsg.learn.dim_reduce.incremental_decomp


.. rubric:: Classes

.. autosummary::

IncrementalDecompSettings
IncrementalDecompTransformer
IncrementalDecompUnit

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ezmsg.learn.linear\_model.adaptive\_linear\_regressor
=====================================================

.. automodule:: ezmsg.learn.linear_model.adaptive_linear_regressor


6 changes: 6 additions & 0 deletions docs/source/api/generated/ezmsg.learn.linear_model.cca.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ezmsg.learn.linear\_model.cca
=============================

.. automodule:: ezmsg.learn.linear_model.cca


Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ezmsg.learn.linear\_model.linear\_regressor
===========================================

.. automodule:: ezmsg.learn.linear_model.linear_regressor


6 changes: 6 additions & 0 deletions docs/source/api/generated/ezmsg.learn.linear_model.sgd.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ezmsg.learn.linear\_model.sgd
=============================

.. automodule:: ezmsg.learn.linear_model.sgd


6 changes: 6 additions & 0 deletions docs/source/api/generated/ezmsg.learn.linear_model.slda.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ezmsg.learn.linear\_model.slda
==============================

.. automodule:: ezmsg.learn.linear_model.slda


12 changes: 12 additions & 0 deletions docs/source/api/generated/ezmsg.learn.model.cca.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ezmsg.learn.model.cca
=====================

.. automodule:: ezmsg.learn.model.cca


.. rubric:: Classes

.. autosummary::

IncrementalCCA

12 changes: 12 additions & 0 deletions docs/source/api/generated/ezmsg.learn.model.mlp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ezmsg.learn.model.mlp
=====================

.. automodule:: ezmsg.learn.model.mlp


.. rubric:: Classes

.. autosummary::

MLP

12 changes: 12 additions & 0 deletions docs/source/api/generated/ezmsg.learn.model.refit_kalman.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ezmsg.learn.model.refit\_kalman
===============================

.. automodule:: ezmsg.learn.model.refit_kalman


.. rubric:: Classes

.. autosummary::

RefitKalmanFilter

12 changes: 12 additions & 0 deletions docs/source/api/generated/ezmsg.learn.model.rnn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ezmsg.learn.model.rnn
=====================

.. automodule:: ezmsg.learn.model.rnn


.. rubric:: Classes

.. autosummary::

RNNModel

12 changes: 12 additions & 0 deletions docs/source/api/generated/ezmsg.learn.model.transformer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ezmsg.learn.model.transformer
=============================

.. automodule:: ezmsg.learn.model.transformer


.. rubric:: Classes

.. autosummary::

TransformerModel

21 changes: 21 additions & 0 deletions docs/source/api/generated/ezmsg.learn.util.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ezmsg.learn.util
================

.. automodule:: ezmsg.learn.util


.. rubric:: Functions

.. autosummary::

get_regressor

.. rubric:: Classes

.. autosummary::

AdaptiveLinearRegressor
ClassifierMessage
RegressorType
StaticLinearRegressor

56 changes: 56 additions & 0 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
API Reference
=============

This page contains the complete API reference for ``ezmsg.learn``.

.. contents:: Modules
:local:
:depth: 1

Dimensionality Reduction
-------------------------

.. autosummary::
:toctree: generated
:recursive:

ezmsg.learn.dim_reduce.incremental_decomp
ezmsg.learn.dim_reduce.adaptive_decomp

Linear Models
-------------

.. note::
The ``ezmsg.learn.linear_model`` module is deprecated. Please use ``ezmsg.learn.process`` instead.

.. autosummary::
:toctree: generated
:recursive:

ezmsg.learn.linear_model.adaptive_linear_regressor
ezmsg.learn.linear_model.linear_regressor
ezmsg.learn.linear_model.sgd
ezmsg.learn.linear_model.slda
ezmsg.learn.linear_model.cca

Models
------

.. autosummary::
:toctree: generated
:recursive:

ezmsg.learn.model.cca
ezmsg.learn.model.mlp
ezmsg.learn.model.rnn
ezmsg.learn.model.transformer
ezmsg.learn.model.refit_kalman

Utilities
---------

.. autosummary::
:toctree: generated
:recursive:

ezmsg.learn.util
Loading