Skip to content

andrewfitzy/2024-advent-of-code

Repository files navigation

2024-advent-of-code

Build status

Each day, advent of code presents a challenge for those of brave heart to complete. This repo contains my answers to the 2024 version of advent of code, not all challenges have been completed. I complete AoC to get familiar with a technology, its build tools and testing tools, it's kind of a mini-production type workflow I follow.

In this year I chose to use the following tools:

All development is completed using VS Code.

Setup

With Python, I like to work with virtual envs, this keeps the development environments for each project separate.

First step is to install the version of python to use. I use pyenv to manage my python versions, so I install the version I want to use with the following command:

╰─❯ pyenv install 3.13.0

Next I create a virtual environment for the project:

╰─❯ pyenv virtualenv 3.13.0 2024-aoc

Then I activate the virtual environment:

╰─❯ pyenv activate 2024-aoc

Install the dependencies:

╰─❯ make install

Finally, set up pre-commit:

╰─❯ pre-commit install

My environment is now setup and ready to go.

Testing

╰─❯ make test

To test a single test file, the following command can be used:

╰─❯ make test-file file=<relative_path_to_test>

For example, to test day 01 task 02, the following command can be used:

╰─❯ make test-file file=tests/day_01/test_task_02.py

Committing

The pre-commit hook should kick-in, when it does it will lint and prettify the code.

╰─❯ git add --all
╰─❯ git commit -a

Progress

Challenge Task 1 Task 2
Day 01 Historian Hysteria 🌟 🌟
Day 02 Red-Nosed Reports 🌟 🌟
Day 03 Mull It Over 🌟 🌟
Day 04 Ceres Search 🌟 🌟
Day 05 Print Queue 🌟 🌟
Day 06 Guard Gallivant 🌟 🌟
Day 07 Bridge Repair 🌟 🌟
Day 08 Resonant Collinearity 🌟 🌟
Day 09 Disk Fragmenter 🌟 🌟
Day 10 Hoof It 🌟 🌟
Day 11 Plutonian Pebbles 🌟 🌟
Day 12 Garden Groups 🌟 🌟
Day 13 Claw Contraption 🌟 🌟
Day 14 Restroom Redoubt 🌟 🌟
Day 15 Warehouse Woes 🌟 🌟
Day 16 Reindeer Maze 🌟
Day 17 Chronospatial Computer 🌟 🌟
Day 18 RAM Run 🌟 🌟
Day 19 Linen Layout 🌟 🌟
Day 20 Race Condition
Day 21 Keypad Conundrum 🌟 🌟
Day 22 Monkey Market 🌟 🌟
Day 23 LAN Party 🌟 🌟
Day 24 Crossed Wires 🌟
Day 25 Code Chronicle 🌟

About

Solutions for 2024 Advent of Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages