cs107-lecture-examples

Example codes used during Harvard CS107 lectures
git clone https://git.0xfab.ch/cs107-lecture-examples.git
Log | Files | Refs | README | LICENSE

conf.py (2136B)


      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 
      7 # -- Path setup --------------------------------------------------------------
      8 
      9 # If extensions (or modules to document with autodoc) are in another directory,
     10 # add these directories to sys.path here. If the directory is relative to the
     11 # documentation root, use os.path.abspath to make it absolute, like shown here.
     12 #
     13 import os
     14 import sys
     15 
     16 sys.path.insert(0, os.path.abspath('../src'))
     17 
     18 
     19 # -- Project information -----------------------------------------------------
     20 
     21 project = 'CS107 Sample Project'
     22 copyright = '2022, CS107/AC207 Teaching Staff'
     23 author = 'Fabian Wermelinger'
     24 
     25 
     26 # -- General configuration ---------------------------------------------------
     27 
     28 # Add any Sphinx extension module names here, as strings. They can be
     29 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
     30 # ones.
     31 extensions = [
     32     'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.napoleon'
     33 ]
     34 
     35 add_module_names = False
     36 
     37 autosummary_generate = True
     38 
     39 # Add any paths that contain templates here, relative to this directory.
     40 templates_path = ['_templates']
     41 
     42 # List of patterns, relative to source directory, that match files and
     43 # directories to ignore when looking for source files.
     44 # This pattern also affects html_static_path and html_extra_path.
     45 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
     46 
     47 
     48 # -- Options for HTML output -------------------------------------------------
     49 
     50 # The theme to use for HTML and HTML Help pages.  See the documentation for
     51 # a list of builtin themes.
     52 #
     53 import sphinx_rtd_theme
     54 
     55 pygments_style = 'sphinx'
     56 html_theme = 'sphinx_rtd_theme'
     57 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
     58 
     59 # Add any paths that contain custom static files (such as style sheets) here,
     60 # relative to this directory. They are copied after the builtin static files,
     61 # so a file named "default.css" will overwrite the builtin "default.css".
     62 html_static_path = ['_static']