-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from 2Fake/ci
Add yapf, isort, and end-of-file-fixer to CI
- Loading branch information
Showing
23 changed files
with
130 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ jobs: | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
LABEL: "# TODO:" | ||
COMMENT_MARKER: "#" | ||
id: "todo" | ||
id: "todo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,19 @@ on: [push] | |
|
||
jobs: | ||
|
||
format: | ||
name: Check formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Check formatting | ||
uses: pre-commit/[email protected] | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
|
@@ -19,7 +32,7 @@ jobs: | |
python -m pip install --upgrade pip | ||
pip install flake8 | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --ignore=E303,W503 --statistics --exclude=.*,devolo_plc_api/*/devolo_idl_*.py | ||
flake8 . --count --exit-zero --statistics | ||
- name: Lint with pylint | ||
run: | | ||
pip install pylint | ||
|
@@ -76,7 +89,7 @@ jobs: | |
run: | | ||
python -m pip install --upgrade pip | ||
pip install wheel coveralls==1.10.0 | ||
export COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_TOKEN }} | ||
export COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_TOKEN }} | ||
coveralls | ||
- name: Clean up coverage | ||
uses: geekyeggo/delete-artifact@v1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,6 +138,5 @@ dmypy.json | |
### PyCharm ### | ||
.idea | ||
|
||
|
||
### Testfile ### | ||
test.py | ||
test.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/mirrors-yapf | ||
rev: '' | ||
hooks: | ||
- id: yapf | ||
- repo: https://github.com/pycqa/isort | ||
rev: '' | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: '' | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
devolo_plc_api/*/devolo_idl_*.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
from devolo_plc_api.device import Device | ||
|
||
|
||
# IP of the device to query | ||
IP = "192.168.0.10" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,34 @@ | ||
[aliases] | ||
test=pytest | ||
[flake8] | ||
max-complexity = 10 | ||
max-cognitive-complexity = 5 | ||
max-line-length = 127 | ||
ignore = E303,W503 | ||
exclude = .*,devolo_plc_api/*/devolo_idl_*.py | ||
|
||
[isort] | ||
filter_files = True | ||
ignore_whitespace = True | ||
line_length = 127 | ||
multi_line_output = 1 | ||
order_by_type = True | ||
skip_glob = *_pb2.py | ||
|
||
[mypy] | ||
ignore_missing_imports = True | ||
|
||
[mypy-devolo_plc_api.plcnet_api.devolo_idl_proto_plcnetapi_getnetworkoverview_pb2] | ||
ignore_errors = True | ||
|
||
[mypy-devolo_plc_api.device_api.devolo_idl_proto_deviceapi_updatefirmware_pb2] | ||
ignore_errors = True | ||
|
||
[mypy-devolo_plc_api.device_api.devolo_idl_proto_deviceapi_wifinetwork_pb2] | ||
ignore_errors = True | ||
|
||
[yapf] | ||
blank_line_before_nested_class_or_def = True | ||
column_limit = 127 | ||
force_multiline_dict = True | ||
split_all_comma_separated_values = True | ||
split_before_arithmetic_operator = True | ||
split_complex_comprehension = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.