-
(Optional) Set the environment variable
ADVENT_SESSION_COOKIE
or add it to to your adventofcode session cookie to automatically download your problem input. This can be find in the "Application > Storage > Cookies" section of the Chrome Developer Tools while visiting https://adventofcode.com . -
Generate the scaffolding for today's question
poetry shell python -m python.run scaffold
-
Paste the sample input and answer(s) into
examples/{year}/{day}.yaml
. For example:input: |- A Y B X C Z answers: - 15 - 12
Scaffolding will generate an empty solution file with 2 methods - part1
and part2
.
python/solutions/{year}/dayXY.py
def part1(text: str) -> int | None:
return None
def part2(text: str) -> int | None:
return None
Unit Tests will be automatically generated based on the examples specified in the above yaml. Simply run:
poetry run pytest
Once you are satisfied with today's answer, generate your answer with:
python -m python.run solve