the image and tests support the following languages:
- Bash
- C++
- Go
- Python
- R
- build the image and other tooling with
make setup
. if new python dependencies are ever needed, add them to requirements.txt and rerunmake setup
. - input data should be in
<dd>/input.txt
. - write solutions in files named
<dd>/{a,b}/main.{sh,cpp,go,py,R}
.- starter files can be created using
./starter
. usage is below. - each program/script should output the answer (and only the answer) followed by a newline to stdout. do not include quotes if the answer is a string.
- each program/script should expect exactly one command line argument: the file containing the input data.
- these source files are available in the running container via a volume, so the image does not need to be rebuilt after writing a new solution.
- starter files can be created using
- see your answer from each language for a given day/part with
make solve path=<dd>/{a,b}/
, e.g.make solve path=05/a/
. - test all solutions for a given day/part with
make test path=<dd>/{a,b}/
, e.g.make test path=05/a/
. - once there is a correct solution for a given day/part, add it to answers.json in a format like the following:
{
"ans01": {"a": "foo", "b": "bar"},
"ans02": {"a": "123"}
}
- the solutions run in docker, but some of the tooling has requirements for what is installed in the system.
- test all solutions in the above languages for all days/parts with
make test
. - clean up the repo, build the image, and test all solutions with
make all
. ./starter
usage:
-day uint
day {1,...,25} (default 1)
-lang string
language {cpp,go,R,py,sh} (default "cpp")
-part string
part {a,b} (default "a")
the beginning of this functionality was developed in this repository.