Skip to content

Commit

Permalink
add tutorials to documentation website
Browse files Browse the repository at this point in the history
  • Loading branch information
huidongchen committed Aug 22, 2023
1 parent 8a9b277 commit e652fb5
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 14 deletions.
2 changes: 0 additions & 2 deletions docs/source/Introduction.rst

This file was deleted.

2 changes: 0 additions & 2 deletions docs/source/Tutorials.rst

This file was deleted.

29 changes: 27 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,48 @@
# The full version, including alpha/beta/rc tags
release = "v0.1.0"

# -- Retrieve notebooks -------------------------------

from urllib.request import urlretrieve # noqa: E402

notebooks_url = "https://github.com/pinellolab/STREAM2_tutorials/raw/main/tutorial_notebooks/" # noqa: E402
notebooks_v1_0 = [
"complex_structure.ipynb",
"supervision_ordinal.ipynb",
"supervision_categorical.ipynb",
"multiomics.ipynb",
"stream_plots.ipynb",
]

for nb in notebooks_v1_0:
try:
urlretrieve(notebooks_url + nb, nb)
except Exception:
pass

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.intersphinx",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
'sphinx.ext.napoleon',
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"nbsphinx",
]
autosummary_generate = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
exclude_patterns = ['_build']


# -- Options for HTML output -------------------------------------------------
Expand All @@ -53,6 +75,9 @@
#
html_theme = "sphinx_rtd_theme"

github_repo = 'stream2'
github_nb_repo = 'stream2_tutorials'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
Expand Down
19 changes: 11 additions & 8 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ Contents
:maxdepth: 2
:caption: Contents:

Introduction
About STREAM2
Installation
Tutorials
API


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
.. toctree::
:maxdepth: 1
:caption: Tutorials

complex_structure
supervision_ordinal
supervision_categorical
multiomics
stream_plots

0 comments on commit e652fb5

Please sign in to comment.