-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use poetry, add pre-commit hooks & mass format to modern standards, a…
…dd CI (#47) * Use poetry, add pre-commit hooks & mass format to modern standards, add CI * Remove requirements.txt, add codecov dep * Add construct dep * Remove mac & windows builds as bluepy is linux-only
- Loading branch information
Showing
14 changed files
with
378 additions
and
193 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
branches: ["master"] | ||
workflow_dispatch: # to allow manual re-runs | ||
|
||
|
||
jobs: | ||
linting: | ||
name: "Perform linting checks" | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
|
||
steps: | ||
- uses: "actions/checkout@v2" | ||
- uses: "actions/setup-python@v2" | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
- name: "Install dependencies" | ||
run: | | ||
python -m pip install --upgrade pip poetry tox | ||
poetry install | ||
- name: "Run pre-commit -a" | ||
run: | | ||
poetry run pre-commit run -a | ||
tests: | ||
name: "Python ${{ matrix.python-version}} on ${{ matrix.os }}" | ||
needs: linting | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7"] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: "actions/checkout@v2" | ||
- uses: "actions/setup-python@v2" | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
- name: "Install dependencies" | ||
run: | | ||
python -m pip install --upgrade pip poetry | ||
poetry install | ||
- name: "Run tests" | ||
run: | | ||
poetry run pytest --cov eq3bt --cov-report xml |
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,37 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-docstring-first | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: check-ast | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.31.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: ['--py37-plus'] | ||
|
||
- repo: https://github.com/python/black | ||
rev: 22.1.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.10.1 | ||
hooks: | ||
- id: isort | ||
additional_dependencies: [toml] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.931 | ||
hooks: | ||
- id: mypy |
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 |
---|---|---|
|
@@ -205,5 +205,3 @@ Changelog | |
- Initial Commit Version 0.2.0. [Markus Peter] | ||
|
||
- Initial commit. [Markus Peter] | ||
|
||
|
Empty file.
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,3 +1,3 @@ | ||
# flake8: noqa | ||
from .eq3btsmart import Thermostat, TemperatureException, Mode | ||
from .structures import * | ||
from .eq3btsmart import Mode, TemperatureException, Thermostat | ||
from .structures import * |
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.