8000 Release0.10.1 (#881) · rhugonnet/sphinx-gallery@a01c472 · GitHub
[go: up one dir, main page]

Skip to content

Commit a01c472

Browse files
authored
Release0.10.1 (sphinx-gallery#881)
* doc line length * version for release * update changelog
1 parent 00f3e3c commit a01c472

File tree

4 files changed

+96
-46
lines changed

4 files changed

+96
-46
lines changed

CHANGES.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,37 @@
11
Change Log
22
==========
33

4+
v0.10.1
5+
-------
6+
7+
Support for Python 3.6 dropped in this release. Requirement is Python >=3.7.
8+
9+
**Implemented enhancements:**
10+
11+
- Feature Request: ``reset_modules`` to be applied after each or all examples `#866 <https://github.com/sphinx-gallery/sphinx-gallery/issues/866>`__
12+
- Enable ``reset_modules`` to run either before or after examples, or both `#870 <https://github.com/sphinx-gallery/sphinx-gallery/pull/870>`__ (`MatthewFlamm <https://github.com/MatthewFlamm>`__)
13+
14+
**Fixed bugs:**
15+
16+
- embed_code_links throwing <exception: list indices must be integers or slices, not str> `#879 <https://github.com/sphinx-gallery/sphinx-gallery/issues/879>`__
17+
- ``0.10.0`` breaks ``sphinx_gallery.load_style`` `#878 <https://github.com/sphinx-gallery/sphinx-gallery/issues/878>`__
18+
- Add imagesg directive in load style `#880 <https://github.com/sphinx-gallery/sphinx-gallery/pull/880>`__ (`lucyleeow <https://github.com/lucyleeow>`__)
19+
- Use bools for ‘plot_gallery’ in sphinx_gallery_conf `#863 <https://github.com/sphinx-gallery/sphinx-gallery/pull/863>`__ (`timhoffm <https://github.com/timhoffm>`__)
20+
21+
**Closed issues:**
22+
23+
- Idea: make galleries out of the “testing” folder to use each unit test as an example. `#875 <https://github.com/sphinx-gallery/sphinx-gallery/issues/875>`__
24+
- Output text in dark mode is not visible `#869 <https://github.com/sphinx-gallery/sphinx-gallery/issues/869>`__
25+
- Using a .gif image works in ``.rst`` sphinx build but not inside example generated with sphinx-gallery `#868 <https://github.com/sphinx-gallery/sphinx-gallery/issues/868>`__
26+
- How to avoid capture of tqdm progress bars `#867 <https://github.com/sphinx-gallery/sphinx-gallery/issues/867>`__
27+
28+
**Merged pull requests:**
29+
30+
- DOC Add reference to sphinx-codeautolink `#874 <https://github.com/sphinx-gallery/sphinx-gallery/pull/874>`__ (`felix-hilden <https://github.com/felix-hilden>`__)
31+
- Add Neuraxle to “Who uses Sphinx-Gallery” `#873 <https://github.com/sphinx-gallery/sphinx-gallery/pull/873>`__ (`guillaume-chevalier <https://github.com/guillaume-chevalier>`__)
32+
- DOC Fix typo in dummy images doc `#871 <https://github.com/sphinx-gallery/sphinx-gallery/pull/871>`__ (`lucyleeow <https://github.com/lucyleeow>`__)
33+
- CI: Fix CircleCI `#865 <https://github.com/sphinx-gallery/sphinx-gallery/pull/865>`__ (`larsoner <https://github.com/larsoner>`__)
34+
435
v0.10.0
536
-------
637

doc/advanced.rst

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ that are useful for Sphinx-Gallery.
2020
Cleaning the gallery files
2121
--------------------------
2222

23-
Once your gallery is working you might need completely remove all generated files by
24-
Sphinx-Gallery to have a clean build. For this we recommend adding the following
25-
to your Sphinx ``Makefile``:
23+
Once your gallery is working you might need completely remove all generated
24+
files by Sphinx-Gallery to have a clean build. For this we recommend adding the
25+
following to your Sphinx ``Makefile``:
2626

2727
.. code-block:: bash
2828
@@ -393,9 +393,9 @@ function (see :ref:`reset_modules`).
393393
examples themselves is discouraged due to the inconsistency
394394
that results between the rendered examples and local outputs.
395395

396-
If the custom function needs to be aware of whether it is being run before or after
397-
an example, a function signature with three parameters can be used, where the third parameter
398-
is required to be named ``when``::
396+
If the custom function needs to be aware of whether it is being run before or
397+
after an example, a function signature with three parameters can be used, where
398+
the third parameter is required to be named ``when``::
399399

400400
def reset_mpl(gallery_conf, fname, when):
401401

@@ -404,10 +404,12 @@ is required to be named ``when``::
404404
if when == 'after' and fname=='dashed_lines':
405405
mpl.rcParams['lines.linestyle'] = '-'
406406

407-
The value passed into ``when`` can be ``before`` or ``after``.
408-
If ``reset_modules_order`` in the :ref:`configuration <reset_modules_order>` is set to ``before`` or
409-
``after``, ``when`` will always be the same value. This function signature
410-
is only useful when used in conjuction with ``reset_modules_order`` set to ``both``.
407+
The value passed into ``when`` can be ``'before'`` or ``'after'``.
408+
If ``reset_modules_order`` in the :ref:`configuration <reset_modules_order>`
409+
is set to ``'before'`` or ``'after'``, ``when`` will always be the same value
410+
as what ``reset_modules_order`` is set to.
411+
This function signature is only useful when used in conjuction with
412+
``reset_modules_order`` set to ``'both'``.
411413

412414
Altering Sphinx-Gallery CSS
413415
===========================

doc/configuration.rst

Lines changed: 52 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,18 @@ instead of ``'/'`` if they want to be agnostic to the operating system.
151151

152152
The ``filename_pattern`` option is also useful if you want to build only a
153153
subset of the examples. For example, you may
154-
want to build only one example so that you can link it in the documentation. In that case,
155-
you would do::
154+
want to build only one example so that you can link it in the documentation.
155+
In that case, you would do::
156156

157157
sphinx_gallery_conf = {
158158
...
159159
'filename_pattern': r'plot_awesome_example\.py',
160160
}
161161

162-
Here, one should escape the dot ``r'\.'`` as otherwise python `regular expressions`_ matches any character. Nevertheless, as
163-
one is targeting a specific file, it would match the dot in the filename even without this escape character.
162+
Here, one should escape the dot ``r'\.'`` as otherwise python
163+
`regular expressions`_ matches any character. Nevertheless, as
164+
one is targeting a specific file, it would match the dot in the filename even
165+
without this escape character.
164166

165167
.. note::
166168
Sphinx-Gallery only re-runs examples that have changed (according to their
@@ -173,20 +175,21 @@ Similarly, to build only examples in a specific directory, you can do::
173175
'filename_pattern': '/directory/plot_',
174176
}
175177

176-
Alternatively, you can skip executing some examples. For example, to skip building examples
177-
starting with ``plot_long_examples_``, you would do::
178+
Alternatively, you can skip executing some examples. For example, to skip
179+
building examples starting with ``plot_long_examples_``, you would do::
178180

179181
sphinx_gallery_conf = {
180182
...
181183
'filename_pattern': '/plot_(?!long_examples)',
182184
}
183185

184-
As the patterns are parsed as `regular expressions`_, users are advised to consult the
185-
`regular expressions`_ module for more details.
186+
As the patterns are parsed as `regular expressions`_, users are advised to
187+
consult the `regular expressions`_ module for more details.
186188

187189
.. note::
188190
Remember that Sphinx allows overriding ``conf.py`` values from the command
189-
line, so you can for example build a single example directly via something like:
191+
line, so you can for example build a single example directly via something
192+
like:
190193

191194
.. code-block:: console
192195
@@ -950,7 +953,8 @@ Generate Binder links for gallery notebooks (experimental)
950953

951954
Sphinx-Gallery automatically generates Jupyter notebooks for any
952955
examples built with the gallery. `Binder <https://mybinder.org>`_ makes it
953-
possible to create interactive GitHub repositories that connect to cloud resources.
956+
possible to create interactive GitHub repositories that connect to cloud
957+
resources.
954958

955959
If you host your documentation on a GitHub repository, it is possible to
956960
auto-generate a Binder link for each notebook. Clicking this link will
@@ -983,12 +987,17 @@ dictionary following the pattern below::
983987
}
984988
}
985989

