-
Notifications
You must be signed in to change notification settings - Fork 3
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
Printing variables works using cdms2 and all plots work. #1
Conversation
@danlipsa I'm trying to test it, but apparently the build of VTK on our conda channel doesn't have VTKWeb installed.
|
@chaosphere2112 for now get the recipe from UV-CDAT/conda-recipes and turn webvtk on. |
@chaosphere2112 @doutriaux1 Sorry for the delay, I was off yesterday. vtkweb is aleady there. PYTHONPATH=/home/danlipsa/anaconda2/envs/2.6-42-g24f85dc/lib/python2.7/site-packages/vtk /home/danlipsa/anaconda2/envs/2.6-42-g24f85dc/bin/vtkpython server/server.py -p 9000 Make sure you replace my conda dir with yours. |
Setting the PYTHONPATH should be unnecessary if you are running with |
Had not heard of |
@jbeezley Nope, that doesn't work at all:
I'm going to give the manual pythonpath a try. |
@chaosphere2112 @jbeezley Note, I am using vtkpython as well. Not sure why this needs the PYTHONPATH as well. It may be a conda thing. |
That's probably a problem with the vtk build in conda then. |
So, the process as I believe I have interpreted:
at which point I open |
@jbeezley Do you know what this error is? |
That sort of error would seem to indicate there was an error thrown while loading the main bundle. There was no error before that point? Was |
@chaosphere2112 I think you are missing the 'npm run build' step. |
|
|
You don't want a global install of babel, and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a few issues with the javascript trying to get it to compile and running the demo.
canvas.plot(clt, gm, 'default', 'vtkweb'); | ||
canvasPromise.then(function (canvas) { | ||
var dataSpec = { | ||
file: 'coads_climatology.nc', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was not included in the repo; I used clt.nc and clt
here instead; for the vectors, I used u
and v
from clt.nc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the file. Not sure why this was used in the original cdat_web.
coads_climatology.zip
variables() { | ||
return this.session.client() | ||
.then((client) => client.session.call('file.netcdf.variables', [fileName])); | ||
.then((client) => client.session.call('cdat.file.variables', [fileName])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The npm run build
command complained about this style of arrow function for me; I made it work by converting them to something like (client) => { return client.session.call('cdat.file.variables', [fileName]); }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funny how the linter behaves differently for you. @jbeezley Why is that? But I like your version better.
}]; | ||
} else { | ||
dataSpec.variables = []; | ||
for (let i = 0; i < dataSpec.variable.length; ++i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Er... is this loop doing the right thing? The linter yelled at me about the use of ++ at all, let alone preincrement. Won't this not insert variables[0]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that you have variable and variables, so I think it the loop is fine. Not sure about the ++, my linter was happy with it. I guess we should make sure we force the linter version used so that we get consistent results. @jbeezley could you help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, so it is. My mistake.
The errors I mentioned:
|
@chaosphere2112 Searching for no-plusplus says to replace ++ with += which is fine. I think you have a newer version of eslint. |
@danlipsa I'm running v3.7.1, apparently. |
@chaosphere2112 I have 3.3.1. This is downloaded by npm install I think, so it should be a way to fix the version. |
@danlipsa, if you run |
Thanks @jbeezley. @chaosphere2112 Do you want me to update the PR and fix the errors with the new lint? |
@danlipsa Please; once you do, I'll merge and get started on my work. |
@chaosphere2112 Done. |
👍 Thanks! |
@aashish24 @doutriaux1 @chaosphere2112 @mattben @jbeezley Please review.
vcs-js is back to the old master capabilities with the new vtkweb frontend and ES6 - thanks to Jon for starting this.
Outstanding issues: