diff --git a/docs/source/Introduction.rst b/docs/source/Introduction.rst deleted file mode 100644 index 9b7d16f..0000000 --- a/docs/source/Introduction.rst +++ /dev/null @@ -1,2 +0,0 @@ -Introduction -============ \ No newline at end of file diff --git a/docs/source/Tutorials.rst b/docs/source/Tutorials.rst deleted file mode 100644 index 84af1a4..0000000 --- a/docs/source/Tutorials.rst +++ /dev/null @@ -1,2 +0,0 @@ -Tutorials -========= \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 458895e..05b8148 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,6 +24,24 @@ # 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 --------------------------------------------------- @@ -31,11 +49,15 @@ # 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"] @@ -43,7 +65,7 @@ # 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 ------------------------------------------------- @@ -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". diff --git a/docs/source/index.rst b/docs/source/index.rst index a805d5f..5c2c701 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -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 \ No newline at end of file