Advent of Code 2023 daily programming challenge, christmas themed. Website here.
Current version is 0.1.0 and was set according to Semantic Versioning.
Project's version should be updated, when applicable:
- In this very file.
- In the changelog.
- In the __init__.py file inside aoc2023
- In the pyproject.toml file.
In order to generate documentation, simply run:
poetry run pdoc -o docs -d google aoc2023
In order to install the project, simply run:
poetry install
In order to generate a .whl file to distribute the project, simply run:
poetry build
In order to run project tests, simply run:
poetry run pytest tests --doctest-modules
In order to generate XML and HTML reports, run this instead:
poetry run pytest tests --doctest-modules --junit-xml=reports/junit/junit-test-report.xml --html=reports/junit/html-test-report.html
To run each day problems, it is needed to provide the adequate input file. For example, for day one:
aoc2023 day1 data/inputs/input_d1.txt
In order to execute the second part of a day's problem, the -p flag can be used:
aoc2023 day1 data/inputs/input_d1.txt -p 2
Help on the executable can be found using -h/--help flag.
To generate project badges, simply ## Building
- Unit Tests
genbadge tests -i reports/junit/junit-test-report.xml -o reports/badges/junit-tests-badge.svg
- Flake8
genbadge flake8 -i reports/flake8/flake8stats.txt -o reports/badges/flake8-badge.svg
- Code Coverage
genbadge coverage -i reports/coverage/cov.xml -o reports/badges/cov-badge.svg
An utility script, called gen-badges.sh has been provided in order to generate them.
See license file for more information.