Debian Codegraph @

docs/conf.py

raw
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 # 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 from datetime import datetime
14
15 import sphinx_rtd_theme # noqa
16
17 # -- Path setup --------------------------------------------------------------
18
19
20 sys.path.insert(0, os.path.abspath(".."))
21 from censys.common import __version__
22
23 # -- Project information -----------------------------------------------------
24
25 project = "Censys Python"
26 author = "Censys, Inc."
27 copyright = f"{datetime.now().year or 2021}, {author}"
28
29 # The version info for the project you're documenting, acts as replacement for
30 # |version| and |release|, also used in various other places throughout the
31 # built documents.
32 #
33 # The short X.Y version.
34 version = __version__
35 # The full version, including alpha/beta/rc tags
36 release = __version__
37
38
39 # -- General configuration ---------------------------------------------------
40
41 # Add any Sphinx extension module names here, as strings. They can be
42 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
43 # ones.
44 extensions = [
45 "sphinx.ext.autodoc",
46 "sphinx.ext.coverage",
47 "sphinx.ext.viewcode",
48 "sphinx.ext.intersphinx",
49 "sphinx.ext.autosectionlabel",
50 "sphinx.ext.napoleon",
51 "sphinx_rtd_theme",
52 "sphinx-prompt",
53 "sphinx_tabs.tabs",
54 "sphinx_copybutton",
55 "sphinxcontrib.autoprogram",
56 ]
57
58 # Add any paths that contain templates here, relative to this directory.
59 templates_path = ["_templates"]
60
61 # List of patterns, relative to source directory, that match files and
62 # directories to ignore when looking for source files.
63 # This pattern also affects html_static_path and html_extra_path.
64 exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**tests**"]
65
66 suppress_warnings = ["autosectionlabel.usage-cli"]
67
68
69 # -- Options for HTML output -------------------------------------------------
70
71 # The theme to use for HTML and HTML Help pages. See the documentation for
72 # a list of builtin themes.
73 #
74 html_theme = "sphinx_rtd_theme"
75
76 # Add any paths that contain custom static files (such as style sheets) here,
77 # relative to this directory. They are copied after the builtin static files,
78 # so a file named "default.css" will overwrite the builtin "default.css".
79 html_static_path = ["_static"]
80
81 # Theme Options
82 html_theme_options = {
83 "analytics_id": "UA-73424227-8",
84 "style_external_links": False,
85 "collapse_navigation": True,
86 }
87
88 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
89 html_show_sphinx = False
90
91
92 # -- Extension configuration -------------------------------------------------
93
94 # Sort members by type
95 # autodoc_member_order = "groupwise"
96
97 # Add mappings
98 intersphinx_mapping = {
99 "requests": ("https://requests.readthedocs.io/en/latest/", None),
100 "python": ("https://docs.python.org/3/", None),
101 }
102
103 # Prefix document path to section labels, otherwise autogenerated labels would look
104 # like 'heading' rather than 'path/to/file:heading'
105 autosectionlabel_prefix_document = True
106
107 # Define the prompt text that you’d like removed from copied text in your code blocks
108 copybutton_prompt_text = "$"
109
110 # Napoleon
111 napoleon_include_init_with_doc = False