https://github.com/bfgray3/aoc-template
template repo for advent of code. supports Bash, C++, Go, Python, and R.
https://github.com/bfgray3/aoc-template
Last synced: 5 months ago
JSON representation
template repo for advent of code. supports Bash, C++, Go, Python, and R.
- Host: GitHub
- URL: https://github.com/bfgray3/aoc-template
- Owner: bfgray3
- Created: 2023-11-25T00:38:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-11-17T20:47:40.000Z (7 months ago)
- Last Synced: 2025-11-17T22:21:39.708Z (7 months ago)
- Language: Go
- Homepage:
- Size: 136 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## overview
the image and tests support the following languages:
* Bash
* C++
* Go
* Python
* R
## usage
1. build the image and other tooling with `make setup`. if new python dependencies are ever needed, add them to [requirements.txt](requirements.txt) and rerun `make setup`.
2. input data should be in `
3. write solutions in files named `
1. starter files can be created using `./starter`. usage is below.
2. 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.
3. each program/script should expect exactly one command line argument: the file containing the input data.
4. 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.
4. see your answer from each language for a given day/part with `make solve path=
5. test all solutions for a given day/part with `make test path=
6. once there is a correct solution for a given day/part, add it to [answers.json](answers.json) in a format like the following:
```json
{
"ans01": {"a": "foo", "b": "bar"},
"ans02": {"a": "123"}
}
```
### notes
* 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")
```
## original development
the beginning of this functionality was developed in [this repository](https://github.com/bfgray3/aoc22/).