From f40d33b9b43154067d9345eff93dbeeb860ad5dc Mon Sep 17 00:00:00 2001 From: Ross Fenning Date: Tue, 14 Dec 2021 11:19:02 +0000 Subject: [PATCH 1/3] Update in line with latest biscuit template --- .pre-commit-config.yaml | 9 +++++---- pyproject.toml | 1 + tox.ini | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index acc62ac..b3f206d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: - id: check-yaml - id: debug-statements - repo: https://github.com/psf/black - rev: 21.9b0 + rev: 21.6b0 hooks: - id: black language_version: python3.9 @@ -21,17 +21,18 @@ repos: - id: autoflake args: [ '--in-place', '--remove-all-unused-imports', '--remove-unused-variable' ] - repo: https://github.com/PyCQA/isort - rev: 5.9.3 + rev: 5.9.1 hooks: - id: isort args: ['--line-length=79'] language_version: python3.9 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.910-1 + rev: v0.902 hooks: - id: mypy + additional_dependencies: [types-requests, types-PyYAML, types-Flask, types-Werkzeug] - repo: https://github.com/asottile/pyupgrade - rev: v2.29.0 + rev: v2.19.4 hooks: - id: pyupgrade args: [--py36-plus] diff --git a/pyproject.toml b/pyproject.toml index bd35b30..4a25e75 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,7 @@ exclude = ''' | \.mypy_cache | \.tox | \.venv + | \.direnv | venv | _build | buck-out diff --git a/tox.ini b/tox.ini index abbe33a..c8289ec 100644 --- a/tox.ini +++ b/tox.ini @@ -9,5 +9,5 @@ deps= commands= pip install .[test] black --verbose -l 79 --check --diff . - pylama --ignore E501,W503 --skip 'venv/*,.tox/*,.eggs/*' + pylama --ignore E501,W503,E203 --skip 'venv/*,.direnv/*,.tox/*,.eggs/*' py.test From 2b4ecdb9859bdd7240c1f574ce049c5c17a7040d Mon Sep 17 00:00:00 2001 From: Ross Fenning Date: Tue, 14 Dec 2021 11:35:20 +0000 Subject: [PATCH 2/3] Update in line with latest biscuit template --- python.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 python.yml diff --git a/python.yml b/python.yml new file mode 100644 index 0000000..280f249 --- /dev/null +++ b/python.yml @@ -0,0 +1,48 @@ +name: python + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ 3.7, 3.8, 3.9 ] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: '0' + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Install build tools + run: | + python -m pip install --upgrade pip + pip install -U black pylama wheel pip tox + pip install . + - name: Set build name + run: echo "::set-output name=${GITHUB_REPOSITORY}-$(python setup.py --version)" + - name: Lint + run: | + - name: Run Tox + # Run tox using the version of Python in `PATH` + run: tox -e py + - name: Build Package + if: matrix.python-version == 3.9 && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + run: | + python setup.py sdist bdist_wheel + - name: Publish package + if: matrix.python-version == 3.9 && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_password }} From bc5c650199cf90ef30976000c90cb57ec94fcae2 Mon Sep 17 00:00:00 2001 From: Ross Fenning Date: Tue, 14 Dec 2021 11:40:42 +0000 Subject: [PATCH 3/3] Update in line with latest biscuit template --- python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python.yml b/python.yml index 280f249..3839b59 100644 --- a/python.yml +++ b/python.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.7, 3.8, 3.9 ] + python-version: [ 3.7, 3.8, 3.9, 3.10 ] steps: - uses: actions/checkout@v2