986-
If a Sphinx-Gallery configuration for Binder is discovered, the following extra things will happen:
987-
988-
1. The dependency files specified in ``dependencies`` will be copied to a ``binder/`` folder in your built documentation.
989-
2. The built Jupyter Notebooks from the documentation will be copied to a folder called ``<notebooks_dir/>`` at the root of
990-
your built documentation (they will follow the same folder hierarchy within the notebooks directory folder.
991-
3. The rST output of each Sphinx-Gallery example will now have a ``launch binder`` button in it.
990+
If a Sphinx-Gallery configuration for Binder is discovered, the following extra
991+
things will happen:
992+
993+
1. The dependency files specified in ``dependencies`` will be copied to a
994+
``binder/`` folder in your built documentation.
995+
2. The built Jupyter Notebooks from the documentation will be copied to a
996+
folder called ``<notebooks_dir/>`` at the root of
997+
your built documentation (they will follow the same folder hierarchy within
998+
the notebooks directory folder.
999+
3. The rST output of each Sphinx-Gallery example will now have a
1000+
``launch binder`` button in it.
9921001
4. That button will point to a binder link with the following structure
9931002

9941003
.. code-block:: html
@@ -1003,23 +1012,29 @@ repo (type: string)
10031012
The GitHub repository where your documentation is stored.
10041013
ref (type: string)
10051014
A reference to the version of your repository where your documentation exists.
1006-
For example, if your built documentation is stored on a ``gh-pages`` branch, then this field
1007-
should be set to ``gh-pages``.
1015+
For example, if your built documentation is stored on a ``gh-pages`` branch,
1016+
then this field should be set to ``gh-pages``.
10081017
binderhub_url (type: string)
1009-
The full URL to a BinderHub deployment where you want your examples to run. One
1010-
public BinderHub deployment is at ``https://mybinder.org``, though if you (and your users) have access to
1011-
another, this can be configured with this field.
1018+
The full URL to a BinderHub deployment where you want your examples to run.
1019+
One public BinderHub deployment is at ``https://mybinder.org``, though if you
1020+
(and your users) have access to another, this can be configured with this
1021+
field.
10121022
dependencies (type: list)
1013-
A list of paths (relative to ``conf.py``) to dependency files that Binder uses to infer the environment needed
1014-
to run your examples. For example, a ``requirements.txt`` file. These will be copied into a folder
1015-
called ``binder/`` in your built documentation folder. For a list of all the possible dependency files
1016-
you can use, see `the Binder configuration documentation <https://mybinder.readthedocs.io/en/latest/config_files.html#config-files>`_.
1023+
A list of paths (relative to ``conf.py``) to dependency files that Binder uses
1024+
to infer the environment needed to run your examples. For example, a
1025+
``requirements.txt`` file. These will be copied into a folder called
1026+
``binder/`` in your built documentation folder. For a list of all the possible
1027+
dependency files you can use, see `the Binder configuration documentation
1028+
<https://mybinder.readthedocs.io/en/latest/config_files.html#config-files>`_.
10171029
filepath_prefix (type: string | None, default: ``None``)
1018-
A prefix to append to the filepath in the Binder links. You should use this if you will store your built
1019-
documentation in a sub-folder of a repository, instead of in the root.
1030+
A prefix to append to the filepath in the Binder links. You should use this if
1031+
you will store your built documentation in a sub-folder of a repository,
1032+
instead of in the root.
10201033
notebooks_dir (type: string, default: ``notebooks``)
1021-
The name of a folder where the built Jupyter notebooks will be copied. This ensures that all the notebooks are
1022-
in one place (though they retain their folder hierarchy) in case you'd like users to browse multiple notebook examples in one session.
1034+
The name of a folder where the built Jupyter notebooks will be copied. This
1035+
ensures that all the notebooks are in one place (though they retain their
1036+
folder hierarchy) in case you'd like users to browse multiple notebook
1037+
examples in one session.
10231038
use_jupyter_lab (type: bool, default: ``False``)
10241039
Whether the default interface activated by the Binder link will be for
10251040
Jupyter Lab or the classic Jupyter Notebook interface.
@@ -1142,9 +1157,9 @@ This is converted to html by the custom directive as::
11421157
This leads to a larger website, but clients that support the ``srcset`` tag will only
11431158
download the appropriate-sized images.
11441159

1145-
Note that the ``.. image-sg`` directive currently ignores other ``.. image`` directive
1146-
tags like ``width``, ``height``, and ``align``. It also only works with the *html* and
1147-
*latex* builders.
1160+
Note that the ``.. image-sg`` directive currently ignores other ``.. image``
1161+
directive tags like ``width``, ``height``, and ``align``. It also only works
1162+
with the *html* and *latex* builders.
11481163

11491164
.. _image_scrapers:
11501165

@@ -1381,8 +1396,8 @@ by including in your ``Makefile``:
13811396
@echo
13821397
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
13831398
1384-
Remember that for ``Makefile`` white space is significant and the indentation are tabs
1385-
and not spaces.
1399+
Remember that for ``Makefile`` white space is significant and the indentation
1400+
are tabs and not spaces.
13861401

13871402
Alternatively, you can add the ``abort_on_example_error`` option to
13881403
the ``sphinx_gallery_conf`` dictionary inside your ``conf.py``
@@ -1425,7 +1440,9 @@ the example script.
14251440
Never fail the build on error
14261441
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14271442

1428-
Sphinx-Gallery can be configured to only log warnings when examples fail. This means that sphinx will only exit with a non-zero exit code if the ``-W`` flag is passed to ``sphinx-build``. This can be enabled by setting::
1443+
Sphinx-Gallery can be configured to only log warnings when examples fail.
1444+
This means that sphinx will only exit with a non-zero exit code if the ``-W``
1445+
flag is passed to ``sphinx-build``. This can be enabled by setting::
14291446

14301447
sphinx_gallery_conf = {
14311448
...

sphinx_gallery/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import os
77
# dev versions should have "dev" in them, stable should not.
88
# doc/conf.py makes use of this to set the version drop-down.
9-
__version__ = '0.11.0.dev0'
9+
__version__ = '0.10.1'
1010

1111

1212
def glr_path_static():

0 commit comments

Comments
 (0)
0