Myst-sphinx-gallery

Latest version: v0.3.0

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3.0

Adding gallery directives

Now, you can generate galleries directly using directives in documentation. There are three gallery directives available:
- base-gallery: Create a base gallery.
- gallery: Create a total gallery in which base galleries serve as sections.
- ref-gallery: Create a gallery which items are all references to external files.

> [!TIP]
> - ``base-gallery`` and ``gallery`` directives will create ``toctree`` nodes
> automatically. They can be called multi-times in the same document.
> You can combine them to create more complex galleries.
> - ``ref-gallery`` directive can be used in your Python docs to display the related
> examples directly. Here is an example: :[Using ref-gallery in code docs](https://myst-sphinx-gallery.readthedocs.io/en/latest/user_guide/gen_gallery/directive/index.html#ref-gallery-directive-in-code-docs).

Configuration variables

- Adding a new configuration variable ``myst_sphinx_gallery_files_config`` to
specify the configuration for each file in the gallery.
- ``myst_sphinx_gallery_config`` now can left examples and galleries
dictionaries be None, which will serve as a pure global configuration.

Deprecation

In this release, we have changed the style of the gallery cards from
the ``Sphinx-Design`` to ``Sphinx Gallery``.

Therefore, ``toc_tree``, ``grid``, and ``grid_item_card`` now not suggested
to be used by user in the gallery configuration. It will only be internally
used by program.

Besides, the style parameters, like ``margin``, ``padding``, and ``gutter``
parameters in the `Grid` and `GridItemCard` are deprecated. This can avoid
wired layout in the gallery cards with new style. Instead, we suggest to use
CSS to adjust the layout of gallery cards. More details can be found in the
[Customizing Style of Thumbnail and Card](https://myst-sphinx-gallery.readthedocs.io/en/latest/user_guide/custom.html) section.

0.2.2

Thumbnails

- `ThumbnailConfig` now supports a new option: ``max_animation_frames``, to control the maximum number of frames for the animated thumbnail. This option is useful when the animation has too many frames, saving storage space and building time.
- ``quality_animated`` changed from ``15`` to ``50`` to improve the quality of the animation thumbnail. This change will not increase the animated thumbnail file size since frames are reduced by the ``max_animation_frames`` option.

Cross-referencing

- the target of ``GALLERY_HEADER.rst`` now will be added a suffix ``_header`` to avoid conflict with the example files.

Runtime

- Now, the runtime of building the gallery will be displayed in the console output. This feature is useful when you want to know how long it takes to build the gallery and optimize the building time by changing the configuration options of thumbnails.

0.2.1

Adding

1. Add `target_prefix` config to `GalleryConfig` to customize for cross reference
2. Add target prefix for `GALLERY_HEADER.rst`
3. add `quality_static` and `quality_animated` to `ThumbnailConfig` to control quality separately.

Changes:

Black -> ruff

0.2.0

- Added support for setup through the conf.py extension list
- Added the ThumbnailConfig option, which allows customizing the size, algorithm, parameters, etc. for generating thumbnails
- Added support for customize grid and grid-item-grid

0.1.1

Refine the project and docs

0.1rc

init project test

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.