Skip to content
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

Remove viridis #1136

Closed
dopplershift opened this issue Aug 26, 2019 · 2 comments · Fixed by #1178
Closed

Remove viridis #1136

dopplershift opened this issue Aug 26, 2019 · 2 comments · Fixed by #1178
Labels
Area: Plots Pertains to producing plots Type: API Change Changes to how existing functionality works Type: Maintenance Updates and clean ups (but not wrong)
Milestone

Comments

@dopplershift
Copy link
Member

So now that our minimum matplotlib is guaranteed to have the "viridis" colormap, we should remove our own copy of it. Now...is this worth deprecating? If so we'd have to:

  1. Add a custom __getitem__ to ColortableRegistry since it inherits from dict
  2. Look for 'viridis' and issue a MetpyDeprecationWarning if someone asks for it.

I'm tempted to avoid that work and just remove it. Either way, the NEXRAD_Level_2_File.py will need updating to just pull it from matplotlib.

@dopplershift dopplershift added Type: Maintenance Updates and clean ups (but not wrong) Area: Plots Pertains to producing plots Type: API Change Changes to how existing functionality works labels Aug 26, 2019
@dopplershift dopplershift added this to the 0.11 milestone Aug 26, 2019
@zbruick
Copy link
Contributor

zbruick commented Aug 26, 2019

Could we somehow add an error message saying to import it from matplotlib if a user calls it (i.e. if we rip it out, just add a custom ImportError message)? Or to do any sort of warning/error, we have to go through this work? It does seem like a decent amount of work...I don't know how often people are using this still, if giving a migration path is worth the work.

@dopplershift
Copy link
Member Author

Unfortunately, there is no way to get any message without hooking into __getitem__. It's not a ton of work, just a dozen or so lines to add just to get an error out. If we think our users need it, then they need it, and we can add. It might be the nice thing to do regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Plots Pertains to producing plots Type: API Change Changes to how existing functionality works Type: Maintenance Updates and clean ups (but not wrong)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants