Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure documentation #27

Merged
merged 3 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ python:
path: .
extra_requirements:
- doc
system_packages: true
26 changes: 26 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -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.
21 changes: 21 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 6 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _api_ref:

API
===

.. py:module:: physioqc
106 changes: 106 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

.. include:: ../README.rst

Contents
--------

.. toctree::
:maxdepth: 1

installation
api
4 changes: 4 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. _installation_setup:

Installation and setup
======================