File: conf.py

package info (click to toggle)
python-marshmallow 3.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,076 kB
  • sloc: python: 10,539; makefile: 14
file content (104 lines) | stat: -rw-r--r-- 2,984 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
from collections import OrderedDict
import sys
import os
import datetime as dt

import alabaster

sys.path.insert(0, os.path.abspath(os.path.join("..", "src")))
import marshmallow  # noqa: E402

extensions = [
    "sphinx.ext.autodoc",
    "sphinx.ext.intersphinx",
    "sphinx.ext.viewcode",
    "alabaster",
]

primary_domain = "py"
default_role = "py:obj"

intersphinx_mapping = {"python": ("https://python.readthedocs.io/en/latest/", None)}

issues_github_path = "marshmallow-code/marshmallow"

templates_path = ["_templates"]

source_suffix = ".rst"
master_doc = "index"

project = "marshmallow"
copyright = (
    ' {:%Y} <a href="https://stevenloria.com">Steven Loria</a> and contributors'.format(
        dt.datetime.utcfromtimestamp(os.path.getmtime("../CHANGELOG.rst"))
    )
)

version = release = marshmallow.__version__

exclude_patterns = ["_build"]

# THEME

html_theme_path = [alabaster.get_path()]
html_theme = "alabaster"
html_static_path = ["_static"]
html_css_files = ["css/versionwarning.css"]
templates_path = ["_templates"]
html_show_sourcelink = False

html_theme_options = {
    "logo": "marshmallow-logo.png",
    "description": "Object serialization and deserialization, lightweight and fluffy.",
    "description_font_style": "italic",
    "opencollective": "marshmallow",
    "tidelift_url": (
        "https://tidelift.com/subscription/pkg/pypi-marshmallow"
        "?utm_source=marshmallow&utm_medium=referral&utm_campaign=docs"
    ),
    "code_font_size": "0.8em",
    "warn_bg": "#FFC",
    "warn_border": "#EEE",
    # Used to populate the useful-links.html template
    "extra_nav_links": OrderedDict(
        [
            ("marshmallow @ PyPI", "https://pypi.python.org/pypi/marshmallow"),
            ("marshmallow @ GitHub", "https://github.com/marshmallow-code/marshmallow"),
            ("Issue Tracker", "https://github.com/marshmallow-code/marshmallow/issues"),
            (
                "Ecosystem",
                "https://github.com/marshmallow-code/marshmallow/wiki/Ecosystem",
            ),
        ]
    ),
}

html_sidebars = {
    "index": ["about.html", "donate.html", "useful-links.html", "searchbox.html"],
    "**": [
        "about.html",
        "donate.html",
        "useful-links.html",
        "localtoc.html",
        "relations.html",
        "searchbox.html",
    ],
}

# sphinx-version-warning config
versionwarning_messages = {
    "latest": (
        "This document is for the development version. "
        'For the stable version documentation, see <a href="/en/stable/">here</a>.'
    ),
    "2.x-line": (
        "marshmallow 2 is no longer supported as of 2020-08-18. "
        '<a href="https://marshmallow.readthedocs.io/en/latest/upgrading.html#upgrading-to-3-0">'
        "Update your code to use marshmallow 3</a>."
    ),
}
# Show warning at top of page
versionwarning_body_selector = "div.document"
versionwarning_banner_title = ""
# For debugging locally
# versionwarning_project_version = "latest"