Skip to content

Add interactive CLI and refactor tbots.py#3657

Open
StarrryNight wants to merge 5 commits intoUBC-Thunderbots:masterfrom
StarrryNight:upgrade_tbotspy
Open

Add interactive CLI and refactor tbots.py#3657
StarrryNight wants to merge 5 commits intoUBC-Thunderbots:masterfrom
StarrryNight:upgrade_tbotspy

Conversation

@StarrryNight
Copy link
Contributor

@StarrryNight StarrryNight commented Mar 21, 2026

Description

Note: commit history is cooked because I had to recommit everything together. Full commit history here: #3656
This ticket resolves #3623.

  1. It adds an interactive cli by calling ./tbots.py without any arguments/flags. This uses a new module questionary.
Screencast.from.2026-03-21.13-16-09.mp4
  1. It refactors ./tbots.py by streamlining main function, removing dead flags, and adding a dataclass to facilitate calling of helper functions.

Testing Done

Interactive cli works, tbots.py works.

Resolved Issues

#3623

Length Justification and Key Files to Review

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

nycrat
nycrat previously approved these changes Mar 22, 2026
src/tbots.py Outdated
Comment on lines +270 to +271
test = "all" if not test else test
args.extend(["test", "--suite" if test == "all" else test])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: just straight up use if not test instead of setting to "all" then checking again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve tbots.py

2 participants