Remove optparse from example#655
Conversation
rahulporuri
left a comment
There was a problem hiding this comment.
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! |
rahulporuri
left a comment
There was a problem hiding this comment.
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
optparsein 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 Nonecheck 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