diff --git a/docs/Makefile b/docs/Makefile index 51d5b720e01f892dc6fe55bb209bffbe6c324f53..d4bb2cbb9eddb1bb1b4f366623044af8e4830919 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,10 +1,10 @@ # Minimal makefile for Sphinx documentation # -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SPHINXPROJ = CSEntry +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build SOURCEDIR = . BUILDDIR = _build @@ -17,4 +17,4 @@ help: # 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) \ No newline at end of file + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/_static/CS_entry_v02_blue.svg b/docs/_static/CS_entry_v02_blue.svg deleted file mode 100755 index c3cbf0e9249e38af272f0e417a6f4ebaeaa6e7d3..0000000000000000000000000000000000000000 --- a/docs/_static/CS_entry_v02_blue.svg +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> -<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" - viewBox="0 0 2560 854" style="enable-background:new 0 0 2560 854;" xml:space="preserve"> -<style type="text/css"> - .st0{fill:#0094CA;} -</style> -<g id="Layer_1"> - <g> - <path class="st0" d="M886.8,303.7c-67.8-15.7-130.9-36.1-130.9-66.2c0-18.1,18.5-44.6,72.4-44.6c75.5,0,78.5,36.1,80.1,50.6h251 - c-21.6-175.8-215.6-210.8-328-210.8c-82.9,0-160.7,19.3-220.1,53.9c2,1.5,3.9,3,5.9,4.6c67.8,54.1,114.8,131,132.4,216.5l6.2,30.1 - H527.8c35.5,45.9,101.4,77.4,175.7,95.9c163.2,49.4,226.4,55.4,226.4,101.2c0,32.5-46.2,51.8-89.3,51.8c-10.8,0-86.2,0-97-61.4 - h-8.6c-23.9,61.6-63.3,116.7-114.1,158.7c-4.1,3.4-8.4,6.7-12.6,10c70.8,39.7,159.6,52.9,229.2,52.9c189.4,0,348-86.7,348-233.6 - C1185.5,368.8,1031.5,335,886.8,303.7z"/> - <g> - <path class="st0" d="M726.2,469.6c-36.2,152-170.1,276.2-351,276.2C172.6,745.8,17,586.6,17,387.6C17,191,170.2,31.8,370.4,31.8 - c177.3,0,320.8,117,354.6,281H522.3c-21.7-45.8-61.5-94.1-144.7-94.1c-47-2.4-86.8,15.7-115.8,47c-27.7,31.4-43.4,74.8-43.4,123 - c0,97.7,63.9,170.1,159.2,170.1c83.2,0,123-48.2,144.7-89.2H726.2z"/> - </g> - <g> - <path class="st0" d="M1312.9,628.4c3.5,29.7,31.8,49.4,64.5,49.4c26.7,0,40.8-11.6,50.9-26.2h85.7c-13.6,31.3-33.3,55.5-57,71.6 - c-23.2,16.6-50.9,25.2-79.7,25.2c-80.2,0-148.2-65-148.2-148.2c0-78.2,61.5-150.3,146.7-150.3c42.9,0,79.7,16.6,105.9,44.4 - c35.3,37.8,45.9,82.7,39.3,134.1H1312.9z M1438.9,564.9c-2-13.1-19.2-44.4-62.5-44.4c-43.4,0-60.5,31.3-62.5,44.4H1438.9z"/> - <path class="st0" d="M1559.9,459.5h78.2v29.7c9.6-13.6,27.2-39.3,77.1-39.3c94.3,0,103.9,76.6,103.9,114.5v175h-83.7V586.6 - c0-30.8-6.6-58-43.9-58c-41.3,0-47.9,29.7-47.9,58.5v152.3h-83.7V459.5z"/> - <path class="st0" d="M1895.2,523.1h-41.3v-63.5h41.3v-93.3h83.7v93.3h40.3v63.5h-40.3v216.3h-83.7V523.1z"/> - <path class="st0" d="M2055.1,459.5h78.7v31.3c8.1-15.1,22.7-40.8,71.1-40.8v84.2h-3c-42.9,0-63,15.6-63,55v150.3h-83.7V459.5z"/> - <path class="st0" d="M2332.9,725.2L2229,459.5h89.2l57,162.4l53.4-162.4h88.7l-140.2,373.1h-88.7L2332.9,725.2z"/> - </g> - </g> -</g> -<g id="lines"> -</g> -<g id="rest"> -</g> -</svg> diff --git a/docs/_static/CS_entry_v02_white_512.png b/docs/_static/CS_entry_v02_white_512.png new file mode 100755 index 0000000000000000000000000000000000000000..6b16ea7338192bb2732e7ce8b25a88d79aee1dd8 Binary files /dev/null and b/docs/_static/CS_entry_v02_white_512.png differ diff --git a/docs/conf.py b/docs/conf.py index 55ae990703ec0f4b9a44353ec94e5e3493b91707..d53f0a3e30d8818ce5ea67e39ec17015b7d3acba 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,17 +1,10 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- +# Configuration file for the Sphinx documentation builder. # -# CSEntry documentation build configuration file, created by -# sphinx-quickstart on Sun Feb 4 20:26:41 2018. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- # 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 @@ -23,11 +16,22 @@ import sys sys.path.insert(0, os.path.abspath("..")) -# -- General configuration ------------------------------------------------ +# -- Project information ----------------------------------------------------- -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' +project = "CSEntry" +copyright = "2020, European Spallation Source ERIC" +author = "Benjamin Bertrand" + +try: + # CI_COMMIT_REF_NAME is defined by GitLab Runner + # The branch or tag name for which project is built + release = os.environ["CI_COMMIT_REF_NAME"] +except KeyError: + # dev mode + release = os.popen("git describe").read().strip() + + +# -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom @@ -44,68 +48,21 @@ extensions = [ # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -source_suffix = ".rst" - -# The master toctree document. -master_doc = "index" - -# General information about the project. -project = "CSEntry" -copyright = "2018, Benjamin Bertrand" -author = "Benjamin Bertrand" - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -try: - # CI_COMMIT_TAG is defined by GitLab Runner when building tags - version = os.environ["CI_COMMIT_TAG"] -except KeyError: - # dev mode - version = os.popen("git describe").read().strip() -# The full version, including alpha/beta/rc tags. -release = version - -# 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 patterns also effect to html_static_path and html_extra_path +# 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" - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - -# -- Options for HTML output ---------------------------------------------- +# -- 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" - -# 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 = "sphinx_rtd_theme" +html_logo = "_static/CS_entry_v02_white_512.png" html_theme_options = { - "logo": "CS_entry_v02_blue.svg", - "description": "Control System Entry", - "fixed_sidebar": True, + "logo_only": True, } # Add any paths that contain custom static files (such as style sheets) here, @@ -113,76 +70,6 @@ html_theme_options = { # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] -# Custom sidebar templates, must be a dictionary that maps document names -# to template names. -# -# This is required for the alabaster theme -# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars -html_sidebars = { - "**": [ - "about.html", - "navigation.html", - "relations.html", # needs 'show_related': True theme option to display - "searchbox.html", - ] -} - - -# -- Options for HTMLHelp output ------------------------------------------ - -# Output file base name for HTML help builder. -htmlhelp_basename = "CSEntrydoc" - - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, "CSEntry.tex", "CSEntry Documentation", "Benjamin Bertrand", "manual") -] - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [(master_doc, "csentry", "CSEntry Documentation", [author], 1)] - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ( - master_doc, - "CSEntry", - "CSEntry Documentation", - author, - "CSEntry", - "One line description of project.", - "Miscellaneous", - ) -] - # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { diff --git a/docs/index.rst b/docs/index.rst index b2f3223d6fd7cbda3625080743b8feac71b805ea..becba50e5b1a7c3928cc8526fd851301368e1889 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,7 +21,7 @@ Control System Entry .. image:: https://gitlab.esss.lu.se/ics-infrastructure/csentry/badges/master/coverage.svg :target: https://gitlab.esss.lu.se/ics-infrastructure/csentry -Release |version|. +Release |release|. Control System Entry is a web application that facilitates the tracking of physical items and network devices. diff --git a/requirements-dev.txt b/requirements-dev.txt index 7c3da6715b063e41adcd4aa5d333ca8e069f0fa4..d045fd50845b8841d87ce57340ff0d963fac2b00 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,5 @@ sphinx +sphinx_rtd_theme sphinxcontrib-httpdomain coverage factory_boy