Skip to content

Commit

Permalink
Merge pull request #44 from pyt-team/nina-docs-deploy
Browse files Browse the repository at this point in the history
Deploy doc website from upstream after ssh clone
  • Loading branch information
ninamiolane authored May 22, 2023
2 parents 3005ad5 + f9a7e56 commit e7adad5
Show file tree
Hide file tree
Showing 24 changed files with 1,514 additions and 172 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Docs: Check and Deploy"

on:
push:
branches: [main, github-actions-test]
pull_request:
branches: [main]
permissions:
contents: write

jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.10.11]

steps:
- uses: actions/checkout@v3
- name: Build using Python ${{matrix.python-version}}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install dependencies [pip]
run: |
pip install --upgrade pip setuptools wheel
pip install -e .[doc]
- name: Install Pandoc [apt-get]
run: |
sudo apt-get -y install pandoc
- name: Generate Docs [Sphinx]
run: |
sphinx-build -b html -D version=latest -D release=latest docs docs/_build
- name: Deploy Docs
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: main
folder: docs/_build
token: ${{ secrets.DOCUMENTATION_KEY }}
repository-name: pyt-team/pyt-team.github.io
target-folder: topomodelx
clean: true
11 changes: 5 additions & 6 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# 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
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
Expand Down
12 changes: 12 additions & 0 deletions docs/api/base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
****
Base
****

.. automodule:: topomodelx.base.aggregation
:members:

.. automodule:: topomodelx.base.conv
:members:

.. automodule:: topomodelx.base.message_passing
:members:
18 changes: 18 additions & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
=============
API Reference
=============

The API reference gives an overview of `TopoModelX`, which consists of several modules:

- `base` implements the core mathematical concepts of the package, such as the concept of message passing.
- `nn` implements neural network layers, organized by topological domains.
- `utils` implements utilities such as computing with sparse tensors.


.. toctree::
:maxdepth: 2
:caption: Packages & Modules

base
nn
utils
15 changes: 15 additions & 0 deletions docs/api/nn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
***************
Neural Networks
***************

Simplicial Complex Neural Networks
================================

.. automodule:: topomodelx.nn.simplicial
:members:

Cellular Complex Neural Networks
================================

.. automodule:: topomodelx.nn.cellular
:members:
6 changes: 6 additions & 0 deletions docs/api/utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*****
Utils
*****

.. automodule:: topomodelx.utils.scatter
:members:
94 changes: 94 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
"""Sphinx configuration file."""

project = "TopoModelX"
copyright = "2022-2023, PyT-Team, Inc."
author = "PyT-Team Authors"

extensions = [
"nbsphinx",
"nbsphinx_link",
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.githubpages",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx_gallery.load_style",
]

# Configure napoleon for numpy docstring
napoleon_google_docstring = False
napoleon_numpy_docstring = True
napoleon_use_param = False
napoleon_use_ivar = False
napoleon_use_rtype = False
napoleon_include_init_with_doc = False

# Configure nbsphinx for notebooks execution
nbsphinx_execute_arguments = [
"--InlineBackend.figure_formats={'svg', 'pdf'}",
"--InlineBackend.rc={'figure.dpi': 96}",
]

nbsphinx_execute = "never"

# To get a prompt similar to the Classic Notebook, use
nbsphinx_input_prompt = " In [%s]:"
nbsphinx_output_prompt = " Out [%s]:"

nbsphinx_allow_errors = True

templates_path = ["_templates"]

source_suffix = [".rst"]

master_doc = "index"

language = None

nbsphinx_prolog = r"""
{% set docname = env.doc2path(env.docname, base=None) %}
.. raw:: latex
\nbsphinxstartnotebook{\scriptsize\noindent\strut
\textcolor{gray}{The following section was generated from
\sphinxcode{\sphinxupquote{\strut {{ docname | escape_latex }}}} \dotfill}}
"""
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"]

pygments_style = None

html_baseurl = "pyt-team.github.io"
htmlhelp_basename = "pyt-teamdoc"
html_last_updated_fmt = "%c"

latex_elements = {}


latex_documents = [
(
master_doc,
"topomodelx.tex",
"TopoModelX Documentation",
"PyT-Team",
"manual",
),
]

man_pages = [(master_doc, "topomodelx", "TopoModelX Documentation", [author], 1)]

texinfo_documents = [
(
master_doc,
"topomodelx",
"TopoModelX Documentation",
author,
"topomodelx",
"One line description of project.",
"Miscellaneous",
),
]

epub_title = project
epub_exclude_files = ["search.html"]
Loading

0 comments on commit e7adad5

Please sign in to comment.