systemetric / shepherd

👨‍🌾 Shepherd is the code management system used on the RoboCon brains
Other
2 stars 1 forks source link

A CLI for shepherd #40

Open shardros opened 2 years ago

shardros commented 2 years ago

Let other people use different editors might be a nice thing for advanced teams. We could have a CLI.

sheep run zips the current folder and sends it to shepherd, assumes that the user defines the entry point in main.py.

Cleaning up the API might be desirable to do first #39

@cupit-dev did start the development of this in 2017 however I think at this point it has been lost to the mists of time.

Not a priority for the target market of robocon though.

WillMunns commented 2 years ago

In 2022 we had two teams (teachers) ask about "import file" support.

While a sure sign of going over the top in programming for the task, it is part of the HRFSC robotics ethos to enable this madness even if (especially if?) it isn't a key to winning.

Is sheep the correct way to go here, or should we be writing an extension for an IDE like vscode which wraps files into a zip that goes on a Robot USB stick?

Given we provide the laptop we could provide this pre-installed.

shardros commented 2 years ago

We already have a vscode extension which makes USB sticks for SR https://github.com/systemetric/sr-zipper

So it would just be a slight modification to that (remove robot.sr).

I think a CLI is what we want becuase the kind of people who want to have 1000s of lines of software probally are also fussy about their editors.

I think all the CLI needs to do should be to zip the current working directory and make the upload and run calls to shepherd.

The advantage of multiple files is not for over complicating things (which it will be used for) but for having some common code and then different strategies.

WillMunns commented 2 years ago

It appears to be the teachers asking for it, at least for the first one, he was because he is a CS teacher (did you get his school?) the second guy was from Cranbrook. Given its teachers pushing for it im not sure its a CLI type problem. Doing it with a CLI presumably would be at most a few lines of code in linux (perhaps just 2 lines, zip and curl - I'd need to look at the upload page).

If you're advanced enough to use the CLI without a care, then you're advanced enough to use curl freehand.

IIRC the scaffolding for unpacking zips on the brain is already there but untested since it went in in 2017