From efc84afc4b89bdf6ba5489a0c6a1b672112d3d05 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 12 Apr 2020 14:32:55 +0100 Subject: [PATCH] Init python environment --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ .gitignore | 2 ++ dev-requirements.txt | 11 +++++++++++ requirements.txt | 0 setup.cfg | 16 ++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 dev-requirements.txt create mode 100644 requirements.txt create mode 100644 setup.cfg diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c1b37e6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('dev-requirements.txt') }} + - name: Install dependencies + run: pip install -r dev-requirements.txt diff --git a/.gitignore b/.gitignore index 32a75e6..2186486 100644 --- a/.gitignore +++ b/.gitignore @@ -212,3 +212,5 @@ dmypy.json .pyre/ # End of https://www.gitignore.io/api/node,python + +env/ diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000..9fb9c78 --- /dev/null +++ b/dev-requirements.txt @@ -0,0 +1,11 @@ +-r requirements.txt + +black==19.10b0 +flake8==3.7.9 +isort==4.3.21 +mypy==0.770 +flake8-bugbear==20.1.4 +flake8-builtins==1.5.2 +flake8-comprehensions==3.2.2 +flake8-mutable==1.2.0 +flake8-tuple==0.4.1 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..e9892c6 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,16 @@ +[mypy] +warn_unused_ignores = True +strict_optional = True +check_untyped_defs = True +ignore_missing_imports = True + +[flake8] +extend_ignore=E128,E501 + +[isort] +multi_line_output=3 +include_trailing_comma=True +force_grid_wrap=0 +use_parentheses=True +line_length=88 +not_skip=__init__.py