Skip to content

Commit e7d9cfd

Browse files
committed
misc framework updates
1 parent 88669e6 commit e7d9cfd

File tree

4 files changed

+19
-23
lines changed

4 files changed

+19
-23
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,12 @@ name: Test
22
on: [push, pull_request]
33
jobs:
44
check:
5-
if: github.event_name != 'pull_request' || github.head_ref != 'devel'
5+
if: github.event_name != 'pull_request' || github.repository_owner != 'NiftyPET'
66
runs-on: ubuntu-latest
7-
strategy:
8-
matrix:
9-
python: [3.6, 3.9]
10-
name: Check py${{ matrix.python }}
7+
name: Check
118
steps:
129
- uses: actions/checkout@v2
1310
- uses: actions/setup-python@v2
14-
with:
15-
python-version: ${{ matrix.python }}
1611
- name: set PYSHA
1712
run: echo "PYSHA=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
1813
- uses: actions/cache@v1
@@ -24,7 +19,7 @@ jobs:
2419
pip install -U pre-commit
2520
sudo apt-get install -yqq clang-format
2621
- uses: reviewdog/action-setup@v1
27-
- if: github.event_name != 'schedule'
22+
- if: github.event_name == 'push' || github.event_name == 'pull_request'
2823
name: comment
2924
run: |
3025
if [[ $EVENT == pull_request ]]; then
@@ -39,20 +34,23 @@ jobs:
3934
EVENT: ${{ github.event_name }}
4035
- run: pre-commit run -a --show-diff-on-failure
4136
test:
42-
if: github.event_name != 'pull_request' || github.head_ref != 'devel'
37+
if: github.event_name != 'pull_request' || github.repository_owner != 'NiftyPET'
38+
name: Test py${{ matrix.python }}
4339
runs-on: [self-hosted, python, cuda, matlab]
44-
name: Test
40+
strategy:
41+
matrix:
42+
python: [3.6, 3.9]
4543
steps:
4644
- uses: actions/checkout@v2
4745
with:
4846
fetch-depth: 0
4947
- name: Run setup-python
50-
run: setup-python -p3.7
48+
run: setup-python -p${{ matrix.python }}
5149
- run: pip install -U --no-binary nimpa -e .[dev]
5250
- run: pytest
53-
- run: codecov
51+
- uses: codecov/codecov-action@v1
5452
- name: Post Run setup-python
55-
run: setup-python -p3.7 -Dr
53+
run: setup-python -p${{ matrix.python }} -Dr
5654
if: ${{ always() }}
5755
deploy:
5856
needs: [check, test]

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ repos:
2121
- id: todo
2222
name: Check TODO
2323
language: pygrep
24+
args: [-i]
2425
entry: TODO
2526
types: [text]
2627
exclude: ^(.pre-commit-config.yaml|.github/workflows/test.yml)$
27-
args: [-i]
2828
- repo: https://gitlab.com/pycqa/flake8
2929
rev: 3.9.2
3030
hooks:
@@ -36,7 +36,7 @@ repos:
3636
- flake8-debugger
3737
- flake8-string-format
3838
- repo: https://github.com/google/yapf
39-
rev: 6db9374
39+
rev: v0.31.0
4040
hooks:
4141
- id: yapf
4242
args: [-i]
@@ -45,7 +45,7 @@ repos:
4545
hooks:
4646
- id: isort
4747
- repo: https://github.com/doublify/pre-commit-clang-format
48-
rev: master
48+
rev: '6230247'
4949
hooks:
5050
- id: clang-format
5151
files: \.(cc?|cuh?|cxx|cpp|h|hpp|hxx|java|js)$

setup.cfg

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,13 @@ dev=
6464
pytest-cov
6565
pytest-timeout
6666
pytest-xdist
67-
codecov
6867
examples=jupyter; ipywidgets; matplotlib; brainweb
6968

69+
[flake8]
70+
max_line_length=99
71+
extend-ignore=W504,E225,E261,E701,P1
72+
exclude=.git,__pycache__,build,dist,.eggs
73+
7074
[yapf]
7175
spaces_before_comment=15, 20
7276
arithmetic_precedence_indication=true
@@ -83,12 +87,6 @@ profile=black
8387
line_length=99
8488
known_first_party=niftypet,tests
8589

86-
[flake8]
87-
statistics=True
88-
max_line_length=99
89-
extend-ignore=W504,E225,E261,E701,P1
90-
exclude=.git,__pycache__,build,dist,.eggs
91-
9290
[tool:pytest]
9391
timeout=3600
9492
log_level=INFO

setup.py

100644100755
File mode changed.

0 commit comments

Comments
 (0)