Skip to content

Commit

Permalink
chore: clean up incomplete days and tests and update GH CI command
Browse files Browse the repository at this point in the history
  • Loading branch information
jhrcook committed Jan 15, 2024
1 parent d617f10 commit 8429095
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ jobs:
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo install --path .
- run: aoc-2023 --help
- run: aoc-2023
- run: aoc-2023 run --help
- run: aoc-2023 run
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,4 @@ pyrightconfig.json
# End of https://www.toptal.com/developers/gitignore/api/python

.python-version
.wakatime-project
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
| 7 | [src/solutions/day07.rs](src/solutions/day07.rs) | ⭐️⭐️ |
| 8 | [src/solutions/day08.rs](src/solutions/day08.rs) | ⭐️⭐️ |
| 9 | [src/solutions/day09.rs](src/solutions/day09.rs) | ⭐️⭐️ |
| 10 | [src/solutions/day10.rs](src/solutions/day10.rs) | ⭐️ |
| 10 | [src/solutions/day10.rs](src/solutions/day10.rs) | ⭐️[^1] |
| 11 | [src/solutions/day11.rs](src/solutions/day11.rs) | ⭐️⭐️ |
| 12 | [src/solutions/day12.rs](src/solutions/day12.rs) | ⭐️⭐️ |
| 13 | [src/solutions/day13.rs](src/solutions/day13.rs) | ⭐️⭐️ |
Expand All @@ -27,13 +27,15 @@
| 16 | [src/solutions/day16.rs](src/solutions/day16.rs) | ⭐️⭐️ |
| 17 | [src/solutions/day17.rs](src/solutions/day17.rs) | ⭐️⭐️ |
| 18 | [src/solutions/day18.rs](src/solutions/day18.rs) | ⭐️⭐️ |
<!-- | 19 | [src/solutions/day19.rs](src/solutions/day19.rs) | ⭐️⭐️ | -->
<!-- | 20 | [src/solutions/day20.rs](src/solutions/day20.rs) | ⭐️⭐️ | -->
| 19 | [src/solutions/day19.rs](src/solutions/day19.rs) | ⭐️ |
| 20 | [src/solutions/day20.rs](src/solutions/day20.rs) | ⭐️ |
<!-- | 21 | [src/solutions/day21.rs](src/solutions/day21.rs) | ⭐️⭐️ | -->
<!-- | 22 | [src/solutions/day22.rs](src/solutions/day22.rs) | ⭐️⭐️ | -->
<!-- | 23 | [src/solutions/day23.rs](src/solutions/day23.rs) | ⭐️⭐️ | -->
<!-- | 24 | [src/solutions/day24.rs](src/solutions/day24.rs) | ⭐️⭐️ | -->

[^1]: I'm close on puzzle 10 day 2. I have the algorithm ready to search the maze, but there is a bug in the construction of the maze where the primary path is not the only one selected.

## Help

Used this Reddit post for Day 12 part 2: <https://www.reddit.com/r/adventofcode/comments/18hbbxe/2023_day_12python_stepbystep_tutorial_with_bonus/>
Expand Down
10 changes: 5 additions & 5 deletions src/solutions/day19.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ pub fn main(data_dir: &str) {
assert_eq!(answer_1, Ok(509597));

// Puzzle 2.
let answer_2 = puzzle_2(&data);
match answer_2 {
Ok(x) => println!(" Puzzle 2: {}", x),
Err(e) => panic!("No solution to puzzle 2: {}", e),
}
// let answer_2 = puzzle_2(&data);
// match answer_2 {
// Ok(x) => println!(" Puzzle 2: {}", x),
// Err(e) => panic!("No solution to puzzle 2: {}", e),
// }
// assert_eq!(answer_2, Ok(30449))
}
10 changes: 5 additions & 5 deletions tests/test_day10.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ L.L7LFJ|||||FJL7||LJ
L7JLJL-JLJLJL--JLJ.L
";

#[test]
fn puzzle_2_example_4() {
let _ = env_logger::try_init();
assert_eq!(puzzle_2(self::EXAMPLE_INPUT_6), Ok(10));
}
// #[test]
// fn puzzle_2_example_4() {
// let _ = env_logger::try_init();
// assert_eq!(puzzle_2(self::EXAMPLE_INPUT_6), Ok(10));
// }
10 changes: 5 additions & 5 deletions tests/test_day19.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ fn puzzle_1_example_1() {
assert_eq!(puzzle_1(self::EXAMPLE_INPUT_1), Ok(19114));
}

#[test]
fn puzzle_2_example_1() {
let _ = env_logger::try_init();
assert_eq!(puzzle_1(self::EXAMPLE_INPUT_1), Ok(167409079868000));
}
// #[test]
// fn puzzle_2_example_1() {
// let _ = env_logger::try_init();
// assert_eq!(puzzle_1(self::EXAMPLE_INPUT_1), Ok(167409079868000));
// }

0 comments on commit 8429095

Please sign in to comment.