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

541 patterns support #1516

Merged
merged 99 commits into from Sep 10, 2015

Conversation

Projects
None yet
7 participants
@sankhesh
Contributor

sankhesh commented Sep 3, 2015

Fixes issues #541 #1042

Fixed issue in parsing contour levels
Incorrect indentation.
@aashish24

This comment has been minimized.

Contributor

aashish24 commented Sep 3, 2015

Great stuff @sankhesh can you get rid of "WIP" from commit messages?

@@ -336,6 +355,7 @@ def __init__(self, Tf_name=None, Tf_name_src='default'):
self._style = ['solid', ]
self._index = [1, ]
self._color = [1, ]
self._opacity = []

This comment has been minimized.

@doutriaux1

doutriaux1 Sep 3, 2015

Member

shouldn't we default to 1. ?

This comment has been minimized.

@sankhesh

sankhesh Sep 3, 2015

Contributor

Nope. The default is different in different cases.
For solids and patterns, default opacity value is 0 and for hatches it is 100.

self._fillareacolors = [1, ]
self._fillareaopacity = []

This comment has been minimized.

@doutriaux1

doutriaux1 Sep 3, 2015

Member

same here. shouldn't we default to 1?

This comment has been minimized.

@sankhesh

sankhesh Sep 3, 2015

Contributor

Nope. The default is different in different cases.
For solids and patterns, default opacity value is 0 and for hatches it is 100.

@sankhesh sankhesh force-pushed the 541_patterns_support branch from 6df42e6 to 8f82acf Sep 3, 2015

@@ -329,6 +343,7 @@ def _plotInternalCustomBoxfill(self):
I = [indices[i]]
tmpLevels.append(L)
tmpColors.append(C)
print tmpLevels

This comment has been minimized.

@doutriaux1

doutriaux1 Sep 3, 2015

Member

left over?

This comment has been minimized.

@sankhesh

sankhesh Sep 3, 2015

Contributor

Good spot. I'll fix it.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Sep 3, 2015

@sankhesh I'm excited. Going to play with it right way! quick question does iso.script("iso.json") work? I don't see you updated the test_dump_json and it should probably fail now since we have a new attribute.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Sep 3, 2015

I will let @aashish24 do the "commits police" work 😜

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Sep 3, 2015

@sankhesh also could you please rebase on master?

@sankhesh

This comment has been minimized.

Contributor

sankhesh commented Sep 3, 2015

@aashish24 Done.

@doutriaux1 Until now, I had no idea about the json stuff. I'll take a look at it too.

@sankhesh sankhesh force-pushed the 541_patterns_support branch from 8f82acf to 6490f95 Sep 3, 2015

Merge branch 'master' into 541_patterns_support
Conflicts:
	CMake/cdat_modules/vtk_external.cmake
	Packages/vcs/Lib/VTKPlots.py
	Packages/vcs/Lib/vcsvtk/isofillpipeline.py
	testing/matplotlib/CMakeLists.txt
@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Sep 3, 2015

@sankhesh lots of failing tests... Also basic plot now fails:

import os,sys,cdms2,vcs

f=cdms2.open(os.path.join(vcs.sample_data,"clt.nc"))
s=f("clt")
x=vcs.init()
x.plot(s)
python test.py
Traceback (most recent call last):
  File "test.py", line 6, in <module>
    x.plot(s)
  File "/lgm/uvcdat/2015-09-03/lib/python2.7/site-packages/vcs/Canvas.py", line 2524, in plot
    a = self.__plot(arglist, keyargs)
  File "/lgm/uvcdat/2015-09-03/lib/python2.7/site-packages/vcs/Canvas.py", line 3839, in __plot
    returned_kargs = self.backend.plot(*arglist, **keyargs)
  File "/lgm/uvcdat/2015-09-03/lib/python2.7/site-packages/vcs/VTKPlots.py", line 466, in plot
    vtk_backend_grid, vtk_backend_geo))
  File "/lgm/uvcdat/2015-09-03/lib/python2.7/site-packages/vcs/vcsvtk/pipeline2d.py", line 157, in plot
    self._plotInternal()
  File "/lgm/uvcdat/2015-09-03/lib/python2.7/site-packages/vcs/vcsvtk/boxfillpipeline.py", line 186, in _plotInternal
    for ind, mapper in enumerate(self._patternMappers):
TypeError: 'NoneType' object is not iterable
@sankhesh

This comment has been minimized.

Contributor

sankhesh commented Sep 3, 2015

@doutriaux1 Could you please try with a new checkout? I had to force-push a couple of changes.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Sep 5, 2015

@sankhesh looks like you still have 52 tests failing. Most of the has the same pattern.

sankhesh added some commits Sep 8, 2015

Pad opacity values with defaults if none provided
Fixed bug where the number of opacity values was one less
than the number of colors provided
Avoid setting null or NoneType values for member variables
Fix issue where the set methods allowed setting null or NoneType
values for members, thereby causing inconsistencies in code that
used these member variables.
Handle invalid opacity values for fillareas
This is a special case as the default opacity values differ based
on the fill style. The default is 0 for patterns and 100 for
solid fill and hatches.
@sankhesh

This comment has been minimized.

Contributor

sankhesh commented Sep 9, 2015

@doutriaux1 All regressions pass now.

@sankhesh sankhesh added this to the 2.4 milestone Sep 9, 2015

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Sep 9, 2015

Nice! thanks will play with it now and let you know. Will let our scientists know as well. @bonfils2 @durack1 I will let you know when it's ready.

@durack1

This comment has been minimized.

Member

durack1 commented Sep 9, 2015

@sankhesh are there some missing files in the test-suite? On the macbot I see:

The following tests FAILED:
    302 - vcs_test_patterns (Failed)
    309 - vcs_test_isofill_patterns (Failed)
    310 - vcs_test_isofill_hatches (Failed)
    311 - vcs_test_hatches_patterns (Failed)
    460 - basemap_verify_import (Failed)
File "/Users/doutriaux1/uvcbot/build/uvcdat-testdata/baselines/vcs/test_vcs_hatches_patterns.png" not found.
File "/Users/doutriaux1/uvcbot/build/uvcdat-testdata/baselines/vcs/test_isofill_hatches.png" not found.
File "/Users/doutriaux1/uvcbot/build/uvcdat-testdata/baselines/vcs/test_isofill_patterns.png" not found.
@sankhesh

This comment has been minimized.

Contributor

sankhesh commented Sep 9, 2015

@durack1

Those files are sitting in a PR @ CDAT/uvcdat-testdata#61
Typically, the testdata should be updated everytime its built. No idea why the macbot fails to do so. The other machines seem to be fine.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Sep 9, 2015

@sankhesh awesome dude!..

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

@doutriaux1 doutriaux1 merged commit fc1660a into master Sep 10, 2015

3 of 5 checks passed

cont-int/LLNL/Darwin-Mac 10.10.3 running 'ctest -j4 -D Experimental' (Tue Sep 8 22:15:16 2015)
Details
cont-int/LLNL/Linux-crunchy RH6 (FULL) running 'ctest -j12 -D Experimental' (Tue Sep 8 21:25:53 2015)
Details
continuous-integration/kitware-buildbot/uvcdat-garant-linux-release/ Build done.
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 541_patterns_support branch Sep 10, 2015

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