Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Doc: sg section separator#25021

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
QuLogic merged 3 commits intomatplotlib:mainfromtacaswell:doc/sg_splitter
Jan 19, 2023
Merged

Conversation

tacaswell
Copy link
Member

PR Summary

Prompted by#25016 this changes all of our SG section separators to# %% and documents that this is our preference.

jklymak reacted with thumbs up emoji
displayed, and figures are put into the built page.
displayed, and figures are put into the built page. Matplotlib uses the
``# %%`` section separator so that IDEs will identify "code cells" to make
it easy to re-run sub-sections of the example.
Copy link
Member

@rcomerrcomerJan 18, 2023
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

There is an example of a tutorial below this which still has the long line. Edit: and the description right above it talks about a line of#.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

🤦🏻 I looked for our documentation on how to split sections and was a bit surprised we did not have any. I am glad the problem was me and not our docs! Thank you for catching this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

what about adding a subsection heading at L814 "Formatting Examples" - it seems redundant in prose, but might be useful in the right hand side navigation

jklymak
jklymak previously requested changesJan 18, 2023
Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think this is fine, but I don't think we should merge until we discuss and make sure everyone is onboard with the change. So I'm just blocking until a few more people weight in with up or down thumbs or checkmarks.

My only objection is that I find it less readable, but it's not terrible.

tacaswell reacted with thumbs up emoji
@story645
Copy link
Member

My only objection is that I find it less readable, but it's not terrible.

I'm 👍 because this separator is far harder to mess up than the very long line of hashes where I'm never quite sure how many. (Yes, I mark 80 in vs code and go to that line, but I don't know if that's a thing in other editors). Also, like@tacaswell and@kolibril13 mentioned, it makes blockwise execution trivial in a bunch of IDEs and that rapid iteration is super useful.

jklymak reacted with thumbs up emoji

displayed, and figures are put into the built page.
displayed, and figures are put into the built page. Matplotlib uses the
``# %%`` section separator so that IDEs will identify "code cells" to make
it easy to re-run sub-sections of the example.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

what about adding a subsection heading at L814 "Formatting Examples" - it seems redundant in prose, but might be useful in the right hand side navigation

This is so that IDEs will auto detect "cells" and make (re) running subsections of the code easier for development and debugging.
@QuLogic
Copy link
Member

Going to ignore the Azure pipeline, as it timed out there, but didn't post the result ot GitHub, so I can't even restart it. Plus this is all docs.

@QuLogicQuLogic merged commit9c48e4b intomatplotlib:mainJan 19, 2023
@tacaswelltacaswell deleted the doc/sg_splitter branchJanuary 19, 2023 21:38
rcomer pushed a commit to rcomer/matplotlib that referenced this pull requestFeb 14, 2023
…rom examplesManual backport ofmatplotlib#25198 due to conflicts inexamples/subplots_axes_and_figures/demo_constrained_layout.pyThis was because some of the changes here were right below the sectionseparators which changed in main atmatplotlib#25021.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@story645story645story645 approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

@rcomerrcomerrcomer approved these changes

@kolibril13kolibril13kolibril13 approved these changes

@jklymakjklymakjklymak left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.8.0
Development

Successfully merging this pull request may close these issues.

7 participants
@tacaswell@story645@QuLogic@jklymak@timhoffm@rcomer@kolibril13

[8]ページ先頭

©2009-2025 Movatter.jp