示例#1
0
plot_include_source = True
plot_formats = ['png']

# Sphinx project configuration
templates_path = ['_templates']
exclude_patterns = ['_build', '**.ipynb_checkpoints']
source_suffix = '.rst'
# The encoding of source files.
source_encoding = 'utf-8-sig'
master_doc = 'index'

# General information about the project
year = datetime.date.today().year
project = 'Harmonica'
copyright = '2018-{}, Leonardo Uieda'.format(year)
if len(full_version.split('+')) > 1 or full_version == 'unknown':
    version = 'dev'
else:
    version = full_version

# These enable substitutions using |variable| in the rst files
rst_epilog = """
.. |year| replace:: {year}
""".format(year=year)

html_last_updated_fmt = '%b %d, %Y'
html_title = project
html_short_title = project
html_logo = '_static/harmonica-logo.png'
html_favicon = '_static/favicon.png'
html_static_path = ['_static']
示例#2
0
# SPDX-License-Identifier: BSD-3-Clause
#
# This code is part of the Fatiando a Terra project (https://www.fatiando.org)
#
import os
import datetime
import sphinx_gallery
from sphinx_gallery.sorting import ExampleTitleSortKey

from harmonica.version import full_version

# Project information
# -----------------------------------------------------------------------------
project = "Harmonica"
copyright = f"2018-{datetime.date.today().year}, The {project} Developers"
if len(full_version.split("+")) > 1 or full_version == "unknown":
    version = "dev"
else:
    version = full_version

# General configuration
# -----------------------------------------------------------------------------
extensions = [
    "sphinx.ext.autodoc",
    "sphinx.ext.autosummary",
    "sphinx.ext.coverage",
    "sphinx.ext.mathjax",
    "sphinx.ext.doctest",
    "sphinx.ext.viewcode",
    "sphinx.ext.extlinks",
    "sphinx.ext.intersphinx",