-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] DOC examples with correct notebook style #9061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d9287ff
to
ed62ea0
Compare
Please use "Fix #issueNumber" in your PR description, this way the associated issue gets closed automatically when the PR is merged. For more details, look at this. I have edited your description but try to remember next time. |
I am not too sure this is a great use of the notebook style example: https://11259-843222-gh.circle-artifacts.com/0/home/ubuntu/scikit-learn/doc/_build/html/stable/auto_examples/linear_model/plot_lasso_model_selection.html. Basically not having the last two plots side-by-side makes it harder to compare them. See http://scikit-learn.org/0.17/auto_examples/linear_model/plot_lasso_model_selection.html for how the example looked before the notebook-style changes in sphinx-gallery. |
Thinking about it actua
8000
lly, I reckon the best course of action is to replace the 2nd ######################################
# A comment goes here by: # ####################################
# A comment goes here This way you still keep the comment as a way to structure the example and sphinx-gallery will not create a cell. |
An alternative may be RST-style headings:
|
Yeah but I'd rather do an automatic replacement to get rid of the notebook style examples that weren't intended as such (i.e. all except the cached pipeline one AFAIK). Transforming some examples to use the notebook style is possible but in other PRs, I would say. |
were you replying to me? I was not objecting to that position. |
Yes. It's just that we have some back on forth on this one at the sprint and I just wanted to make clear that I favoured the solution of not using the notebook style in this PR. |
@plagree Could you make the following changes:
Otherwise LGTM. However, I think that we should have a look to the example to improve some parts (use sphinx directives and notebook style where it makes sense). |
ed62ea0
to
7bbf4ae
Compare
Sorry for my delayed answer. Sure, I'll try to remember this "Fix #issueNumber" thing next time. @glemaitre This is done. But I guess I should change back every modification I did to the pattern proposed by @lesteve ? Not only in |
LGTM @raghavrv can you have a quick look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes. I'm merging this.
* DOC examples with correct notebook style * Modifications in examples/ to avoid unwanted notebook style * Remove last notebook style example * Space formatting to avoid notebook style
* DOC examples with correct notebook style * Modifications in examples/ to avoid unwanted notebook style * Remove last notebook style example * Space formatting to avoid notebook style
* DOC examples with correct notebook style * Modifications in examples/ to avoid unwanted notebook style * Remove last notebook style example * Space formatting to avoid notebook style
* DOC examples with correct notebook style * Modifications in examples/ to avoid unwanted notebook style * Remove last notebook style example * Space formatting to avoid notebook style
* DOC examples with correct notebook style * Modifications in examples/ to avoid unwanted notebook style * Remove last notebook style example * Space formatting to avoid notebook style
* DOC examples with correct notebook style * Modifications in examples/ to avoid unwanted notebook style * Remove last notebook style example * Space formatting to avoid notebook style
* DOC examples with correct notebook style * Modifications in examples/ to avoid unwanted notebook style * Remove last notebook style example * Space formatting to avoid notebook style
Reference Issue
Fix #8979
What does this implement/fix? Explain your changes.
A lot of examples were written with some separator of this form to make clearer:
The issue is that those separators are interpreted in sphinx-gallery and transformed to a notebook style which was not intended at first. This PR aims at fixing those bad displays.
It is at early stage of fix. The objective is to have a visualization of the fix on a few examples.