Skip to content

Commit

Permalink
ci: autoupdate pre-commit hooks through GitHub (#77)
Browse files Browse the repository at this point in the history
* ci: upgrade developer dependencies
  • Loading branch information
redeboer authored Mar 29, 2021
1 parent 186ed1b commit 359f47c
Show file tree
Hide file tree
Showing 27 changed files with 218 additions and 129 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/requirements-cron.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cspell:ignore noreply
# cspell:ignore autoupdate noreply

name: Requirements (scheduled)

Expand All @@ -8,7 +8,7 @@ on:
workflow_dispatch:

jobs:
upgrade:
upgrade-reqs:
name: Upgrade requirement files
runs-on: ubuntu-20.04
strategy:
Expand All @@ -27,26 +27,50 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pip-tools
pip install pip-tools!=6.0.0
# https://github.com/jazzband/pip-tools/pull/1353
- name: Upgrade dependencies
run: bash reqs/upgrade.sh
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.python-version }}
path: reqs/${{ matrix.python-version }}

upgrade-pre-commit:
name: Upgrade pre-commit hooks
needs:
- upgrade-reqs
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r reqs/3.7/requirements-sty.txt
- name: Perform style checks
run: pre-commit autoupdate
- uses: actions/upload-artifact@v2
with:
name: pre-commit
path: .pre-commit-config.yaml

push:
name: Create PR
runs-on: ubuntu-20.04
needs:
- upgrade
- upgrade-pre-commit
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT }}
- uses: actions/download-artifact@v2
with:
path: reqs
- run: mv -f reqs/pre-commit/.pre-commit-config.yaml .
- run: git status -s
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/requirements-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ jobs:
if: steps.git-diff.outputs.dependency-changes != ''
run: |
python -m pip install --upgrade pip
pip install pip-tools
pip install pip-tools!=6.0.0
# https://github.com/jazzband/pip-tools/pull/1353
- name: Upgrade dependencies
if: steps.git-diff.outputs.dependency-changes != ''
run: bash reqs/upgrade.sh
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
*.json
*.npy
*.pdf
*.pickle
*.png
*.svg
*.v2
*.xml
*.yaml
*.yml
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
rev: v3.4.0
hooks:
- id: check-ast
- id: check-case-conflict
Expand All @@ -31,12 +31,12 @@ repos:
- id: cspell

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.25.0
rev: v0.27.1
hooks:
- id: markdownlint

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.2.0
rev: v2.2.1
hooks:
- id: prettier
language_version: 12.18.2 # prettier does not specify node correctly
Expand Down
4 changes: 3 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

[BASIC]
good-names=
_,
i,
j,
k,
q,
x,
_,

[VARIABLES]
init-import=yes
Expand All @@ -30,6 +30,8 @@ disable=
[MASTER]
ignore=
conf.py
ignore-patterns=
.*\.pyi

