Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
48e40cf
docs: add pufferlib-inspired API redesign proposal
RaulSimpetru Jun 23, 2026
0b634ca
docs: add kernel-core implementation plan
RaulSimpetru Jun 23, 2026
b3c379a
feat(kernel): add SimState shared buffer
RaulSimpetru Jun 23, 2026
7064909
refactor(kernel): annotate SimState.alloc dtype and return type
RaulSimpetru Jun 23, 2026
792528d
feat(kernel): add Stage and Backend protocols
RaulSimpetru Jun 23, 2026
ff87b52
feat(kernel): add Simulation lockstep driver
RaulSimpetru Jun 23, 2026
d7b3280
test(kernel): lock one-tick feedback and on_step semantics
RaulSimpetru Jun 23, 2026
466dff6
feat(kernel): add SimResult buffer-first snapshot; run() returns it
RaulSimpetru Jun 23, 2026
1e4fe1c
fix(kernel): SimResult.from_state copies force/EMG buffers (true snap…
RaulSimpetru Jun 23, 2026
0b042fb
feat(kernel): add lazy to_neo/to_nwb adapters to SimResult
RaulSimpetru Jun 23, 2026
afe1778
test(kernel): prove backend seam and hot-path import discipline
RaulSimpetru Jun 23, 2026
f89e1b5
docs(kernel): document SimResult.from_state conventions and numpy bou…
RaulSimpetru Jun 23, 2026
599a758
fix(kernel): cover spike-only to_neo t_stop and make setup idempotent
RaulSimpetru Jun 23, 2026
7b0c549
perf(examples): parallelize watanabe DC-offset Optuna across worker p…
RaulSimpetru Jun 23, 2026
205f27f
build: declare h5py in the nwb extra
RaulSimpetru Jun 23, 2026
d8762a3
docs: add mkdocs/properdocs migration design proposal
RaulSimpetru Jun 23, 2026
c147bb5
docs: add mkdocs/properdocs migration implementation plan
RaulSimpetru Jun 23, 2026
e78492e
build(docs): swap Sphinx stack for properdocs + mkdocs-gallery
RaulSimpetru Jun 23, 2026
85d222b
docs: add properdocs.yml skeleton with material theme + home page
RaulSimpetru Jun 23, 2026
29522b7
docs: add mkdocstrings API reference pages
RaulSimpetru Jun 23, 2026
d245a87
docs: migrate home, getting-started, and neo-blocks prose to markdown
RaulSimpetru Jun 23, 2026
7074fa9
docs: add executed example gallery via mkdocs-gallery
RaulSimpetru Jun 23, 2026
ca99096
ci(docs): build + deploy properdocs site to GitHub Pages; drop sphinx…
RaulSimpetru Jun 23, 2026
a1a8035
docs(gallery): default to source-only rendering (no execution)
RaulSimpetru Jun 23, 2026
8085642
docs: remove Sphinx scaffolding after properdocs migration
RaulSimpetru Jun 23, 2026
1d39f3f
docs: restore API symbols + landing content dropped in migration
RaulSimpetru Jun 23, 2026
20ed09d
docs: home shows the logo only, drop the redundant MyoGen title
RaulSimpetru Jun 23, 2026
bf73520
docs(gallery): add committed thumbnails for the example gallery
RaulSimpetru Jun 24, 2026
0be728d
docs(gallery): soften example cards (rounded corners, soft shadow)
RaulSimpetru Jun 24, 2026
2a833b9
docs(gallery): center example card titles
RaulSimpetru Jun 24, 2026
55c9756
docs(examples): shorten the spinal-network example title
RaulSimpetru Jun 24, 2026
a15d8c1
docs(examples): convert example narrative from rST to Markdown for mk…
RaulSimpetru Jun 24, 2026
8f9d2c6
docs(examples): cross-link API symbols in example narrative
RaulSimpetru Jun 24, 2026
a0c14aa
docs: never offer Jupyter notebook downloads in the gallery
RaulSimpetru Jun 26, 2026
9d65878
docs: fix reference lists rendering as run-on rST in API docs
RaulSimpetru Jun 26, 2026
a68d0c4
docs: render docstring math with MathJax instead of literal rST
RaulSimpetru Jun 26, 2026
b2323a4
docs: render Powers2017 motor-neuron kwargs as a parameter table
RaulSimpetru Jun 26, 2026
603b245
fix(neuron): make the descending-drive Poisson generator a true Poiss…
RaulSimpetru Jul 11, 2026
683529e
docs(neuron): call the Poisson generator discrete-time (exact as dt->…
RaulSimpetru Jul 12, 2026
aa6e185
docs(api): fix docstring/signature mismatches and drop leftover rST
RaulSimpetru Jul 12, 2026
0b7a160
docs(api): document deprecated RNG attrs, gamma pool, grid utils, sou…
RaulSimpetru Jul 12, 2026
83cee99
docs: sweep leftover rST from docstrings, fix chi-square tail, add ut…
RaulSimpetru Jul 12, 2026
b6cc971
chore: move kernel core + API-redesign proposal out of #19
RaulSimpetru Jul 12, 2026
68db563
docs: render example plots in deployed site + fix oversized home logo
RaulSimpetru Jul 12, 2026
334db55
docs: fix muscle.py docstring/signature mismatches (griffe warnings)
RaulSimpetru Jul 12, 2026
fea24c5
docs: suppress matplotlib non-interactive warning in example gallery
RaulSimpetru Jul 12, 2026
4a4820a
docs(examples): use non-deprecated plt.get_cmap in gallery examples
RaulSimpetru Jul 12, 2026
5742053
docs: disable tqdm progress bars in the example-gallery build
RaulSimpetru Jul 12, 2026
1c92c1c
fix: replace deprecated neuron.run() with an explicit fadvance loop
RaulSimpetru Jul 12, 2026
26eeeec
fix(examples): guard firing-rate stats against single-spike trains
RaulSimpetru Jul 12, 2026
d63f32f
Merge remote-tracking branch 'origin/main' into feat/puffer-api
RaulSimpetru Jul 12, 2026
7884ad2
fix(docs): force joblib n_jobs=1 in gallery build; wire clinical exam…
RaulSimpetru Jul 12, 2026
81b085f
ci(docs): retry gallery build past NEURON segfaults + validate comple…
RaulSimpetru Jul 12, 2026
d9fcc78
ci(docs): execute gallery only on deploy (main) + manual dispatch
RaulSimpetru Jul 12, 2026
92fdb89
fix(examples): use gamma process API in clinical PIC protocol
RaulSimpetru Jul 12, 2026
919fde7
ci(docs): execute only the tutorial galleries; paper/clinical source-…
RaulSimpetru Jul 12, 2026
f840370
docs(readme): fix logo path + doc links broken by the MkDocs migration
RaulSimpetru Jul 16, 2026
ace0160
ci(docs): scope Pages concurrency to the deploy job (review finding 6)
RaulSimpetru Jul 16, 2026
36d7245
fix(watanabe): seed worker samplers, unbias drive noise, safer defaults
RaulSimpetru Jul 16, 2026
fb74924
fix(watanabe): restore optimize timeout + unbias baseline noise (Code…
RaulSimpetru Jul 16, 2026
9d9e7dd
docs(watanabe): clarify the force objective is %MVC-normalized (revie…
RaulSimpetru Jul 16, 2026
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
86 changes: 86 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Docs

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

# NEURON + MPI system libraries: the build imports myogen for the
# mkdocstrings API reference (and supports opt-in gallery execution via
# MKDOCS_GALLERY_PLOT=true). Same set the old Sphinx docs workflow used.
- name: Install NEURON/MPI system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libegl1-mesa-dev libgtk2.0-dev \
openmpi-bin openmpi-common libopenmpi-dev \
infiniband-diags ibverbs-utils libibverbs-dev \
libfabric1 libfabric-dev libpsm2-dev librdmacm-dev

- name: Set up uv
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true

- name: Sync project + docs/nwb extras
run: uv sync --locked --group docs --extra nwb

- name: Compile NMODL mechanisms
run: uv run poe setup_myogen

- name: Build docs site
# Execute the example gallery so figures render inline in the deployed
# site (parity with the old Sphinx docs). scripts/build_docs.py wraps
# `properdocs build` with bounded retries: NEURON's native runtime state
# accumulates across mkdocs-gallery's single-process execution and
# eventually segfaults, but each executed example is md5-cached, so
# retrying resumes past the crash. The wrapper aborts if a retry makes no
# progress and validates gallery completeness before the site can deploy.
# (gallery_conf.py additionally forces joblib to n_jobs=1 so no loky
# worker processes are spawned mid-build.)
env:
# Execute the gallery (inline plots) only where the site is actually
# deployed — the push to main — plus manual dispatch for pre-merge
# testing. On pull requests the gallery is source-only so review builds
# stay fast (~10s); the slow executed build (NEURON sims + retries to
# survive state-accumulation segfaults) runs once per merge.
MKDOCS_GALLERY_PLOT: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' }}
run: uv run --group docs python scripts/build_docs.py

- name: Upload Pages artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v5
with:
path: site

deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
# Serialize only the Pages deployment — scoping this to the deploy job (not
# the whole workflow) keeps PR "Docs" checks from queueing behind a long
# main-branch executed build.
concurrency:
group: pages
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Configure Pages
uses: actions/configure-pages@v6
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v5
42 changes: 0 additions & 42 deletions .github/workflows/sphinx.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,8 @@ docs/serve_docs.sh

# Local scratch notes (kept in nexus, not the repo)
notes/

# mkdocs / properdocs build output
/site/
# mkdocs-gallery generated pages
/docs/auto_examples/
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div align="center">
<h1 style="display: flex; align-items: center; justify-content: center; gap: 10px;">
<span>Welcome to</span>
<img src="https://raw.githubusercontent.com/NsquaredLab/MyoGen/main/docs/source/_static/myogen_logo.png" height="100" alt="MyoGen Logo">
<img src="https://raw.githubusercontent.com/NsquaredLab/MyoGen/main/docs/images/myogen_logo.png" height="100" alt="MyoGen Logo">
</h1>

<h2>The modular and extensible simulation toolkit for neurophysiology</h2>
Expand All @@ -10,9 +10,9 @@
[![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
[![Version](https://img.shields.io/badge/version-0.10.1-orange.svg)](https://github.com/NsquaredLab/MyoGen)

[Installation](https://nsquaredlab.github.io/MyoGen/#installation) •
[Installation](https://nsquaredlab.github.io/MyoGen/getting-started/#install) •
[Documentation](https://nsquaredlab.github.io/MyoGen/) •
[Examples](https://nsquaredlab.github.io/MyoGen/examples.html) •
[Examples](https://nsquaredlab.github.io/MyoGen/auto_examples/01_basic/) •
[How to Cite](https://nsquaredlab.github.io/MyoGen/#how-to-cite)
</div>

Expand Down Expand Up @@ -161,7 +161,7 @@ uv add cupy-cuda12x

📖 **[Read the full documentation](https://nsquaredlab.github.io/MyoGen/)**

- [User Guide](https://nsquaredlab.github.io/MyoGen/neo_blocks_guide.html) — Working with simulation outputs
- [User Guide](https://nsquaredlab.github.io/MyoGen/neo-blocks/) — Working with simulation outputs
- [API Reference](https://nsquaredlab.github.io/MyoGen/api/) — Complete class documentation
- [Examples](examples/) — Step-by-step tutorials from recruitment to EMG

Expand Down
26 changes: 0 additions & 26 deletions docs/Makefile

This file was deleted.

60 changes: 0 additions & 60 deletions docs/README.md

This file was deleted.

7 changes: 7 additions & 0 deletions docs/api/currents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Currents

::: myogen.utils.currents.create_ramp_current
::: myogen.utils.currents.create_step_current
::: myogen.utils.currents.create_sinusoidal_current
::: myogen.utils.currents.create_sawtooth_current
::: myogen.utils.currents.create_trapezoid_current
8 changes: 8 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# API Reference

- [Top-level (`myogen`)](myogen.md)
- [Simulator](simulator.md)
- [Currents](currents.md)
- [Neuron injection & I/O](io-and-neuron.md)
- [Plotting](plotting.md)
- [Types](types.md)
17 changes: 17 additions & 0 deletions docs/api/io-and-neuron.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Neuron injection & I/O

## Current injection
::: myogen.utils.neuron.inject_currents_into_populations.inject_currents_into_populations
::: myogen.utils.neuron.inject_currents_into_populations.inject_currents_and_simulate_spike_trains

## Persistence
::: myogen.utils.continuous_saver.ContinuousSaver
::: myogen.utils.continuous_saver.convert_chunks_to_neo

## NWB export
!!! note
NWB export requires optional dependencies: `pip install myogen[nwb]`.

::: myogen.utils.nwb.export_to_nwb
::: myogen.utils.nwb.export_simulation_to_nwb
::: myogen.utils.nwb.validate_nwb
17 changes: 17 additions & 0 deletions docs/api/myogen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Top-level API (`myogen`)

## Reproducibility

Module-level state:

- **`myogen.RANDOM_GENERATOR`** — deprecated compatibility attribute; use `get_random_generator()` instead.
- **`myogen.SEED`** — deprecated compatibility attribute; use `get_random_seed()` instead.

::: myogen.set_random_seed
::: myogen.get_random_generator
::: myogen.get_random_seed
::: myogen.derive_subseed
::: myogen.load_nmodl_mechanisms
::: myogen.get_mechanism_parameters
::: myogen.validate_mechanism_parameter
::: myogen.set_mechanism_param
8 changes: 8 additions & 0 deletions docs/api/plotting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Plotting

::: myogen.utils.plotting.plot_raster_spikes
::: myogen.utils.plotting.plot_membrane_potentials
::: myogen.utils.plotting.plot_muscle_dynamics
::: myogen.utils.plotting.plot_antagonist_muscle_comparison
::: myogen.utils.plotting.plot_spindle_dynamics
::: myogen.utils.plotting.plot_gto_dynamics
53 changes: 53 additions & 0 deletions docs/api/simulator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Simulator

## Recruitment
::: myogen.simulator.RecruitmentThresholds

## Neuron populations
::: myogen.simulator.neuron.populations.AlphaMN__Pool
::: myogen.simulator.neuron.populations.DescendingDrive__Pool

`DescendingDrive_Gamma__Pool` is a backward-compatibility alias. New code should
prefer `DescendingDrive__Pool(process_type="gamma", shape=...)`.

::: myogen.simulator.neuron.populations.DescendingDrive_Gamma__Pool
::: myogen.simulator.neuron.populations.AffIa__Pool
::: myogen.simulator.neuron.populations.AffII__Pool
::: myogen.simulator.neuron.populations.AffIb__Pool
::: myogen.simulator.neuron.populations.GII__Pool
::: myogen.simulator.neuron.populations.GIb__Pool

## Network & runner
::: myogen.simulator.Network
::: myogen.simulator.SimulationRunner

## Muscle & force
::: myogen.simulator.Muscle
::: myogen.simulator.HillModel
::: myogen.simulator.ForceModel
::: myogen.simulator.ForceModelVectorized

## EMG
::: myogen.simulator.SurfaceEMG
::: myogen.simulator.IntramuscularEMG
::: myogen.simulator.SurfaceElectrodeArray
::: myogen.simulator.IntramuscularElectrodeArray

## Proprioception
::: myogen.simulator.SpindleModel
::: myogen.simulator.GolgiTendonOrganModel
::: myogen.simulator.JointDynamics

## Geometry & biomechanics
::: myogen.simulator.MuscleGeometry
::: myogen.simulator.JointGeometry
::: myogen.simulator.JointBiomechanics

## Grid / Neo utilities
::: myogen.simulator.create_grid_signal
::: myogen.simulator.signal_to_grid
::: myogen.simulator.get_electrode
::: myogen.simulator.get_row
::: myogen.simulator.get_column

The deprecated `GridAnalogSignal` compatibility class is intentionally excluded.
Loading
Loading