Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wbh1/adventofcode
2023 (and beyond) Advent of Code solutions
https://github.com/wbh1/adventofcode
Last synced: 21 days ago
JSON representation
2023 (and beyond) Advent of Code solutions
- Host: GitHub
- URL: https://github.com/wbh1/adventofcode
- Owner: wbh1
- Created: 2023-12-01T14:15:10.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-26T19:55:22.000Z (28 days ago)
- Last Synced: 2024-11-26T20:31:33.539Z (28 days ago)
- Language: Python
- Homepage:
- Size: 125 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code 2023-????
I'm using Python because I don't have the time to use Go :(
## Usage
I rely on [uv](https://docs.astral.sh/uv) for my Python projects. Consequently, I use the `aoc.py` script to run solutions like so:
```sh
uv run aoc.py -y 2023 1
```## Inputs
Inputs are [SOPS](https://getsops.io/docs/#encrypting-using-age)-encrypted using `age`. To decrypt/encrypt files, I use tasks from [mise](https://mise.jdx.dev/tasks/running-tasks.html). 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`:
```console
❯ 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:
- [2018](https://github.com/wbh1/advent-of-code2018)
- [2019](https://github.com/wbh1/adventofcode2019)
- [2020](https://github.com/wbh1/adventofcode2020)
- [2021](https://github.com/wbh1/adventofcode2021)
- [2022](https://github.com/wbh2/adventofcode2022)