| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# Licensed under a 3-clause BSD style license - see LICENSE.rst |
| 3 |
# |
| 4 |
# Astropy documentation build configuration file. |
| 5 |
# |
| 6 |
# This file is execfile()d with the current directory set to its containing dir. |
| 7 |
# |
| 8 |
# Note that not all possible configuration values are present in this file. |
| 9 |
# |
| 10 |
# All configuration values have a default. Some values are defined in |
| 11 |
# the global Astropy configuration which is loaded here before anything else. |
| 12 |
# See astropy.sphinx.conf for which values are set there. |
| 13 |
|
| 14 |
# If extensions (or modules to document with autodoc) are in another directory, |
| 15 |
# add these directories to sys.path here. If the directory is relative to the |
| 16 |
# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 17 |
# sys.path.insert(0, os.path.abspath('..')) |
| 18 |
# IMPORTANT: the above commented section was generated by sphinx-quickstart, but |
| 19 |
# is *NOT* appropriate for astropy or Astropy affiliated packages. It is left |
| 20 |
# commented out with this explanation to make it clear why this should not be |
| 21 |
# done. If the sys.path entry above is added, when the astropy.sphinx.conf |
| 22 |
# import occurs, it will import the *source* version of astropy instead of the |
| 23 |
# version installed (if invoked as "make html" or directly with sphinx), or the |
| 24 |
# version in the build directory (if "python setup.py build_sphinx" is used). |
| 25 |
# Thus, any C-extensions that are needed to build the documentation will *not* |
| 26 |
# be accessible, and the documentation will not build correctly. |
| 27 |
|
| 28 |
import os |
| 29 |
import sys |
| 30 |
import datetime |
| 31 |
from importlib import import_module |
| 32 |
|
| 33 |
try: |
| 34 |
from sphinx_astropy.conf.v1 import * # noqa |
| 35 |
except ImportError: |
| 36 |
print('ERROR: the documentation requires the sphinx-astropy package to be installed') |
| 37 |
sys.exit(1) |
| 38 |
|
| 39 |
# -- General configuration ---------------------------------------------------- |
| 40 |
|
| 41 |
# By default, highlight as Python 3. |
| 42 |
highlight_language = 'python3' |
| 43 |
|
| 44 |
# If your documentation needs a minimal Sphinx version, state it here. |
| 45 |
#needs_sphinx = '1.2' |
| 46 |
|
| 47 |
# To perform a Sphinx version check that needs to be more specific than |
| 48 |
# major.minor, call `check_sphinx_version("x.y.z")` here. |
| 49 |
# check_sphinx_version("1.2.1") |
| 50 |
|
| 51 |
# List of patterns, relative to source directory, that match files and |
| 52 |
# directories to ignore when looking for source files. |
| 53 |
exclude_patterns.append('_templates') |
| 54 |
|
| 55 |
# This is added to the end of RST files - a good place to put substitutions to |
| 56 |
# be used globally. |
| 57 |
rst_epilog += """ |
| 58 |
""" |
| 59 |
|
| 60 |
# -- Project information ------------------------------------------------------ |
| 61 |
|
| 62 |
# This does not *have* to match the package name, but typically does |
| 63 |
project = "APLpy" |
| 64 |
author = "Thomas Robitaille and Eli Bressert" |
| 65 |
copyright = '{0}, {1}'.format(datetime.datetime.now().year, author) |
| 66 |
|
| 67 |
# The version info for the project you're documenting, acts as replacement for |
| 68 |
# |version| and |release|, also used in various other places throughout the |
| 69 |
# built documents. |
| 70 |
|
| 71 |
import aplpy |
| 72 |
|
| 73 |
# The short X.Y version. |
| 74 |
version = aplpy.__version__.split('-', 1)[0] |
| 75 |
# The full version, including alpha/beta/rc tags. |
| 76 |
release = aplpy.__version__ |
| 77 |
|
| 78 |
|
| 79 |
# -- Options for HTML output -------------------------------------------------- |
| 80 |
|
| 81 |
# A NOTE ON HTML THEMES |
| 82 |
# The global astropy configuration uses a custom theme, 'bootstrap-astropy', |
| 83 |
# which is installed along with astropy. A different theme can be used or |
| 84 |
# the options for this theme can be modified by overriding some of the |
| 85 |
# variables set in the global configuration. The variables set in the |
| 86 |
# global configuration are listed below, commented out. |
| 87 |
|
| 88 |
|
| 89 |
# Add any paths that contain custom themes here, relative to this directory. |
| 90 |
# To use a different custom theme, add the directory containing the theme. |
| 91 |
#html_theme_path = [] |
| 92 |
|
| 93 |
# The theme to use for HTML and HTML Help pages. See the documentation for |
| 94 |
# a list of builtin themes. To override the custom theme, set this to the |
| 95 |
# name of a builtin theme or the name of a custom theme in html_theme_path. |
| 96 |
html_theme = 'alabaster' |
| 97 |
|
| 98 |
# Custom sidebar templates, maps document names to template names. |
| 99 |
#html_sidebars = {} |
| 100 |
|
| 101 |
# The name of an image file (relative to this directory) to place at the top |
| 102 |
# of the sidebar. |
| 103 |
#html_logo = '' |
| 104 |
|
| 105 |
# The name of an image file (within the static path) to use as favicon of the |
| 106 |
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
| 107 |
# pixels large. |
| 108 |
#html_favicon = '' |
| 109 |
|
| 110 |
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
| 111 |
# using the given strftime format. |
| 112 |
#html_last_updated_fmt = '' |
| 113 |
|
| 114 |
# The name for this set of Sphinx documents. If None, it defaults to |
| 115 |
# "<project> v<release> documentation". |
| 116 |
html_title = '{0} v{1}'.format(project, release) |
| 117 |
|
| 118 |
# Output file base name for HTML help builder. |
| 119 |
htmlhelp_basename = project + 'doc' |
| 120 |
|
| 121 |
html_logo = 'aplpy_logo.png' |
| 122 |
|
| 123 |
|
| 124 |
# -- Options for LaTeX output -------------------------------------------------- |
| 125 |
|
| 126 |
# Grouping the document tree into LaTeX files. List of tuples |
| 127 |
# (source start file, target name, title, author, documentclass [howto/manual]). |
| 128 |
latex_documents = [('index', project + '.tex', project + u' Documentation', |
| 129 |
author, 'manual')] |
| 130 |
|
| 131 |
|
| 132 |
# -- Options for manual page output ------------------------------------------- |
| 133 |
|
| 134 |
# One entry per manual page. List of tuples |
| 135 |
# (source start file, name, description, authors, manual section). |
| 136 |
man_pages = [('index', project.lower(), project + u' Documentation', |
| 137 |
[author], 1)] |
| 138 |
|
| 139 |
# -- Resolving issue number to links in changelog ----------------------------- |
| 140 |
github_issues_url = 'https://github.com/aplpy/aplpy/issues/' |
| 141 |
|
| 142 |
# Use nitpicky mode to avoid broken links in docs |
| 143 |
nitpicky = True |
| 144 |
nitpick_ignore = [('py:class', 'aplpy.layers.Layers'), |
| 145 |
('py:class', 'aplpy.regions.Regions')] |
| 146 |
|
| 147 |
# -- Turn on nitpicky mode for sphinx (to warn about references not found) ---- |
| 148 |
# |
| 149 |
# nitpicky = True |
| 150 |
# nitpick_ignore = [] |
| 151 |
# |
| 152 |
# Some warnings are impossible to suppress, and you can list specific references |
| 153 |
# that should be ignored in a nitpick-exceptions file which should be inside |
| 154 |
# the docs/ directory. The format of the file should be: |
| 155 |
# |
| 156 |
# <type> <class> |
| 157 |
# |
| 158 |
# for example: |
| 159 |
# |
| 160 |
# py:class astropy.io.votable.tree.Element |
| 161 |
# py:class astropy.io.votable.tree.SimpleElement |
| 162 |
# py:class astropy.io.votable.tree.SimpleElementWithContent |
| 163 |
# |
| 164 |
# Uncomment the following lines to enable the exceptions: |
| 165 |
# |
| 166 |
# for line in open('nitpick-exceptions'): |
| 167 |
# if line.strip() == "" or line.startswith("#"): |
| 168 |
# continue |
| 169 |
# dtype, target = line.split(None, 1) |
| 170 |
# target = target.strip() |
| 171 |
# nitpick_ignore.append((dtype, six.u(target))) |