Skip to content

Commit

Permalink
fix up pre-commit, run in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli authored and brandonwillard committed Dec 6, 2020
1 parent 3aa092f commit 8e3e839
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 37 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,9 @@ jobs:
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.changes == 'true' }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U black flake8 isort
- name: Check the style
run: |
black -t py36 --check theano/ tests/ setup.py conftest.py
isort --check theano/ tests/ setup.py conftest.py
flake8
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]

test:
name: "Test py${{ matrix.python-version }}: ${{ matrix.part }}"
Expand All @@ -63,7 +52,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.changes == 'true' && needs.style.result == 'success' }}
strategy:
fail-fast: false
fail-fast: true
matrix:
python-version: ["3.6", "3.7"]
fast-compile: [0]
Expand Down
30 changes: 8 additions & 22 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
exclude: |
(?x)^(
versioneer\.py|
theano/_version\.py|
doc/.*|
bin/.*
)$
repos:
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
language_version: python3
exclude: |
(?x)^(
versioneer\.py|
theano/_version\.py|
doc/.*|
bin/.*
)$
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
exclude: |
(?x)^(
versioneer\.py|
theano/_version\.py|
doc/.*|
bin/.*
)$
- repo: https://github.com/pycqa/isort
rev: 5.5.2
rev: 5.6.4
hooks:
- id: isort
exclude: |
(?x)^(
versioneer\.py|
theano/_version\.py|
doc/.*|
bin/.*
)$
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ per-file-ignores =
tests/gpuarray/test_elemwise.py:E402
tests/gpuarray/test_others.py:E402
tests/gpuarray/test_basic_ops.py:E402
theano/gof/unify.py:F811
exclude =
versioneer.py
doc/
Expand Down

0 comments on commit 8e3e839

Please sign in to comment.