Skip to content
Snippets Groups Projects
Commit ab1ce635 authored by Martin Lange's avatar Martin Lange
Browse files

setup Sphinx documentation, add to CI and publish to GitLab pages

parent 0ca8195f
No related branches found
No related tags found
1 merge request!16Sphinx documentation
Pipeline #29632 passed with stage
in 54 seconds
__pycache__/
/docs/build/
/docs/finam.*
/docs/modules.rst
*.csv
stages:
- build
- deploy
check:
stage: build
before_script:
- apt-get update && apt-get install -y python3 python3-pip
- pip3 install black numpy
script:
- black . --check
- python3 -m unittest discover -s finam -v
documentation:
stage: build
before_script:
- apt-get update && apt-get install -y python3 python3-pip
- pip3 install sphinx numpy
script:
- export PYTHONPATH="."
- sphinx-apidoc -o docs finam
- sphinx-build -W -b html docs docs/build
- mv docs/build public/
artifacts:
paths:
- public
pages:
stage: deploy
script: "true"
artifacts:
paths:
- public
only:
- main
.py.sig {
padding-top: 2em;
padding-bottom: 1em;
}
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath("../finam"))
# -- Project information -----------------------------------------------------
project = "finam-prototype"
copyright = "2021, Team LandTECH"
author = "Team LandTECH"
# The full version, including alpha/beta/rc tags
release = "0.1.0"
# -- 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.autodoc", "sphinx.ext.autosummary"]
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 = []
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "alabaster"
# 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"]
html_css_files = ["custom.css"]
Welcome to the finam-prototype documentation!
=============================================
.. toctree::
:maxdepth: 4
:caption: Contents:
modules
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment