File: conf.py

package info (click to toggle)
pygresql 1%3A6.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,944 kB
  • sloc: python: 15,052; ansic: 5,730; makefile: 16; sh: 10
file content (82 lines) | stat: -rw-r--r-- 3,201 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
# 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

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'PyGreSQL'
author = 'The PyGreSQL team'
copyright = '2024, ' + author

def project_version():
    with open('../pyproject.toml') as f:
        for d in f:
            if d.startswith("version ="):
                version = d.split("=")[1].strip().strip('"')
                return version
    raise Exception("Cannot determine PyGreSQL version")

version = release = project_version()

language = 'en'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['sphinx.ext.autodoc']

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# List of pages which are included in other pages and therefore should
# not appear in the toctree.
exclude_patterns += [
    'download/download.rst', 'download/files.rst',
    'community/mailinglist.rst', 'community/source.rst',
    'community/issues.rst', 'community/support.rst',
    'community/homes.rst']

# ignore certain warnings
# (references to some of the Python names do not resolve correctly)
nitpicky = True
nitpick_ignore = [
    ('py:' + t, n) for t, names in {
        'attr': ('arraysize', 'error', 'sqlstate', 'DatabaseError.sqlstate'),
        'class': ('bool', 'bytes', 'callable', 'callables', 'class',
                  'dict', 'float', 'function', 'int', 'iterable',
                  'list', 'object', 'set', 'str', 'tuple',
                  'False', 'True', 'None',
                  'namedtuple', 'namedtuples',
                  'decimal.Decimal',
                  'bytes/str', 'list of namedtuples', 'tuple of callables',
                  'first field', 'type of first field',
                  'Notice', 'DATETIME'),
        'data': ('defbase', 'defhost', 'defopt', 'defpasswd', 'defport',
                 'defuser'),
        'exc': ('Exception', 'IndexError', 'IOError', 'KeyError',
                'MemoryError', 'SyntaxError', 'TypeError', 'ValueError',
                'pg.InternalError', 'pg.InvalidResultError',
                'pg.MultipleResultsError', 'pg.NoResultError',
                'pg.OperationalError', 'pg.ProgrammingError'),
        'func': ('len', 'json.dumps', 'json.loads'),
        'meth': ('datetime.strptime',
                 'cur.execute',
                 'DB.close', 'DB.connection_handler', 'DB.get_regtypes',
                 'DB.inserttable', 'DB.reopen'),
        'obj': ('False', 'True', 'None')
    }.items() for n in names]



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']

html_title = f'PyGreSQL {version}'

html_logo = '_static/pygresql.png'
html_favicon = '_static/favicon.ico'