question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix notebook-style examples

See original GitHub issue

Describe the issue linked to the documentation

Many legitimate notebook style examples have been broken, and specifically by the following PR https://github.com/scikit-learn/scikit-learn/pull/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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:47 (45 by maintainers)

github_iconTop GitHub Comments

5reactions
lestevecommented, Feb 8, 2022

@ss-is-master-chief I have added a “Pieces of advice if you are interested in working on this issue” section in the top post to help you (and potentially other interested people to get started). If something is not clear let us know!

1reaction
lestevecommented, Feb 8, 2022

I have added a list of examples that uses a pattern like # ##### for comments. I think it is best to create one PR by example, this will make it easier to review changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DOC Fix notebook-style for plot_document_clustering.py by ... - GitHub
This example is indeed really old. I think that it would benefit from a full rewriting by removing all options to use it...
Read more >
How To Format A Book: 10 Tips Your Editor Wants You To Know
Tip: if you've already written your book with different line spacing, select all of your text in Word, click Format > Paragraph, then...
Read more >
How To Format A Manuscript (& Impress Your Editor)
The 15 Scribe Manuscript Format Rules · 1. Use A Standard Font (Times New Roman or Arial) · 2. Black Text on White...
Read more >
Video: Using Styles in Word - Microsoft Support
You might format a document while you type, or change fonts for things like headings. Here's a better way to get your document...
Read more >
Keeping a Lab Notebook
These examples are meant only to show the basic requirements for your lab notebook entries. As mentioned before, the ultimate decision on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found