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

Create a CLI for Tools #38

Closed
gbalke opened this issue Apr 12, 2021 · 2 comments
Closed

Create a CLI for Tools #38

gbalke opened this issue Apr 12, 2021 · 2 comments

Comments

@gbalke
Copy link
Member

gbalke commented Apr 12, 2021

This should follow #37 to minimize code movement but it is not necessary. The intent is to make a CLI with sub-commands (like git). This should be possible with argparse as shown here: https://chase-seibert.github.io/blog/2014/03/21/python-multilevel-argparse.html

The goal is to remove all of the current scripts and instead make them sub-commands of bd-tools (or a different name if someone can think of something better).

I'm thinking the commands will essentially retain their current format so these should be familiar:

bd-tools upload_firmware <serial_device> <board_id(s)> <path_to_bin_file>
bd-tools read_sensor <serial_device> <board_id(s)> <sensor_name>
bd-tools control_motor <serial_device<board_id(s)> <control_type> <actuation_values>

These are obviously just a few examples and I think the recorder directory may be a bit tricky to consolidate (it would make sense to do something similar to #37 but for the recorders).

bd-tools recorder <type> <actuation> <log_file_path>
bd-tools recorder plot <log_file_path>

I'd recommend taking this bit by bit instead of all at once. Maybe one or two scripts per PR.

@gbalke
Copy link
Member Author

gbalke commented May 19, 2021

Datargs can be used instead of argparse #39 (comment)

@gbalke
Copy link
Member Author

gbalke commented May 16, 2022

Handled by #43.

@gbalke gbalke closed this as completed May 16, 2022
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

1 participant