REPOSITORY CONFIGURATION

XC-CI1/ECA3-Queckenstedt

Last change: 31.08.2021

Table of content

Repository content

TOC

Folders

atest
Contains test files.
config

Contains a CConfig class storing all repository specific values like the name of the package, the name of the author and so on.

Computes all paths to files and folders inside the repository and inside the installation location (usually the site-packages folder of the Python installation) relative to the position of the application that imports CConfig.

All documentation and setup related scripts need to import this class and need to work with the provided values to avoid duplicate definition of common parameter.

doc

Sphinx package documentation project root folder.

Contains all files related to Sphinx package documentation:

  • Sphinx project files (conf.py, index.rst)
  • Additional documentation source files in reStructuredText format (.rst), pictures, LaTeX addons, ...
  • The generated package documentation itself (formats: HTML, TEX, PDF)
doc/_static
Do not remove; required by Sphinx.
doc/_templates
Do not remove; required by Sphinx.
doc/_build/html
Sphinx output: HTML version of package documentation.
doc/_build/latex

Sphinx output: LaTeX and PDF version of package documentation.

The PDF version requires a LaTeX installation under %ROBOTLATEXPATH%/miktex/bin/x64/pdflatex.exe together with self.__bGenPDFSupported = True (default).

This is defined in config/CConfig.py.

doc/additional_doc

Additional files in reStructuredText format that have to be added to the package documentation (additionally to the content of the docstrings of the documented Python modules within the package).

Files inside this folder have to be listed within doc/index.rst.

doc/images

Images to be added to the package documentation.

The intention behind this is to have the possibility to add pictures to additional files within doc/additional_doc.

Caution: The links to picture files have to be absolute! The reference is the root path of the Sphinx documentation project (doc) and not the position of the document that imports the picture!

Sphinx puts the documentation into doc/_build/html and doc/_build/latex. These are complete different locations than the root folders doc/additional_doc and doc/images. While generating the documentation Sphinx takes care about a proper conversion of all links to imported pictures (also the pictures are copied; the content of doc/_build is standalone)!

Example: How to import a picture within an additional rst file:

.. image:: /images/DocTest.jpg

Impediment: LaTeX does not support bitmaps (in opposite to HTML). Please use the jpg or png format for imported pictures.

<package name>
The Python package itself

TOC

Files

setup.py

Extended package installation.

Includes the call of sphinx-makeall.py.

Also all destination folders are deleted at the beginning.

Package installation:

  • %ROBOTPYTHONPATH%/Lib/site-packages/<package name>

Package documentation installation:

  • %ROBOTPYTHONPATH%/Lib/site-packages/<package name>_doc
sphinx-makeall.py

Generates the package documentation.

Access:

  • doc/_build/html/index.html
  • doc/_build/latex/*.tex
  • doc/_build/latex/*.pdf

Previous output is deleted at the beginning.

config/CConfig.py
The repository configuration contains all repository specific information like the name of the Python package and the name of the author, and also computes the paths to files and folders needed by sphinx-makeall.py and setup_ext.py.
conf.py
The configuration file for the Sphinx documentation builder. Contains also repository specific adaptions that must be done manually (this file does not use config/CConfig.py).
index.rst

The Sphinx documentation master file.

Settings to make here:

  • Include additional rst files (if required)
  • List the names of all Python modules of the package (that shall be part of the package documentation)
  • Define the structure of the table of content of the package documentation

TOC

Preconditions

TOC

Additional hints

TOC

How to start?

TOC

References

For further details about documentation please refer to:

https://devguide.python.org/documenting/

https://docutils.sourceforge.io/docs/ref/rst/directives.html

https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html

https://docutils.sourceforge.io/docs/user/rst/quickref.html

https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet

https://www.markdownguide.org/basic-syntax/

https://www.sphinx-doc.org/en/master/usage/configuration.html

TOC