/adventofcode

2023 (and beyond) Advent of Code solutions

Primary LanguagePython

Advent of Code 2023-????

I'm using Python because I don't have the time to use Go :(

Usage

I rely on uv for my Python projects. Consequently, I use the aoc.py script to run solutions like so:

uv run aoc.py -y 2023 1

Inputs

Inputs are SOPS-encrypted using age. To decrypt/encrypt files, I use tasks from mise. They're documented below:

input

  • Depends: input:*

  • Usage: mise run input

Encrypt and decrypt all input files

input:decrypt

  • Usage: mise run input:decrypt

Decrypt all secret files

input:encrypt

  • Usage: mise run input:encrypt

Encrypt all non-secret files

Testing

I use pytest for validating that my solution matches the expected output from the sample data in each problem. To run a test using a task defined in mise:

mise run test --year 2023 1

Prior Years

I'm trying to use just 1 repo going forward since I found a structure that works for me and is re-usable across years.

My prior years are available in other repos: