Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rename cm.py to colormaps.py.#11413

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
efiring wants to merge3 commits intomatplotlib:masterfromefiring:rename_cm

Conversation

efiring
Copy link
Member

Closes#1476.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@efiring
Copy link
MemberAuthor

This is the minimal version; actually changing all of the imports fromcm tocolormaps will touch a large number of files, and isn't urgent. First, let's see whether there is support for doing this at all.

Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

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

The colormaps module has to be added to the docs.

@@ -1,389 +1,5 @@
"""
Builtin colormaps, colormap handling utilities, and the`ScalarMappable` mixin.
This is a compatibility shim for therenamed colormaps module.
Copy link
Member

Choose a reason for hiding this comment

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

Link to the colormaps module

@ImportanceOfBeingErnest
Copy link
Member

Currently thecm module contains the public functionregister_cmap,get_cmap and theScalarMappable class.
Thecolors module contains a lot of color conversion stuff but also hosts theColormap class and its descendents, as well as all the normalizations.
So the confusing part would be that a newcolormaps.py would neither contain theColormap, nor the normalizations.

In total I'm a bit sceptical about replacing one confusion ("What doescm stand for?") with another one ("Why can't I importColormap fromcolormaps?").

If truely rearanging stuff for the better, one would rather move the colormaps and normalizations out ofcolors and intocm - then renaming that module tocolormaps would make more sense, I'd say.

timhoffm reacted with thumbs up emoji

@ImportanceOfBeingErnest
Copy link
Member

I just saw thatMEP21 says aboutcm

cm
rename the module to something more descriptive - mappables?

Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

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

This re-org makes sense to me, and I think the new name is sensible.

Moving other classes around may be desirable as well, but thats a longer process.

@timhoffm
Copy link
Member

timhoffm commentedJun 12, 2018
edited
Loading

I propose to hold this up until after the 3.0 release. If we are not absolutely sure this is the the right name, or if we want to do additional changes, that should be within one release. It would be really unfortunate to move stuff tocolormaps in 3.0 and then tomappables in 3.1.

Also saying, we‘ve cleaned up our package structure: Here is what it looks like. Is easier to sell than having a bunch of releases saying class X is now in package Y.

@jklymak
Copy link
Member

Big 👎 on "mappables" 😉. That'd be far worse than "cm" in my opinion!

Copy link
Member

@dstansbydstansby left a comment

Choose a reason for hiding this comment

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

👍 with a rebase

@tacaswelltacaswell modified the milestones:v3.1,v3.0Jun 25, 2018
@tacaswelltacaswell added the Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. labelJun 25, 2018
Copy link
Member

@tacaswelltacaswell left a comment

Choose a reason for hiding this comment

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

Marking as 'request changes' as I want to have a careful think about this before it gets merged.

May make sense to (if we can to it with out circular imports) move color map and norm classes from colors intocolormaps.py as well.

We should either do the whole big move for 3.0 or push the whole thing off to 3.1.

@tacaswelltacaswell modified the milestones:v3.0,v3.1Jul 7, 2018
@tacaswell
Copy link
Member

After a bit more thought I think pushing this to 3.1 so we can do the bigger re-organization, change all the examples, etc is the right thing to do.

@NelleVNelleV removed the Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. labelJul 12, 2018
@NelleV
Copy link
Member

Because of the change of the milestone proposed by@tacaswell, I've removed the release critical tag from this PR. If this is not correct and if the PR should be still considered as release critical, please add the tag back.

@jklymakjklymak modified the milestones:v3.1.0,v3.2.0Feb 5, 2019
@jklymak
Copy link
Member

Re milestoning, but if we want to do this, we should try and actually do it 😉

@timhoffmtimhoffm modified the milestones:v3.2.0,v3.3.0Aug 16, 2019
@QuLogicQuLogic added the status: needs comment/discussionneeds consensus on next step labelApr 1, 2020
@efiring
Copy link
MemberAuthor

Support has evaporated...

@tacaswell
Copy link
Member

We discussed this on the call and agreed that this will probably cause more trouble that it was worth.

@QuLogicQuLogic removed this from thev3.3.0 milestoneApr 27, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm left review comments

@tacaswelltacaswelltacaswell requested changes

@jklymakjklymakjklymak approved these changes

@dstansbydstansbydstansby approved these changes

Assignees
No one assigned
Labels
status: needs comment/discussionneeds consensus on next step
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

should cm be renamed to colormaps?
8 participants
@efiring@ImportanceOfBeingErnest@timhoffm@jklymak@tacaswell@NelleV@dstansby@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp