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

Issue 1271 colormap on object #1523

Merged
merged 10 commits into from Sep 15, 2015

Conversation

Projects
None yet
2 participants
@doutriaux1
Member

doutriaux1 commented Sep 8, 2015

goes with: CDAT/uvcdat-testdata#62

@sankhesh @aashish24 please review

doutriaux1 added some commits Sep 8, 2015

improved pipeline
gm is stored at init time (should we do the same for template?)
pipeline now have a getcolormap() func that look for the colormap to use in this order:

* graphic method has the colormap attribute
* canvas has the colormap attribute set
* otherwise use vcs.colormap

fix #1271
vcs.colormap was already in used
forgot one class where init needed to be updated
primtive needed updated vcs._colorMap name
vector pipeline was still expecting gm as argument to plot function
@aashish24

This comment has been minimized.

Contributor

aashish24 commented Sep 9, 2015

I am going this branch.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Sep 11, 2015

@aashish24 review?

@@ -865,7 +865,7 @@ def __init__(self, gui=0, mode=1, pause_time=0,
self._canvas_id = vcs.next_canvas_id
self.ParameterChanged = SIGNAL('ParameterChanged')
vcs.next_canvas_id += 1
self.colormap = "default"
self.colormap = None

This comment has been minimized.

@aashish24

aashish24 Sep 11, 2015

Contributor

Why not leave it to "default"?

This comment has been minimized.

@doutriaux1

doutriaux1 Sep 11, 2015

Member

Because there are three spots where cmap can be set, so I need to know if user did set it or not.

@@ -461,7 +461,7 @@ def plot(self, data1, data2, template, gtype, gname, bg, *args, **kargs):
pipeline = vcsvtk.createPipeline(gm, self)
if pipeline is not None:
returned.update(pipeline.plot(data1, data2, tpl, gm,

This comment has been minimized.

@aashish24

aashish24 Sep 11, 2015

Contributor

Nice..

cmap = tt.colormap
else:
cmap = 'default'
if tt.colormap is not None:

This comment has been minimized.

@aashish24

aashish24 Sep 11, 2015

Contributor

why not just do this:

if tt.colormap is not None:
cmap = ***
else:
cmap = +++

This comment has been minimized.

@doutriaux1

doutriaux1 Sep 14, 2015

Member

because user can send a cmap to the function

cmap = marker.colormap
else:
cmap = 'default'
if marker.colormap is not None:

This comment has been minimized.

@aashish24

aashish24 Sep 11, 2015

Contributor

same here. if elif should be used if there is else as well. Unless cmap has some default value.

This comment has been minimized.

@doutriaux1

doutriaux1 Sep 14, 2015

Member

same, user can send a cmap to function

This comment has been minimized.

@aashish24

aashish24 Sep 14, 2015

Contributor

if cmap is not None then should you do this instead:

Check if cmap is None

if cmap is None and maker.colormap is not None:
cmap = ***
elif cmake is None and vcs._colorMap is not None:
cmap = ***
else:
cmap = 'default' # Do we need need default?

This comment has been minimized.

@doutriaux1

doutriaux1 Sep 14, 2015

Member

i reviewed the code, it's good as is, if primitive has colorset then it wins. Then falls back on canvas cmap (which is passed I believed) and if nothing fallasback on vcs. Good to be merged when you're happy

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Sep 11, 2015

I think I sent a request to rerun tests on this let's wait.

# For now, we'll just throw everything at plot. This might need to be
# broken up into set_data, set_template, etc methods...
def plot(self, data1, data2, template, graphics_method, grid, transform):
raise NotImplementedError("Missing override.")
def getcolormap(self):

This comment has been minimized.

@aashish24

aashish24 Sep 11, 2015

Contributor

shouldn't it be called getColorMap(self) so as to be consistent with rest of the naming convention?

This comment has been minimized.

@doutriaux1

doutriaux1 Sep 11, 2015

Member

That's reasonable will do. Will look at your if/else comments as well.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Sep 11, 2015

@doutriaux1 mostly looks good to me. Just has some minor suggestion. I hope you won't mind addressing these if you think they are reasonable.

doutriaux1 added some commits Sep 14, 2015

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Sep 14, 2015

merge from master failed. DO NOT MERGE YET please. Fixing it.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Sep 14, 2015

@doutriaux1 sounds good to me. If buildbot is happy, lets go ahead and merge it.

doutriaux1 added some commits Sep 14, 2015

Update isofillpipeline.py
fixed typo in comment, mainly trying to retrigger builds

doutriaux1 added a commit that referenced this pull request Sep 15, 2015

@doutriaux1 doutriaux1 merged commit 80be4c7 into master Sep 15, 2015

3 of 6 checks passed

cont-int/LLNL/Linux-crunchy RH6 (FULL) running 'ctest -j12 -D Experimental' (Mon Sep 14 21:46:49 2015)
Details
cont-int/LLNL/Linux-oceanonly RH6 (NOGUI) running 'ctest -j12 -D Experimental' (Mon Sep 14 21:25:59 2015)
Details
continuous-integration/kitware-buildbot/uvcdat-garant-linux-release/ Build done.
Details
cont-int/LLNL/Darwin-Mac 10.10.3 running 'ctest -j4 -D Experimental' (Mon Sep 14 22:31:42 2015)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@doutriaux1 doutriaux1 deleted the issue_1271_colormap_on_object branch Sep 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment