Skip to content

Document how to create sphinx-gallery references to examples #19774

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

Merged
merged 1 commit into from
Mar 26, 2021

Conversation

timhoffm
Copy link
Member

Closes #19232.

  • Description.
  • One example how this looks like.

I will create a good first issue to migrate all existing reference blocks to the new format once this PR is merged.

@jklymak
Copy link
Member

jklymak commented Mar 25, 2021

Does this create a back reference in matplotlib.axes.Axes.fill listing this as an "Examples that contain matplotlib.axes.Axes.fill?

@jklymak
Copy link
Member

jklymak commented Mar 25, 2021

... and for some reason it seems like it is not building the docs?

matplotlib.pyplot.fill
matplotlib.axes.Axes.axis
matplotlib.pyplot.axis
# - `matplotlib.axes.Axes.fill` / `matplotlib.pyplot.fill`
Copy link
Member

Choose a reason for hiding this comment

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

I'll block because I don't think this creates the backlinks in matplotlib.axes.Axes.fill that are the point of this block... (https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.fill.html#examples-using-matplotlib-axes-axes-fill)

@jklymak jklymak dismissed their stale review March 26, 2021 00:06

It does work! Magic!

@jklymak
Copy link
Member

jklymak commented Mar 26, 2021

This does work. I am 98% sure that backlink like this did not used to work, so what changed?

https://55483-1385122-gh.circle-artifacts.com/0/doc/build/html/gallery/lines_bars_and_markers/fill.html#sphx-glr-gallery-lines-bars-and-markers-fill-py

@QuLogic QuLogic added this to the v3.5.0 milestone Mar 26, 2021
@QuLogic QuLogic merged commit 7cc1e72 into matplotlib:master Mar 26, 2021
@timhoffm timhoffm deleted the doc-references branch March 26, 2021 00:55
timhoffm added a commit to timhoffm/matplotlib that referenced this pull request Mar 27, 2021
@timhoffm timhoffm mentioned this pull request Mar 27, 2021
@timhoffm
Copy link
Member Author

@meeseeksdev backport to v.3.4.0-doc

@lumberbot-app
Copy link

lumberbot-app bot commented Mar 27, 2021

Something went wrong ... Please have a look at my logs.

It seem that the branch you are trying to backport to does not exists.

timhoffm added a commit to timhoffm/matplotlib that referenced this pull request Mar 27, 2021
@timhoffm
Copy link
Member Author

@meeseeksdev backport to v3.4.0-doc

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 27, 2021
timhoffm added a commit to timhoffm/matplotlib that referenced this pull request Mar 28, 2021
timhoffm added a commit that referenced this pull request Mar 28, 2021
…774-on-v3.4.0-doc

Backport PR #19774 on branch v3.4.0-doc (Document how to create sphinx-gallery references to examples)
timhoffm added a commit to timhoffm/matplotlib that referenced this pull request Mar 28, 2021
timhoffm added a commit to timhoffm/matplotlib that referenced this pull request Mar 28, 2021
@QuLogic QuLogic modified the milestones: v3.5.0, v3.4-doc Mar 29, 2021
@QuLogic
Copy link
Member

QuLogic commented Mar 29, 2021

I'm not sure this really needed to be backported, but okay.

@jklymak
Copy link
Member

jklymak commented Mar 29, 2021

I actually added this milestone a while ago, but I'm not sure what the goal of a doc milestone is, so maybe should not have.

@QuLogic
Copy link
Member

QuLogic commented Mar 29, 2021

The -doc milestone is for stuff that needs to be on the website while built against v3.4.0 (which is why changes to .py files should not be done on said milestone, as they would have no effect.)

timhoffm added a commit to timhoffm/matplotlib that referenced this pull request Apr 1, 2021
Follow-up to matplotlib#19774.

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
timhoffm added a commit to timhoffm/matplotlib that referenced this pull request Apr 1, 2021
Follow-up to matplotlib#19774.

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
timhoffm added a commit to timhoffm/matplotlib that referenced this pull request Apr 1, 2021
timhoffm added a commit to timhoffm/matplotlib that referenced this pull request Apr 2, 2021
timhoffm added a commit to timhoffm/matplotlib that referenced this pull request Apr 2, 2021
timhoffm added a commit to timhoffm/matplotlib that referenced this pull request Apr 3, 2021
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Apr 30, 2021
With matplotlib#19774, there's no need to ignore E402 in examples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document how to write a References section in examples
3 participants