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

Unresolved references in VCS code #1274

Closed
remram44 opened this issue May 5, 2015 · 10 comments
Closed

Unresolved references in VCS code #1274

remram44 opened this issue May 5, 2015 · 10 comments
Assignees
Milestone

Comments

@remram44
Copy link
Contributor

remram44 commented May 5, 2015

I don't know what you guys code in, but opening VCS in PyCharm shows a lot of unresolved references in VCS code; one of them is causing the taylor diagram error identified by @vvpalav. You should really make a pass on the code with a real IDE and fix the missing imports and misspelled variable names.

These are relatively easy to catch, and will cause crashes 100% of the time their branch is reached.

@remram44 remram44 added this to the 2.2 milestone May 5, 2015
@doutriaux1
Copy link
Contributor

Hard core my friend! There's only ONE real IDE and it is vi. 😉
With that said @durack1 is routinely uvcdat with Spyder which is arguably THE standard IDE for Python. And @mcenerney1 is using Eclipse... So it sounds more like a problem with Pycharm not sourcing setup runtime or just a user error.

@doutriaux1
Copy link
Contributor

http://codegeekz.com/best-python-ide-for-developers/ 😉 checkout number 1

@remram44
Copy link
Contributor Author

remram44 commented May 5, 2015

Oh no, these are actual errors, not PyCharm glitches. Sorry for the confusion.

  File "/home/remram/Documents/programming/uvcdat-vistrails/vistrails/packages/uvcdat_cdms/widgets.py", line 135, in getValueFromFunction
    value = get_canvas().match_color(f.params[0].strValue)
  File "/home/remram/uvcdat-builds/builds/32f3893f053107374d2b4b8fb0feee5efbcaedee/install/lib/python2.7/site-packages/vcs/Canvas.py", line 2377, in match_color
    return vcs.match_color(color,colormap)
  File "/home/remram/uvcdat-builds/builds/32f3893f053107374d2b4b8fb0feee5efbcaedee/install/lib/python2.7/site-packages/vcs/utils.py", line 1443, in match_color
    vals=genutil.colors.str2rgb(color)
NameError: global name 'genutil' is not defined

I like my yank registers and instant macros as much as the next guy, but I just wouldn't code anything important in an environment that doesn't report forgotten imports or wrong number of passed arguments.

@durack1
Copy link
Member

durack1 commented May 5, 2015

@doutriaux1 I think @remram44 is pointing out that some more "feature complete" IDEs (such as Spyder with rope, pyflakes and pylint) will highlight issues in the code that VI and other less featured IDEs will not..

In particular these optional packages work great in the spyder IDE to point out miss-spelled variable names, missing or unused module imports etc etc.. They also can assist in indentation errors, which can cause nasty bugs like #1048

@doutriaux1
Copy link
Contributor

@durack1 I know what @remram44 meant. I was just pointing out we DO use other IDEs and they seem to work.

@doutriaux1
Copy link
Contributor

anyhow thanks for catching these for us working on unimportant projects I will approve the PR when it comes in.

@remram44
Copy link
Contributor Author

remram44 commented May 5, 2015

You can't seriously ask me to fix all the missing imports and mistyped variable names in your code. If you can't use an IDE that reports these as you type them, I would be trying to hit a moving target anyway...

The missing imports in vcs.utils is one of the crashes listed in vvpalav's document, fix it or don't, I think working code is best but that's only my opinion.

@doutriaux1
Copy link
Contributor

@remram44 you fix whatever you want my friend nobody is forcing you to do anything. You spotted a bug, took the time to report it and spot. I was just assuming you'd be issuing a PR for it. No worries I will fix it.

@doutriaux1
Copy link
Contributor

oh relabeling this to "vcs" since it appears to be in the vcs code not cdms2.
@remram44 correct labeling saves time for developers.

@doutriaux1 doutriaux1 added VCS and removed cdms2 labels May 5, 2015
@doutriaux1 doutriaux1 self-assigned this May 5, 2015
@remram44
Copy link
Contributor Author

remram44 commented May 5, 2015

Oops!

doutriaux1 added a commit that referenced this issue May 7, 2015
actually made me realize passing time keyword was not implemented
so now it is along with examples
fix #1274
doutriaux1 added a commit that referenced this issue Jun 15, 2015
actually made me realize passing time keyword was not implemented
so now it is along with examples
fix #1274
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants