Closed PermieBTS closed 4 years ago
@PermieBTS please put task on hold for cli refactoring when we find something else besides whiptail for terminal emulation
@PermieBTS, I spent a little time browsing and found a few candidates that could do form logic for cli. Listing them here:
http://pythondialog.sourceforge.net/ https://github.com/CITGuru/PyInquirer http://urwid.org/index.html https://npyscreen.readthedocs.io/index.html
We'll need to evaluate which would best fit to replace whiptail (which is what we are currently using) as well as which packages are best maintained, and usable across all platforms. @joelvai if you have any input, please feel free to add here.
also see comment in #703
Good call
TUI example from #551 can be done with npyscreen https://medium.com/@ValTron/create-tui-on-python-71377849879d
KubeTerminal https://github.com/samisalkosuo/kubeterminal
npyscreen examples look like the quickest implement and modify, at the very least the strategy config part in the cli and give it some nice forms. can possibly squeeze this in over holiday break.
Closing in favor of #551
Cli configure menu doesn't skip input for parameters you've said "No" to enabling. Not too much of a problem to work around but for ease of use some changes could be made:
Expected Behavior
$ cd dexbot $ dexbot-cli configure Follow the cli configure menu for RO,
When choosing "No" to using an external price feed, the box to choose the possible external feed sources should be skipped to avoid confusion.
The "input fixed order size" option should appear AFTER the "Relative order size? YES/NO" window, so that inputting a fixed order size can be ignored if relative order size is YES
When choosing "NO" for dynamic spread, the input of Market depth to measure dynamic spread from input should be skipped
The "measure centre price from market orders" window should appear BEFORE the "input manual centre price" so that manual entry can be skipped if "measure centre price from market orders" is selected as YES
The "manual centre price offset" should be skipped if the user says "NO" to "Centre price offset based on market orders"
If NO is chosen for "reset orders on partial fill" the "fill threshold" parameter should be skipped
If NO is chosen for "reset orders on centre price change" the "price change threshold" window should be skipped
If NO is chosen for "order expiration override" the "Order expiration time" window should be skipped. (The default value for order expiration should have the ".0" decimal removed from the end as it's an invalid input for cli configure)
Specifications