Navigation

  • index
  • modules |
  • next |
  • previous |
  • Sphinx-Gallery 0.1.13-git documentation »
  • Sphinx-Gallery API Reference »

sphinx_gallery.gen_gallery¶

Sphinx-Gallery Generator¶

Attaches Sphinx-Gallery to Sphinx in order to generate the galleries when building the documentation.

Functions¶

sphinx_gallery.gen_gallery.clean_gallery_out(build_dir)¶

Deletes images under the sphx_glr namespace in the build directory

sphinx_gallery.gen_gallery.generate_gallery_rst(app)¶

Generate the Main examples gallery reStructuredText

Start the sphinx-gallery configuration and recursively scan the examples directories in order to populate the examples gallery

sphinx_gallery.gen_gallery.get_default_config_value(key)¶
sphinx_gallery.gen_gallery.get_subsections(srcdir, examples_dir, sortkey)¶

Returns the list of subsections of a gallery

Parameters:
  • srcdir (str) – absolute path to directory containing conf.py
  • examples_dir (str) – path to the examples directory relative to conf.py
  • sortkey (callable) – The sort key to use.
Returns:

out – sorted list of gallery subsection folder names

Return type:

list

sphinx_gallery.gen_gallery.parse_config(app)¶

Process the Sphinx Gallery configuration

sphinx_gallery.gen_gallery.setup(app)¶

Setup sphinx-gallery sphinx extension

sphinx_gallery.gen_gallery.setup_module()¶
sphinx_gallery.gen_gallery.sumarize_failing_examples(app, exception)¶

Collects the list of falling examples during build and prints them with the traceback

Raises ValueError if there where failing examples

sphinx_gallery.gen_gallery.touch_empty_backreferences(app, what, name, obj, options, lines)¶

Generate empty back-reference example files

This avoids inclusion errors/warnings if there are no gallery examples for a class / module that is being parsed by autodoc

Table Of Contents

  • sphinx_gallery.gen_gallery
    • Sphinx-Gallery Generator
      • Functions

Previous topic

Sphinx-Gallery API Reference

Next topic

sphinx_gallery.backreferences

This Page

  • Show Source

Quick search

Navigation

  • index
  • modules |
  • next |
  • previous |
  • Sphinx-Gallery 0.1.13-git documentation »
  • Sphinx-Gallery API Reference »
© Copyright 2014-2018, Óscar Nájera. Created using Sphinx 1.7.4.