The toy repo

Back to the course

Generated: This is a generated toy application that you can use for testing purposes. It was a supervised generation process and contains a few things to look through.

Feel free to use it, or ignore it at your leisure. It is there so group projects work on the SAME REPOSITORY! So you can compare results.

pantry/ is a small Go program that keeps track of what is in a kitchen. This is for your agent to work on in module 6, module 7 and the final project.

Structure

pantry/                 the Go program your agent works on
  cmd/pantry/           the command line
  internal/item/        what an item is, and how "500g flour" is parsed
  internal/store/       the items in memory and in a JSON file
  internal/report/      the table that `pantry list` prints
tasks/                  how a task looks, plus one example

The program

$ pantry add 500g flour
Added. You now have 500g flour.
$ pantry add 3 eggs
Added. You now have 3 eggs.
$ pantry remove flour 200
Removed.
$ pantry list
ITEM   AMOUNT
eggs   3
flour  300g
2 items

Try it yourself: cd pantry && go run ./cmd/pantry list.

On purpose things

How to use it

Agents should work on their own copy:

  1. Copy pantry/ somewhere fresh.
  2. Let the agent loose!
  3. Check.
  4. Delete.

A fresh copy every time is what makes multiple runs comparable. The tasks, and an example you can run right now, are in tasks/.

Can I use my own repo instead?

Sure. Any small Go repo with tests will do. You just won't be able to compare your numbers with anybody else's.