File tree Expand file tree Collapse file tree 5 files changed +19
-37
lines changed Expand file tree Collapse file tree 5 files changed +19
-37
lines changed Original file line number Diff line number Diff line change 1111 branches : [ master ]
1212
1313jobs :
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
3214
3315 test :
3416 runs-on : ubuntu-latest
35- needs : [lint]
3617 steps :
3718 - uses : actions/checkout@v2
3819 - name : Set up Python ${{ matrix.python-version }}
4425 python -m pip install --upgrade pip
4526 pip install torch==1.9.0+cpu torchvision==0.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
4627 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+
110repos :
211 - repo : https://github.com/psf/black
312 rev : 22.3.0
413 hooks :
514 - id : black
6- args : [ --config=pyproject.toml ]
15+ args : ["--config=pyproject.toml"]
16+
717 - repo : https://github.com/pycqa/flake8.git
818 rev : 4.0.1
919 hooks :
1020 - 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:
1616table_timm :
1717 .venv/bin/python misc/generate_table_timm.py
1818
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
2121
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
475475make install_dev # create .venv, install SMP in dev mode
476476```
477477
478- #### Run tests and code checks
478+ #### Run tests and code checks
479479
480480``` bash
481- make all # run flake8, black , tests
481+ make all # run precommit , tests
482482```
483483
484484#### Update table with encoders
Original file line number Diff line number Diff line change 4040 "pytest" ,
4141 "mock" ,
4242 "pre-commit" ,
43- "black==22.3.0" ,
44- "flake8==4.0.1" ,
45- "flake8-docstrings==1.6.0" ,
4643 ],
4744}
4845
You can’t perform that action at this time.
0 commit comments