FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove matplotlibrc.template. by anntzer · Pull Request #19603 · matplotlib/matplotlib · GitHub

Repository navigation

Remove matplotlibrc.template. - #19603

Merged
QuLogic merged 1 commit into
matplotlib:masterfrom
anntzer:mrc
Mar 31, 2021
Merged

QuLogic merged 1 commit into
matplotlib:masterfrom
anntzer:mrc

Conversation

anntzer commented Feb 28, 2021

Copy link
Copy Markdown
Contributor

PR Summary

See #19588, #19602.

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • 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).

anntzer added the Build label Feb 28, 2021
anntzer mentioned this pull request Feb 28, 2021
7 tasks

jklymak commented Feb 28, 2021

Copy link
Copy Markdown
Member

We can close #19602 if simpler, though suggest stealing some of the commentary. Also suggest the softlink so no one complains...

jklymak commented Feb 28, 2021 •
edited
Loading

Copy link
Copy Markdown
Member

More detail:

Previously matplotlibrc.template was changed in #15029 to be the canonical place to get the defaults for all the rcParams. However, these were read during __init__.py from lib/matplotlib/mpl-data/matplotlibrc. lib/matplotlib/mpl-data/matplotlibrc doesn't exist in the repo, and only gets created when setup.py is called. We can't read the defaults from matplotlbrc.template because that file probably doesn't exist in most user installs.

Aside from being somewhat rickety, the problem is that developers working from an editable install don't want to always call setup.py as it requires compiling the C extensions, and hence their lib/matplotlib/mpl-data/matplotlibrc can get out of sync with the library.

The solution here is to simply make lib/matplotlib/mpl-data/matplotlibrc the canonical source of the defaults, add it to version control, (maybe softlink it to matplotlib.template). setup.py can change lib/matplotlib/mpl-data/matplotlibrc in-place

See also:

jklymak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This seems fine to me, though I do not fully grok the setup.py changes.

Comment thread setup.py Outdated
anntzer force-pushed the mrc branch 2 times, most recently from d572ccd to 058b683 Compare March 24, 2021 10:52
Comment thread setup.py

tacaswell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

modulo making sure it is a no-op in the default case.

anntzer commented Mar 27, 2021

Copy link
Copy Markdown
Contributor Author

added a test checking the default backend.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL