Skip to content

Add rrulewrapper to docs #23048

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
May 18, 2022
Merged

Add rrulewrapper to docs #23048

merged 1 commit into from
May 18, 2022

Conversation

oscargus
Copy link
Member

@oscargus oscargus commented May 14, 2022

PR Summary

Closes #21880
Builds on #21993

PR Checklist

Tests and Styling

  • [N/A] Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [N/A] New features are documented, with examples if plot related.
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@oscargus
Copy link
Member Author

It works, although the documentation could be more verbose:
image

@oscargus
Copy link
Member Author

Will improve the doc-strings and re-add links to rrulewrapper in the documentation.

@oscargus oscargus marked this pull request as draft May 14, 2022 14:45
@oscargus oscargus force-pushed the rrulewrapperdocs branch from 1ddb753 to 2915f1f Compare May 15, 2022 13:23
@oscargus oscargus marked this pull request as ready for review May 15, 2022 13:25
@oscargus oscargus force-pushed the rrulewrapperdocs branch from 2915f1f to 843181b Compare May 17, 2022 08:44
@oscargus oscargus force-pushed the rrulewrapperdocs branch from 843181b to 3b53e9d Compare May 17, 2022 11:56
@oscargus
Copy link
Member Author

@@ -981,16 +981,28 @@ def __call__(self, x, pos=None):

class rrulewrapper:
"""
A simple wrapper around a ``dateutil.rrule`` allowing flexible
A simple wrapper around a `dateutil.rrule` allowing flexible
date tick specifications.
Copy link
Member

Choose a reason for hiding this comment

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

Can we add some clue here as to how this is supposed to be used? There are no documented methods on the class, which is probably fine, but as it stands this is kind of mysterious. Maybe:

Suggested change
date tick specifications.
date tick specifications. Usually passed upon init to a subclass of `RRuleLocator`.

I will say that adding this wrapper seems a bit cumbersome versus just passing freq, tzinfo etc to the RRuleLocator directly. If it were up to me, I'd deprecate rrulewrapper as public and get rid of it all together.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK! I do not have any strong opinions on it. Clearly people have managed without it being documented for quite some time now.

Copy link
Member

Choose a reason for hiding this comment

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

Well I doubt we will deprecate it now - lets improve the docs even if it doesn't stick around.

@jklymak
Copy link
Member

jklymak commented May 18, 2022

Lets just go ahead and merge this - I'll follow up with something to deprecate this wrapper, maybe for 3.7

@jklymak jklymak merged commit 875209e into matplotlib:main May 18, 2022
@QuLogic QuLogic added this to the v3.6.0 milestone May 18, 2022
@oscargus oscargus deleted the rrulewrapperdocs branch May 19, 2022 07:43
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.

[Doc]: rrulewrapper not included in API docs
4 participants