[DESIGN]
# Minimum number of public methods for a class (see R0903). Default is 2.
Expand Down
4 changes: 3 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
".vscode/*",
".vscode/.gitignore",
"Makefile",
"docs/adr/*/*",
"codecov.yml",
"cspell.json",
"docs/_templates/*",
Expand All @@ -41,7 +42,8 @@
"requirements*.txt",
"setup.cfg",
"setup.py",
"tox.ini"
"tox.ini",
"typings"
],
"language": "en-US",
"words": [
Expand Down
5 changes: 2 additions & 3 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"exclude": [".git", ".tox", "docs/_build"],
"include": ["docs", "src", "tests"],
"include": ["docs/conf.py", "src", "tests"],
"reportGeneralTypeIssues": false,
"reportUnboundVariable": false,
"reportUnusedClass": true,
"reportUnusedFunction": true,
"reportUnusedImport": true,
"reportUnusedVariable": true,
"stubPath": ""
"reportUnusedVariable": true
}
22 changes: 11 additions & 11 deletions reqs/3.6/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ alabaster==0.7.12
anyio==2.2.0
appdirs==1.4.4
argon2-cffi==20.1.0
astroid==2.5.1
astroid==2.5.2
async-generator==1.10
attrs==20.3.0
babel==2.9.0
Expand Down Expand Up @@ -37,14 +37,14 @@ flake8-builtins==1.5.3
flake8-polyfill==1.0.2
flake8-rst-docstrings==0.0.14
flake8==3.9.0
gitdb==4.0.5
gitdb==4.0.7
gitpython==3.1.14
graphviz==0.16
identify==2.2.0
identify==2.2.2
idna==2.10
imagesize==1.2.0
immutables==0.15
importlib-metadata==3.7.3
importlib-metadata==3.9.0
importlib-resources==3.0.0
ipykernel==5.5.0
ipython-genutils==0.2.0
Expand All @@ -57,10 +57,10 @@ json5==0.9.5
jsonschema==3.2.0
jupyter-cache==0.4.2
jupyter-client==6.1.12
jupyter-console==6.3.0
jupyter-console==6.4.0
jupyter-core==4.7.1
jupyter-packaging==0.7.12
jupyter-server==1.4.1
jupyter-server==1.5.1
jupyter-sphinx==0.3.1
jupyter==1.0.0
jupyterlab-code-formatter==1.4.5
Expand All @@ -70,7 +70,7 @@ jupyterlab==3.0.12
kiwisolver==1.3.1
labels==20.1.0
latexcodec==2.0.1
lazy-object-proxy==1.5.2
lazy-object-proxy==1.6.0
livereload==2.6.3
markdown-it-py==0.6.2
markupsafe==1.1.1
Expand All @@ -91,7 +91,7 @@ nbformat==5.1.2
nbstripout==0.3.9
nest-asyncio==1.5.1
nodeenv==1.5.0
notebook==6.2.0
notebook==6.3.0
numpy==1.19.5
packaging==20.9
pandocfilters==1.4.3
Expand All @@ -106,7 +106,7 @@ pip-tools==6.0.1
pluggy==0.13.1
pre-commit==2.11.1
prometheus-client==0.9.0
prompt-toolkit==3.0.17
prompt-toolkit==3.0.18
ptyprocess==0.7.0
py==1.10.0
pybtex-docutils==1.0.0
Expand All @@ -116,7 +116,7 @@ pycparser==2.20
pydata-sphinx-theme==0.4.3
pydeps==1.9.13
pydocstyle==6.0.0
pyflakes==2.3.0
pyflakes==2.3.1
pygments==2.8.1
pylint==2.7.2
pyparsing==2.4.7
Expand All @@ -133,7 +133,7 @@ requests==2.25.1
restructuredtext-lint==1.3.2
send2trash==1.5.0
six==1.15.0
smmap==3.0.5
smmap==4.0.0
sniffio==1.2.0
snowballstemmer==2.1.0
soupsieve==2.2.1
Expand Down
12 changes: 6 additions & 6 deletions reqs/3.6/requirements-doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ decorator==4.4.2
defusedxml==0.7.1
docutils==0.16
entrypoints==0.3
gitdb==4.0.5
gitdb==4.0.7
gitpython==3.1.14
graphviz==0.16
idna==2.10
imagesize==1.2.0
importlib-metadata==3.7.3
importlib-metadata==3.9.0
importlib-resources==3.0.0
ipykernel==5.5.0
ipython-genutils==0.2.0
Expand All @@ -39,7 +39,7 @@ jinja2==2.11.3
jsonschema==3.2.0
jupyter-cache==0.4.2
jupyter-client==6.1.12
jupyter-console==6.3.0
jupyter-console==6.4.0
jupyter-core==4.7.1
jupyter-sphinx==0.3.1
jupyter==1.0.0
Expand All @@ -59,7 +59,7 @@ nbconvert==5.6.1
nbdime==2.1.0
nbformat==5.1.2
nest-asyncio==1.5.1
notebook==6.2.0
notebook==6.3.0
numpy==1.19.5
packaging==20.9
pandocfilters==1.4.3
Expand All @@ -68,7 +68,7 @@ pexpect==4.8.0
pickleshare==0.7.5
pillow==8.1.2
prometheus-client==0.9.0
prompt-toolkit==3.0.17
prompt-toolkit==3.0.18
ptyprocess==0.7.0
pybtex-docutils==1.0.0
pybtex==0.24.0
Expand All @@ -86,7 +86,7 @@ qtpy==1.9.0
requests==2.25.1
send2trash==1.5.0
six==1.15.0
smmap==3.0.5
smmap==4.0.0
snowballstemmer==2.1.0
soupsieve==2.2.1
sphinx-book-theme==0.0.42
Expand Down
10 changes: 5 additions & 5 deletions reqs/3.6/requirements-sty.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# pip-compile --no-annotate --output-file=reqs/3.6/requirements-sty.txt reqs/3.6/requirements-sty.in
#
appdirs==1.4.4
astroid==2.5.1
astroid==2.5.2
attrs==20.3.0
black==20.8b1
cfgv==3.2.0
Expand All @@ -22,15 +22,15 @@ flake8-builtins==1.5.3
flake8-polyfill==1.0.2
flake8-rst-docstrings==0.0.14
flake8==3.9.0
identify==2.2.0
importlib-metadata==3.7.3
identify==2.2.2
importlib-metadata==3.9.0
importlib-resources==3.0.0
ipython-genutils==0.2.0
isort==5.8.0
jsonschema==3.2.0
jupyter-core==4.7.1
kiwisolver==1.3.1
lazy-object-proxy==1.5.2
lazy-object-proxy==1.6.0
matplotlib==3.3.4
mccabe==0.6.1
mypy-extensions==0.4.3
Expand All @@ -45,7 +45,7 @@ pillow==8.1.2
pre-commit==2.11.1
pycodestyle==2.7.0
pydocstyle==6.0.0
pyflakes==2.3.0
pyflakes==2.3.1
pylint==2.7.2
pyparsing==2.4.7
pyrsistent==0.17.3
Expand Down
Loading

0 comments on commit 359f47c

Please sign in to comment.