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
56 changes: 56 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build & Deploy Sphinx docs
on:
push:
branches: [ main, master ]
workflow_dispatch:

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

concurrency:
group: "pages"
cancel-in-progress: true

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

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install system deps (Pandoc)
run: |
sudo apt-get update
sudo apt-get install -y pandoc

- name: Install Python deps
run: |
python -m pip install --upgrade pip
pip install sphinx furo myst-parser nbsphinx jupyter \
sphinx-copybutton sphinx-autodoc-typehints

- name: Build Sphinx HTML
working-directory: docs
run: |
sphinx-build -b html . _build/html
touch _build/html/.nojekyll

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

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# pyDynamo
![pyDynamo logo](https://ubcbraincircuits.github.io/pyDynamo/tmpLogo.png)
![pyDynamo logo](img/tmpLogo.png)

Application for the UI and analysis of neurons via **Dyna**mic **Mo**rphometrics.

Expand Down
35 changes: 10 additions & 25 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,50 +1,35 @@
# Entry point (Sphinx 8+)
root_doc = "index"


# --- Project info ---
project = "pyDynamo"
author = "Peter W. Hogg and Patrick Coleman"

# Option A: hardcode a version for now
release = "dev"
version = release

# Option B (optional): read from the installed package
# from importlib.metadata import version as _v, PackageNotFoundError
# try:
# release = _v("pydynamo-brain")
# except PackageNotFoundError:
# release = "dev"
# version = release

# --- HTML title overrides (removes the “… documentation” suffix) ---
html_title = "pyDynamo — User & API Guide"
html_short_title = "pyDynamo"

# Source types
source_suffix = {".rst": "restructuredtext", ".md": "markdown"}

# Theme + useful extensions
html_theme = "furo"

extensions = [
"myst_parser",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"sphinx_copybutton",
"sphinx_autodoc_typehints",
"nbsphinx"
"nbsphinx",
]
autosummary_generate = True
myst_enable_extensions = ["colon_fence", "deflist", "linkify"]

# You can re-enable autosummary/autodoc later if needed.
# autosummary_generate = True

# MyST: keep only what you need; 'linkify' requires an extra pip package.
myst_enable_extensions = ["colon_fence", "deflist"] # remove "linkify" for now

nbsphinx_execute = "never"
# Mock heavy GUI deps so autodoc never breaks CI
autodoc_mock_imports = ["PyQt6", "vispy", "pyNeuroTrace", "numpy", "scipy"]
nbsphinx_requirejs = False

# (Optional) Intersphinx mappings
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"numpy": ("https://numpy.org/doc/stable/", None),
Expand Down
2 changes: 1 addition & 1 deletion docs/fullstate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ Attributes
- Active channel index (default: ``0``).
* - ``drawMode``
- ``DrawMode``
- Current drawing mode (``DEFAULT``, ``PUNCTA``, ``RADII``, ``REGISTRA
- Current drawing mode (``DEFAULT``, ``PUNCTA``, ``RADII``, ``REGISTRATION``)
20 changes: 0 additions & 20 deletions index.rst

This file was deleted.

2 changes: 1 addition & 1 deletion pydynamo_brain/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tqdm
torchio
patchify
tensorflow==2.20.*
protobuf==5.28.3
protobuf==5.29.5
scikit-learn
monai
torchvision
Expand Down