From dcb206fc9844ac4567a384e0fb9103881c8519f7 Mon Sep 17 00:00:00 2001 From: Ryan Reed Date: Wed, 1 Dec 2021 18:30:16 -0500 Subject: [PATCH] Initial commit --- .gitignore | 146 +++++++++++++++++++++++++++++++++++++++++++++++ README.md | 24 ++++++++ requirements.txt | 35 ++++++++++++ 3 files changed, 205 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8ad561b --- /dev/null +++ b/.gitignore @@ -0,0 +1,146 @@ +*.sw[a-p] + +# Created by https://www.toptal.com/developers/gitignore/api/python +# Edit at https://www.toptal.com/developers/gitignore?templates=python + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# End of https://www.toptal.com/developers/gitignore/api/python diff --git a/README.md b/README.md new file mode 100644 index 0000000..e2fa927 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +# Overview + +My solutions for [Advent of Code](https://adventofcode.com) + +Hopefully I keep up with it + + +# Testing/Verifying Solutions + +Each day will include a pytest script that uses examples from the day. +This allows for verifying the code works by running `pytest`. For example: + +``` +|--% pytest -v puzzles/test_day01.py +================================================================================= test session starts ================================================================================= +platform linux -- Python 3.9.7, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- tmp/venv-2021-advent-of-code/bin/python3 +cachedir: .pytest_cache +rootdir: 2021-advent-of-code +collected 2 items + +puzzles/test_day01.py::test_example1 PASSED [ 50%] +puzzles/test_day01.py::test_example2 PASSED [100%] +================================================================================== 2 passed in 0.06s ================================================================================== +``` diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3e31345 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,35 @@ +advent-of-code-data==1.1.1 +attrs==21.2.0 +backports.zoneinfo==0.2.1 +beautifulsoup4==4.10.0 +black==21.11b1 +certifi==2021.10.8 +charset-normalizer==2.0.8 +click==8.0.3 +idna==3.3 +iniconfig==1.1.1 +isort==5.10.1 +mypy-extensions==0.4.3 +numpy==1.21.4 +packaging==21.3 +pathspec==0.9.0 +Pebble==4.6.3 +platformdirs==2.4.0 +pluggy==1.0.0 +py==1.11.0 +pyparsing==3.0.6 +pytest==6.2.5 +python-dateutil==2.8.2 +python-dotenv==0.19.2 +pytz-deprecation-shim==0.1.0.post0 +regex==2021.11.10 +requests==2.26.0 +six==1.16.0 +soupsieve==2.3.1 +termcolor==1.1.0 +toml==0.10.2 +tomli==1.2.2 +typing-extensions==4.0.1 +tzdata==2021.5 +tzlocal==4.1 +urllib3==1.26.7