From 42a3de4f5eb9845ac587f2a92a68bfaab4cf9a98 Mon Sep 17 00:00:00 2001 From: Sloane Perrault Date: Wed, 21 Sep 2022 09:19:53 -0400 Subject: [PATCH] docs: updates to readme; fix: gen.solution type error --- 2021/README.md | 20 +++++++++++++++++-- .../mix/tasks/advent_of_code.gen.solution.ex | 1 + 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/2021/README.md b/2021/README.md index f246dcc..c6318ec 100644 --- a/2021/README.md +++ b/2021/README.md @@ -3,7 +3,7 @@
Setup - Using [asdf]: + Using [asdf](https://asdf-vm.com/#/): ```sh asdf plugin add erlang @@ -19,4 +19,20 @@ | 12 | 13 | 14 | 15 | 16 | 17 | 18 | | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -[asdf]: https://asdf-vm.com/#/ +--- + +## Mix Tasks + +- `advent_of_code.gen.solution` +- `advent_of_code.solve` +- `advent_of_code.fetch_input` + +Run `mix help ` for details. + +## [`AdventOfCode.PuzzleSolver`](./lib/advent_of_code/puzzle_solver.ex) + +A behaviour for a solution to a puzzle. Must define a `solve/2` callback. + +## [`AdventOfCode.PuzzleCase`](./test/support/puzzle_case.ex) + +Case template defining an `assert_solution/2` helper. diff --git a/2021/lib/mix/tasks/advent_of_code.gen.solution.ex b/2021/lib/mix/tasks/advent_of_code.gen.solution.ex index f1d1165..d61cb68 100644 --- a/2021/lib/mix/tasks/advent_of_code.gen.solution.ex +++ b/2021/lib/mix/tasks/advent_of_code.gen.solution.ex @@ -33,6 +33,7 @@ defmodule Mix.Tasks.AdventOfCode.Gen.Solution do create_file(day_file, day_contents) for part <- 1..2 do + part = to_string(part) part_module = part_module(day, part) part_contents =