Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Mnt new default dates #23188

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 3 commits into from
Jun 3, 2022
Merged

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Jun 2, 2022

PR Summary

Closes #23151

Currently date axes default to 2000-2010. A 10-year default date range seems arbitrarily large, and conflicts with the default axes limits of 0-1 (days in the units of Matplotlib numbers). This changes the default to 1970-01-01 to 1970-01-02, which for the default epoch corresponds to floats 0-1.

PR Checklist

Tests and Styling

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

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • 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).

@jklymak jklymak marked this pull request as ready for review June 2, 2022 08:01
@jklymak
Copy link
Member Author

jklymak commented Jun 2, 2022

pre-commit CI is failing again: fix end of files. Did we decide to change our linting for end of files? This passes flake8

@oscargus
Copy link
Member

oscargus commented Jun 2, 2022

Can it be an OSX issue and that the release note uses CR rather than LF (although I read that OSX has changed to use LF).

@jklymak
Copy link
Member Author

jklymak commented Jun 2, 2022

Its 2022, I hope that CR/LF wars are not still a thing. However, if they were, all my files would fail.

I think this is just an extra line is expected at the end of the file. However, if that is something want in our linting it should be in flake8 as well, or removed from the pre-commit checks.

@oscargus
Copy link
Member

oscargus commented Jun 2, 2022

One would think so, yes. Maybe flake8 doesn't check rst-files?

(And it looks like there at lease a new empty line in the rst file?)

@jklymak
Copy link
Member Author

jklymak commented Jun 2, 2022

Maybe flake8 doesn't check rst-files?

Ah, yes that's probably it... I guess I should just cave and install the pre-commit hooks

@jklymak jklymak force-pushed the mnt-new-default-dates branch from 8e540ff to e7ef666 Compare June 2, 2022 11:07
@oscargus oscargus added this to the v3.6.0 milestone Jun 2, 2022
@greglucas greglucas merged commit 028f07c into matplotlib:main Jun 3, 2022
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.

[MNT]: default date limits...
3 participants