Skip to content
Permalink
Browse files

Reformatted source from pre-push script

  • Loading branch information
Dean Wampler
Dean Wampler committed Dec 4, 2019
1 parent 8615bf9 commit 381e80766c13cc2ca552b5e2f04feeeb64ede48d
Showing with 8 additions and 9 deletions.
  1. +4 −7 doc/source/conf.py
  2. +4 −2 doc/source/custom_directives.py
@@ -70,17 +70,14 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinx_click.ext',
'sphinx-jsonschema',
'sphinx_gallery.gen_gallery'
'sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon',
'sphinx_click.ext', 'sphinx-jsonschema', 'sphinx_gallery.gen_gallery'
]

sphinx_gallery_conf = {
"examples_dirs": ["../examples"], # path to example scripts
"gallery_dirs": ["sections/examples/auto_examples"], # path where to save generated examples
"gallery_dirs": ["sections/examples/auto_examples"
], # path where to save generated examples
"ignore_pattern": "../examples/doc_code/",
"plot_gallery": "False",
# "filename_pattern": "tutorial.py",
@@ -76,8 +76,10 @@ def run(self):
thumb_dir = os.path.join(env.srcdir, "_static/thumbs/")
os.makedirs(thumb_dir, exist_ok=True)
image_path = os.path.join(thumb_dir, os.path.basename(figname))
real_figname = os.path.join(env.srcdir, "images", os.path.basename(figname))
sphinx_gallery.gen_rst.scale_image(real_figname, image_path, 400, 280)
real_figname = os.path.join(env.srcdir, "images",
os.path.basename(figname))
sphinx_gallery.gen_rst.scale_image(real_figname, image_path, 400,
280)
thumbnail = os.path.relpath(image_path, env.srcdir)
else:
thumbnail = "_static/img/thumbnails/default.png"

0 comments on commit 381e807

Please sign in to comment.
You can’t perform that action at this time.