diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..1f4c312 --- /dev/null +++ b/.github/workflows/docs.yml @@ -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 diff --git a/README.md b/README.md index d886942..645cf0e 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docs/conf.py b/docs/conf.py index 2adf87e..f9e8b46 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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), diff --git a/docs/fullstate.rst b/docs/fullstate.rst index c597aa4..e0d2d0c 100644 --- a/docs/fullstate.rst +++ b/docs/fullstate.rst @@ -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``) diff --git a/index.rst b/index.rst deleted file mode 100644 index 57d2ebb..0000000 --- a/index.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. PyDynamo master file - -Contents --------- - -.. toctree:: - :maxdepth: 2 - :caption: Table of Contents - - docRst/install - docRst/stacks - docRst/drawing - docRst/registration - docRst/puncta - docRst/analysis - docRst/model - -This project was last updated on |date|. - -.. |date| date:: diff --git a/pydynamo_brain/requirements.txt b/pydynamo_brain/requirements.txt index 01f23c0..85a4af2 100644 --- a/pydynamo_brain/requirements.txt +++ b/pydynamo_brain/requirements.txt @@ -14,7 +14,7 @@ tqdm torchio patchify tensorflow==2.20.* -protobuf==5.28.3 +protobuf==5.29.5 scikit-learn monai torchvision