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

541 patterns support #1516

Merged
merged 99 commits into from
Sep 10, 2015
Merged

541 patterns support #1516

merged 99 commits into from
Sep 10, 2015

Conversation

sankhesh
Copy link
Contributor

@sankhesh sankhesh commented Sep 3, 2015

Fixes issues #541 #1042

@aashish24
Copy link
Contributor

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 = []
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we default to 1. ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

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

Choose a reason for hiding this comment

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

left over?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good spot. I'll fix it.

@doutriaux1
Copy link
Contributor

@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
Copy link
Contributor

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

@doutriaux1
Copy link
Contributor

@sankhesh also could you please rebase on master?

@sankhesh
Copy link
Contributor Author

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.

Conflicts:
	CMake/cdat_modules/vtk_external.cmake
	Packages/vcs/Lib/VTKPlots.py
	Packages/vcs/Lib/vcsvtk/isofillpipeline.py
	testing/matplotlib/CMakeLists.txt
@doutriaux1
Copy link
Contributor

@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
Copy link
Contributor Author

sankhesh commented Sep 3, 2015

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

@aashish24
Copy link
Contributor

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

Fixed bug where the number of opacity values was one less
than the number of colors provided
Fix issue where the set methods allowed setting null or NoneType
values for members, thereby causing inconsistencies in code that
used these member variables.
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
Copy link
Contributor Author

sankhesh commented Sep 9, 2015

@doutriaux1 All regressions pass now.

@sankhesh sankhesh added this to the 2.4 milestone Sep 9, 2015
@doutriaux1
Copy link
Contributor

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
Copy link
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
Copy link
Contributor Author

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
Copy link
Contributor

@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
@doutriaux1 doutriaux1 deleted the 541_patterns_support branch September 10, 2015 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants