Repository navigation
Expand file tree
/
Copy pathconf.py
More file actions
87 lines (70 loc) · 2.5 KB
/
Copy pathconf.py
File metadata and controls
87 lines (70 loc) · 2.5 KB
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
# -*- coding: utf-8 -*-
#
# sqlalchemy_mptt documentation build configuration file, created by
# sphinx-quickstart on Wed Jun 25 14:00:12 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
from datetime import date
import os
import sys
from docutils.parsers.rst import directives
from sphinx.directives.code import CodeBlock
directives.register_directive('no-code-block', CodeBlock)
sys.path.insert(0, os.path.abspath("."))
sys.path.insert(0, os.path.abspath("../"))
# -- General configuration ------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinx.ext.mathjax',
'sphinx.ext.doctest',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'sqlalchemy_mptt'
copyright = '{}, uralbash'.format(date.today().year)
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output ----------------------------------------------
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Output file base name for HTML help builder.
htmlhelp_basename = 'sqlalchemy_mpttdoc'
html_theme_options = {
'github_button': True,
'github_user': 'uralbash',
'github_repo': 'sqlalchemy_mptt',
}
# -- Options for doctest extension ------------------------------------------
doctest_global_setup = """
from sqlalchemy import create_engine, Column, Integer, Boolean
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session
from sqlalchemy_mptt import tree_manager
from sqlalchemy_mptt.mixins import BaseNestedSets
"""
doctest_global_cleanup = """
try:
session.flush()
except NameError:
pass
"""