Skip to content

DOC: Fix duplicate redirect #24795

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
Dec 21, 2022
Merged

Conversation

timhoffm
Copy link
Member

The example /gallery/pyplots/dollar_ticks is included into the artists tutorial. #24054 Moved that example and added a .. redirect-from:: directive. This was then duplicated by the include.

This PR fixes the issue by moving the include start point after the redirect.

Closes #24058.

The example /gallery/pyplots/dollar_ticks is included into
the artists tutorial. matplotlib#24054 Moved that example and added
a `.. redirect-from::` directive. This was then duplicated
by the include.

This PR fixes the issue by moving the include start point
after the redirect.
@timhoffm timhoffm added this to the v3.6-doc milestone Dec 20, 2022
@jklymak
Copy link
Member

jklymak commented Dec 20, 2022

The error messages from this failing seem mysterious - do we need to improve the directive to return clearer messages, or even do basic error checking for this sort of duplication?

@timhoffm
Copy link
Member Author

timhoffm commented Dec 21, 2022

I don't think you can (reasonably simple) distinguish this error from a case where the user has explicitly written a duplicate redirect.

Let's just fix this and get on with life. If it happens more often inn the future we can always rethink whether we find a better solution.

@dstansby dstansby merged commit afa8633 into matplotlib:main Dec 21, 2022
@lumberbot-app
Copy link

lumberbot-app bot commented Dec 21, 2022

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.6.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 afa863301c25a96e9773914274c38eaa1087c9e5
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #24795: DOC: Fix duplicate redirect'
  1. Push to a named branch:
git push YOURFORK v3.6.x:auto-backport-of-pr-24795-on-v3.6.x
  1. Create a PR against branch v3.6.x, I would have named this PR:

"Backport PR #24795 on branch v3.6.x (DOC: Fix duplicate redirect)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@lumberbot-app
Copy link

lumberbot-app bot commented Dec 21, 2022

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.6.2-doc
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 afa863301c25a96e9773914274c38eaa1087c9e5
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #24795: DOC: Fix duplicate redirect'
  1. Push to a named branch:
git push YOURFORK v3.6.2-doc:auto-backport-of-pr-24795-on-v3.6.2-doc
  1. Create a PR against branch v3.6.2-doc, I would have named this PR:

"Backport PR #24795 on branch v3.6.2-doc (DOC: Fix duplicate redirect)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@timhoffm timhoffm deleted the fix-redirect-error branch December 21, 2022 22:10
@timhoffm timhoffm modified the milestones: v3.6-doc, v3.7.0 Dec 21, 2022
@timhoffm
Copy link
Member Author

If there are merge conflicts, we likely do not need to backport.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] redirect-from sphinx extension is not parallel safe
3 participants