Skip to content

Fix notebook-style examples #22406

@GaelVaroquaux

Description

@GaelVaroquaux

Describe the issue linked to the documentation

Many legitimate notebook style examples have been broken, and specifically by the following PR
#9061

List of examples to update

Note for maintainers: the content between begin/end_auto_generated is updated automatically by a script. If you edit it by hand your changes may be reverted. The script doing the update: https://gist.github.com/lesteve/478d52599d394ec5e7f56dbf0827a5e9

Here are all the examples that use patterns like # ####### (found by ag -l '# #####*\s#' examples | sort, note there may be false positives ... for I removed examples/impute/plot_missing_values.py which is using # %% but also # #### as title underlines ...):

begin_auto_generated

end_auto_generated

Suggest a potential alternative/fix

The examples need to be reviewed on a case by case, to know whether they are "notebook-syle", as in https://sphinx-gallery.github.io/stable/tutorials/plot_parse.html#sphx-glr-tutorials-plot-parse-py or not. In general, we should favor notebook-style examples, which are typically more readable.

We should probably favor the "# %%" syntax to the long line of "###"
https://sphinx-gallery.github.io/stable/syntax.html#embed-rst-in-your-example-python-files

In terms of reviewing workflow, it can be useful to to send different PRs, rather than a big PR which will be harder to review.

Pieces of advice if you are interested in working on this issue

Metadata

Metadata

Labels

DocumentationEasyWell-defined and straightforward way to resolvegood first issueEasy with clear instructions to resolve

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions