rhbvkleef / aoc-2018

Solutions for Advent Of Code 2018, written in Python 3

Home Page:https://adventofcode.com/2018

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Advent of code 2018 in Python

Advent of code License Python 3..6.6 Pipenv GitHub top language GitHub last commit Build Status Coverage

Installation

This project requires python 3.6 or higher. It also requires either pipenv or pip3.6 or higher.

Plain pip

pip3 install -r requirements.txt

Pip with virtualenv

Requires python3.6+, pip3.6+ and python3-virtualenv.

Linux/MacOS:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Winsux (Some might call it Windows):

virtualenv venv
venv\Scripts\activate.bat
pip install -r requirements.txt

Pipenv

pipenv install

Build information

This project is automatically built by my TeamCity CI server. That means that all test results and run results are available online.

How to use

This project defines a few commands:

new ([int]|"all")?

Creates a template for the given days, all days, or, when no day is specified, the current day.

It also automatically downloads the required puzzle input and wires it to your code as a string input in self.data.

run ([int(.int)?]|"all")?

Runs the code for the given days, all days, or, when no day is specified, the current day.

It is also possible to specify specific parts of each day to be run.

Examples:

  • ./manage.py run Runs both parts for today
  • ./manage.py run 5.1 Only runs the first part of day 5
  • ./manage.py run all Runs all parts of all days

test ([int(.int)?]|"all")?

Runs the unittests for the given days, all days, or, when no day is specified, the current day.

It is also possible to specify specific parts of each day to be run.

Examples:

  • ./manage.py test Runs both parts for today
  • ./manage.py test 5.1 Only runs the first part of day 5
  • ./manage.py test all Runs all parts of all days

auto ([int(.int)?]|"all")?

Runs new for each given day, when no template exists. If that is not the case, it will run unittests, and if they are successful, runs the actual input.

About

Solutions for Advent Of Code 2018, written in Python 3

https://adventofcode.com/2018

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 81.5%Language:HTML 9.5%Language:Kotlin 9.0%