Benezivas / algobattle

Let teams compete by making them create hard instances and fast solvers for problems of your choice. Then pitch these instances and solvers against one another. All language-agnostic.
https://algobattle.org
MIT License
8 stars 3 forks source link

Modernize command line interaction #122

Closed ImogenBits closed 1 year ago

ImogenBits commented 1 year ago

This is a rather hefty PR that probably should've been split up but 🤷🏻‍♀️ The main idea of this is to update the command line interface to not be based on argparse and curses, but on typer and rich. This gives the tool a look and UX actually fitting of it being developed in 2023 :3 It also let us easily add the utility features we brought up a while ago, namely being able to do a quick test of student programs, and making the Docker learning curve not as steep. This is done by adding a bunch of subcommands:

There's still a lot of functionality to be added to these commands, but even in their current form they should make it a lot easier for students to get into things and a much, much better UX overall. In particular, while I've tried to add support for every reasonably popular language, some of the templates are very rudimentary. Python, Rust, Javascript, and Typescript all have fully featured templates that setup a project skeleton suitable for algobattle programs. But Java, C, C++, C#, and Go only contain rudimentary hello world scripts. I'm just not familiar enough with these languages to setup a basic json parsing and file io program and include an actual dependency manager in the Dockerfile.

I've also updated and reworked the docs to reflect these changes and also just be more cohesive and easy to understand in general. They also look marginally nicer with some new mkdocs features.

Finally, some screenshots of the new UI just to show it off :3 Running a match with a single team: image

Testing programs: image

Building programs during a match: image A match with multiple battles being run at once: image

Benezivas commented 1 year ago

These are some very impressive changes, thank you very much. I will merge this PR early and vote for more extensive testing before the final release, as we need to demo the code for the upcoming semester soon.