File tree 5 files changed +19
-37
lines changed
5 files changed +19
-37
lines changed Original file line number Diff line number Diff line change 11
11
branches : [ master ]
12
12
13
13
jobs :
14
-
15
- lint :
16
- runs-on : ubuntu-latest
17
- steps :
18
- - uses : actions/checkout@v2
19
- - name : Set up Python ${{ matrix.python-version }}
20
- uses : actions/setup-python@v2
21
- with :
22
- python-version : 3.7
23
- - name : Install dependencies
24
- run : |
25
- python -m pip install --upgrade pip
26
- pip install torch==1.9.0+cpu torchvision==0.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
27
- make install_dev
28
- - name : Run Flake8
29
- run : make flake8
30
- - name : Run Black
31
- run : make black
32
14
33
15
test :
34
16
runs-on : ubuntu-latest
35
- needs : [lint]
36
17
steps :
37
18
- uses : actions/checkout@v2
38
19
- name : Set up Python ${{ matrix.python-version }}
44
25
python -m pip install --upgrade pip
45
26
pip install torch==1.9.0+cpu torchvision==0.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
46
27
make install_dev
47
- - name : Run Flake8
48
- run : make flake8
49
- - name : Run Tests
50
- run : make test
Original file line number Diff line number Diff line change
1
+ default_language_version :
2
+ python : python3
3
+
4
+ ci :
5
+ autofix_prs : true
6
+ autoupdate_commit_msg : " [pre-commit.ci] pre-commit suggestions"
7
+ autoupdate_schedule : quarterly
8
+ # submodules: true
9
+
1
10
repos :
2
11
- repo : https://github.com/psf/black
3
12
rev : 22.3.0
4
13
hooks :
5
14
- id : black
6
- args : [ --config=pyproject.toml ]
15
+ args : ["--config=pyproject.toml"]
16
+
7
17
- repo : https://github.com/pycqa/flake8.git
8
18
rev : 4.0.1
9
19
hooks :
10
20
- id : flake8
11
- args : [ --config=.flake8 ]
12
- additional_dependencies : [ flake8-docstrings==1.6.0 ]
21
+ args : ["--config=.flake8"]
22
+ additional_dependencies :
23
+ - " flake8-docstrings==1.6.0"
Original file line number Diff line number Diff line change @@ -16,10 +16,7 @@ table:
16
16
table_timm :
17
17
.venv/bin/python misc/generate_table_timm.py
18
18
19
- black : .venv
20
- .venv/bin/black ./segmentation_models_pytorch --config=pyproject.toml --check
19
+ precommit : install_dev
20
+ .venv/bin/pre-commit run --all-files
21
21
22
- flake8 : .venv
23
- .venv/bin/flake8 ./segmentation_models_pytorch --config=.flake8
24
-
25
- all : black flake8 test
22
+ all : precommit test
Original file line number Diff line number Diff line change @@ -475,10 +475,10 @@ $ pip install git+https://github.com/qubvel/segmentation_models.pytorch
475
475
make install_dev # create .venv, install SMP in dev mode
476
476
```
477
477
478
- #### Run tests and code checks
478
+ #### Run tests and code checks
479
479
480
480
``` bash
481
- make all # run flake8, black , tests
481
+ make all # run precommit , tests
482
482
```
483
483
484
484
#### Update table with encoders
Original file line number Diff line number Diff line change 40
40
"pytest" ,
41
41
"mock" ,
42
42
"pre-commit" ,
43
- "black==22.3.0" ,
44
- "flake8==4.0.1" ,
45
- "flake8-docstrings==1.6.0" ,
46
43
],
47
44
}
48
45
You can’t perform that action at this time.
0 commit comments