-
Notifications
You must be signed in to change notification settings - Fork 99
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
Remove optparse from example #655
Conversation
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.
Sorry. I take it back. If we want to contribute this to etsdemo, it will be best if we dont introduce the additional dependency on click. Can you rewrite this to use argparse instead? Sorry for the double work.
No worries at all. I'm happy to make the switch but before I do I wanted to ask: do we event want to support command line arguments at all in that case? All the options (function, nlevels, and colormap) are configurable via the UI. I don't exactly see the need of having the command line options, plus it clouds the example with non-chaco code / one is probably looking at the example to learn about chaco not click or aragparse. However, if we do want the functionality I am happy to just make the switch! |
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.
LGTM.
Can you add _default
methods for function
, num_levels
and colormap
? It looks like the changes in _num_levels_changed
are motivated by the lack of good default values for those traits.
Also, can you update the PR title and description based on the decision we made?
function already defaults to the default function as its trait definition is
Yep, done |
Still LGTM |
closes #607
This PR removes
optparse
in https://github.com/enthought/chaco/blob/ef7227706642f7d26042717ad9b60648d7572068/examples/demo/advanced/scalar_image_function_inspector.py and also fixes the following error:by adding an
is not None
check to the example.All of the options for optparse are configurable within the application itself and so it was decided the command line options were unnecessary