예제 #1
0
    ],
    'within_subsection_order':
    FileNameSortKey,
    'filename_pattern':
    '\.py',
    'backreferences_dir':
    'api/generated/backreferences',
    'doc_module':
    'discretize',
    # 'reference_url': {'discretize': None},
}
# Do not run or scrape `pyvista` examples on Python 2 because sphinx gallery
# doesn't support custom scrapers. But also, data was pickled in Python 3
if sys.version_info[0] >= 3:
    # Requires pyvista>=0.18.0 and Python 3
    sphinx_gallery_conf["image_scrapers"] = (pyvista.Scraper(), 'matplotlib')
else:
    # Don't run pyvista examples at all on Python 2
    # Primarily because data used for it was pickled in Python 3
    sphinx_gallery_conf["filename_pattern"] = r"plot_(?!pyvista)\.py",

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'

html_context = {
예제 #2
0
# -- Sphinx Gallery Options
from sphinx_gallery.sorting import FileNameSortKey
# thumb_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'PVGeo_icon_horiz.png')
sphinx_gallery_conf = {
    # path to your examples scripts
    "examples_dirs": [
        "../../examples/",
    ],
    # path where to save gallery generated examples
    "gallery_dirs": ["examples"],
    # Patter to search for example files
    "filename_pattern": r"\.py",
    # Remove the "Download all examples" button from the top level gallery
    "download_all_examples": False,
    # Sort gallery example by file name instead of number of lines (default)
    "within_subsection_order": FileNameSortKey,
    # directory where function granular galleries are stored
    "backreferences_dir": None,
    # Modules for which function level galleries are created.  In
    "doc_module": "PVGeo",
    "image_scrapers": (pyvista.Scraper(), 'matplotlib'),
    "thumbnail_size": (350, 350),
    # 'default_thumb_file': thumb_path,
}


def setup(app):
    app.add_stylesheet("style.css")
    app.add_stylesheet("copybutton.css")