Skip to content

Delete redundant examples from user gallery that are also present in the annotations tutorial #25153

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

Conversation

erg0dic
Copy link
Contributor

@erg0dic erg0dic commented Feb 4, 2023

PR Summary

Tackles issue #24723. @rcomer @anntzer, which builds on the changed made by @story645 in the annotations' tutorial in the PR #23606.

I noticed there were about 7 obvious examples in the user gallery that could easily be removed so I did just that and added a

# .. redirect-from:: /gallery/userdemo/<gallery_example>

in the corresponding locations where the examples were used in the text of the annotations.py file.

I'm not sure about the format for redirects so please let me know if they need to be in the docstrings in the header of annotations.py.

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

Looks great, but I think redirects all need to be at the top, perhaps even before the title?

@erg0dic
Copy link
Contributor Author

erg0dic commented Feb 5, 2023

This is probably very late. But is there a way that I can render a local version of the docs website with the tutorials by any chance?

@jklymak
Copy link
Member

jklymak commented Feb 5, 2023

https://matplotlib.org/devdocs/devel/documenting_mpl.html#building-the-docs. Note that if you want to just build certain directories, you can run make html-skip-subdirs and add or remove subdirs from .mpl_skip_subdirs.yaml. This speeds up building the docs from many minutes to a few seconds.

@erg0dic
Copy link
Contributor Author

erg0dic commented Feb 5, 2023

Okay I think the redirects should be working now.

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

We can squash merge, but if you want some git practice would you like to squash yourself?

@jklymak
Copy link
Member

jklymak commented Feb 5, 2023

Ps if you try a squash for the first time maybe back up your branch, or at least do a git log before pushing to your fork.

@erg0dic
Copy link
Contributor Author

erg0dic commented Feb 5, 2023

Okay, I'll give it a go

@erg0dic erg0dic force-pushed the delete-annotation-tut-redundant-exs branch from 86795e3 to b533050 Compare February 5, 2023 21:31
@erg0dic
Copy link
Contributor Author

erg0dic commented Feb 6, 2023

I've squashed the commits and nothing too weird is happening from my end I think considering the commit changes and I was able to build the docs locally to the extent that covers the context of this PR. I'm not sure why some of the tests fail (the build docs' test in particular).

@erg0dic
Copy link
Contributor Author

erg0dic commented Feb 6, 2023

Okay, I think the docs build now. I don't think the codecov error is relevant. This can probably merge now.

@jklymak jklymak merged commit d1f321f into matplotlib:main Feb 6, 2023
@jklymak
Copy link
Member

jklymak commented Feb 6, 2023

I squashed this @erg0dic

Thanks for the contribution, and we hope to hear from you again.

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

Successfully merging this pull request may close these issues.

4 participants