From eec3b938fe34b1da078a16cb02d12bca665adc69 Mon Sep 17 00:00:00 2001 From: Marie-Eve Picard Date: Wed, 14 Aug 2024 10:45:42 -0400 Subject: [PATCH] Setup docs --- README.rst | 26 +++++++++++ docs/Makefile | 21 +++++++++ docs/api.rst | 6 +++ docs/conf.py | 106 ++++++++++++++++++++++++++++++++++++++++++ docs/index.rst | 12 +++++ docs/installation.rst | 4 ++ 6 files changed, 175 insertions(+) create mode 100644 README.rst create mode 100644 docs/Makefile create mode 100644 docs/api.rst create mode 100644 docs/conf.py create mode 100644 docs/index.rst create mode 100644 docs/installation.rst diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..c80b716 --- /dev/null +++ b/README.rst @@ -0,0 +1,26 @@ +physioQC +========== + +.. image:: https://img.shields.io/github/v/release/physiopy/physioqc?style=flat&logo=github&sort=semver + :target: https://github.com/physiopy/physioqc/releases +.. image:: https://readthedocs.org/projects/physioqc/badge/?version=latest + :target: http://physioqc.readthedocs.io/en/latest +.. image:: https://img.shields.io/badge/license-Apache%202-blue.svg + :target: http://www.apache.org/licenses/LICENSE-2.0 +.. image:: https://img.shields.io/codecov/c/gh/physiopy/physioqc?style=flat&label=codecov&logo=codecov + :target: https://codecov.io/gh/physiopy/physioqc +.. image:: https://img.shields.io/circleci/build/github/physiopy/physioqc?style=flat&label=circleci&logo=circleci + :target: https://circleci.com/gh/physiopy/physioqc +.. image:: https://img.shields.io/badge/python-3.7+-blue.svg + :target: https://www.python.org/downloads/ + + +``physioQC`` is a toolbox for physiological data (Automagic) Quality Control. + +.. _licensing: + +License +------- + +This template is released under The Unlicense. Commented here below a copy of the Apache 2.0 Licence, adopted by Physiopy. +Remember to change the licence of your repository as soon as you adopt the template. \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..da720e7 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,21 @@ +# 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 +SPHINXPROJ = physioqc +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/api.rst b/docs/api.rst new file mode 100644 index 0000000..a48a573 --- /dev/null +++ b/docs/api.rst @@ -0,0 +1,6 @@ +.. _api_ref: + +API +=== + +.. py:module:: physioqc \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..faadb2a --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,106 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +import os +import sys + +from datetime import datetime + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'physioqc' +author = 'the {} developers'.format(project) +copyright = '2019-{}, {}'.format(datetime.now().year, author) + +# Import project to get version info +sys.path.insert(0, os.path.abspath(os.path.pardir)) +import physioqc # noqa + +# The short X.Y version +version = physioqc.__version__ +# The full version, including alpha/beta/rc tags +release = physioqc.__version__ + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ + "matplotlib.sphinxext.plot_directive", + "sphinx.ext.autodoc", + "sphinx.ext.autosummary", + "sphinx.ext.doctest", + "sphinx.ext.intersphinx", + "sphinx.ext.mathjax", + "sphinx.ext.napoleon", + "sphinx.ext.viewcode", +] + +# Generate the API documentation when building +autosummary_generate = True +numpydoc_show_class_members = False +autoclass_content = "class" + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# The suffix(es) of source filenames. +source_suffix = ".rst" + +# The master toctree document. +master_doc = "index" + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# 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 = ["_build", "Thumbs.db", ".DS_Store"] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = "sphinx" + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +import sphinx_rtd_theme # noqa + +html_theme = "sphinx_rtd_theme" +html_show_sourcelink = False + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +html_theme_options = {} + +# 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". +html_static_path = ["_static"] + +# -- Options for HTMLHelp output --------------------------------------------- + +# Output file base name for HTML help builder. +htmlhelp_basename = "physioqc" + +# -- Extension configuration ------------------------------------------------- +intersphinx_mapping = { + "matplotlib": ("https://matplotlib.org", None), + "numpy": ("https://docs.scipy.org/doc/numpy", None), + "scipy": ("https://docs.scipy.org/doc/scipy/reference", None), +} + +plot_include_source = True +plot_formats = [("png", 90)] +plot_html_show_formats = False +plot_html_show_source_link = False diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..7d2feae --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,12 @@ + +.. include:: ../README.rst + +Contents +-------- + +.. toctree:: + :maxdepth: 1 + + installation + api + diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100644 index 0000000..802ec38 --- /dev/null +++ b/docs/installation.rst @@ -0,0 +1,4 @@ +.. _installation_setup: + +Installation and setup +====================== \ No newline at end of file