A place to keep my python solutions to Advent of Code 2021.
Solutions are by no means optimal, but a number of tools have been used to help with clean code and easy use.
- Pyenv with python >=3.7, for its flexible environment support
- Poetry for packaging and dependency management
- Pre-commit to enforce consistency
- Make for ease of command line tools
If you want to try out the code but don't want to bother with the above - all you really need is numpy
and pandas
!
Set up a poetry environment with pre-commit git hooks installed:
make env
To activate your poetry shell to run the code, you can invoke a poetry shell directly
poetry shell
Or if you want your typical bash setup in this shell, you can use a make
command:
make shell
To run pre-commit hooks manually:
make lint