From 0dad4dc3329de5ce79c2b1be3c9d6bb91ece1941 Mon Sep 17 00:00:00 2001 From: ImportanceOfBeingErnest Date: Thu, 10 May 2018 02:22:07 +0200 Subject: [PATCH] Sort gallery subsections by filename --- doc-requirements.txt | 2 +- doc/conf.py | 4 +++- doc/devel/documenting_mpl.rst | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc-requirements.txt b/doc-requirements.txt index 8276bb1b95e1..c0ee2014cf64 100644 --- a/doc-requirements.txt +++ b/doc-requirements.txt @@ -12,4 +12,4 @@ ipython ipywidgets numpydoc>=0.4 pillow -sphinx-gallery>=0.1.12 +sphinx-gallery>=0.1.13 diff --git a/doc/conf.py b/doc/conf.py index cd4045badd29..b346770db21e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -72,10 +72,11 @@ def _check_deps(): _check_deps() # Import only after checking for dependencies. -from sphinx_gallery.sorting import ExplicitOrder +from sphinx_gallery.sorting import ExplicitOrder, FileNameSortKey # This is only necessary to monkey patch the signature later on. from sphinx_gallery import gen_rst + if shutil.which('dot') is None: raise OSError( "No binary named dot - you need to install the Graph Visualization " @@ -129,6 +130,7 @@ def _check_deps(): }, 'backreferences_dir': 'api/_as_gen', 'subsection_order': ExplicitOrder(explicit_order_folders), + 'within_subsection_order': FileNameSortKey, 'min_reported_time': 1, } diff --git a/doc/devel/documenting_mpl.rst b/doc/devel/documenting_mpl.rst index 794e62239bc7..74997508a5de 100644 --- a/doc/devel/documenting_mpl.rst +++ b/doc/devel/documenting_mpl.rst @@ -42,12 +42,12 @@ using the Sphinx_ documentation generation tool. There are several extra requirements that are needed to build the documentation. They are listed in :file:`doc-requirements.txt` and listed below: -* Sphinx>=1.3, !=1.5.0, !=1.6.4 +* Sphinx>=1.3, !=1.5.0, !=1.6.4, !=1.7.3 * colorspacious * IPython * numpydoc>=0.4 * Pillow -* sphinx-gallery>=0.1.12 +* sphinx-gallery>=0.1.13 * graphviz .. note::