-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
350 additions
and
255 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,37 @@ | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
unit_tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10'] | ||
|
||
steps: | ||
# Checks out a copy of your repository on the ubuntu-latest machine | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest flake8 | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with flake8 | ||
run: | | ||
flake8 dali2mqtt --count --show-source --statistics --max-line-length=127 | ||
- name: Test with pytest | ||
timeout-minutes: 3 | ||
run: | | ||
pytest -vvv |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
"""DALI 2 MQTT package.""" |
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,8 +1,9 @@ | ||
"""Constants common the various modules.""" | ||
|
||
import logging | ||
|
||
"""Constants common the various modules.""" | ||
__author__ = "Diogo Gomes" | ||
__version__ = "0.0.1" | ||
__version__ = "0.0.3" | ||
__email__ = "[email protected]" | ||
|
||
HASSEB = "hasseb" | ||
|
@@ -52,6 +53,7 @@ | |
|
||
MIN_HASSEB_FIRMWARE_VERSION = 2.3 | ||
MIN_BACKOFF_TIME = 2 | ||
MAX_BACKOFF_TIME = 10 | ||
MAX_RETRIES = 10 | ||
|
||
ALL_SUPPORTED_LOG_LEVELS = { | ||
|
Oops, something went wrong.