# 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 import os import sys from recommonmark.parser import CommonMarkParser import django # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = 'AK Planning' copyright = '2023, N. Geisler, B. Hättasch & more' author = 'N. Geisler, B. Hättasch & more' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [ 'sphinxcontrib.apidoc', # runs sphinx-apidoc automatically as part of sphinx-build 'sphinx.ext.autodoc', # the autodoc extensions uses files generated by apidoc "sphinx.ext.autosummary", "sphinxcontrib_django", 'sphinx.ext.viewcode', # enable viewing autodoc'd code ] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # -- Django specific settings ------------------------------------------------ # Add source directory to sys.path sys.path.insert(0, os.path.abspath("..")) # Configure the path to the Django settings module django_settings = "AKPlanning.settings" os.environ['DJANGO_SETTINGS_MODULE'] = django_settings django.setup() # Include the database table names of Django models django_show_db_tables = True # Boolean, default: False # Add abstract database tables names (only takes effect if django_show_db_tables is True) django_show_db_tables_abstract = True # Boolean, default: False # Auto-generate API documentation. os.environ['SPHINX_APIDOC_OPTIONS'] = "members,show-inheritance" # -- Input ---- source_parsers = { '.md': CommonMarkParser, } source_suffix = ['.rst', '.md'] # -- Extension Conf ---- autodoc_member_order = 'bysource' autodoc_inherit_docstrings = False apidoc_module_dir = '../' apidoc_output_dir = 'code' apidoc_excluded_paths = ['*/migrations', 'AKPlanning/', 'manage.py', 'docs', 'locale', 'Utils', '*/urls.py', ] apidoc_separate_modules = True apidoc_toc_file = False apidoc_module_first = True apidoc_extra_args = ['-f'] apidoc_project = project # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_static_path = ['_static'] html_theme = 'sphinx_rtd_theme'