conf.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Configuration file for the Sphinx documentation builder.
  2. #
  3. # This file only contains a selection of the most common options. For a full
  4. # list see the documentation:
  5. # https://www.sphinx-doc.org/en/master/usage/configuration.html
  6. # -- Path setup --------------------------------------------------------------
  7. # If extensions (or modules to document with autodoc) are in another directory,
  8. # add these directories to sys.path here. If the directory is relative to the
  9. # documentation root, use os.path.abspath to make it absolute, like shown here.
  10. #
  11. import os
  12. import sys
  13. sys.path.insert(0, os.path.abspath('..'))
  14. # -- Project information -----------------------------------------------------
  15. project = 'pyOpenADR'
  16. copyright = '2020, Stan Janssen'
  17. author = 'Stan Janssen'
  18. # The full version, including alpha/beta/rc tags
  19. with open(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'VERSION')) as file:
  20. release = file.read().strip()
  21. # -- General configuration ---------------------------------------------------
  22. # Add any Sphinx extension module names here, as strings. They can be
  23. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  24. # ones.
  25. extensions = ['sphinx.ext.autodoc', 'sphinxcontrib.apidoc']
  26. apidoc_module_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'pyopenadr')
  27. apidoc_excluded_paths = [os.path.join(apidoc_module_dir, 'service'),
  28. os.path.join(apidoc_module_dir, 'config.py')]
  29. # Add any paths that contain templates here, relative to this directory.
  30. templates_path = ['_templates']
  31. # List of patterns, relative to source directory, that match files and
  32. # directories to ignore when looking for source files.
  33. # This pattern also affects html_static_path and html_extra_path.
  34. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
  35. # -- Options for HTML output -------------------------------------------------
  36. # The theme to use for HTML and HTML Help pages. See the documentation for
  37. # a list of builtin themes.
  38. #
  39. html_theme = 'alabaster'
  40. # Add any paths that contain custom static files (such as style sheets) here,
  41. # relative to this directory. They are copied after the builtin static files,
  42. # so a file named "default.css" will overwrite the builtin "default.css".
  43. html_static_path = ['_static']
  44. def setup(app):
  45. app.add_stylesheet('css/custom.css') # may also be an URL