Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
sschirr committed Mar 13, 2022
2 parents ce2855e + af1e31a commit 9550567
Show file tree
Hide file tree
Showing 182 changed files with 7,336 additions and 4,902 deletions.
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/missing-model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Missing model information for a supported device
about: Inform about functioning device that prints out a warning about unsupported model
title: ''
labels: missing model
assignees: ''

---

If you are receiving a warning indicating an unsupported model (`Found an unsupported model '<model>' for class '<class>'.`),
this means that the implementation does not list your model as supported.

If it is working fine for you nevertheless, feel free to open an issue or create a PR to add the model to the `_supported_models` ([example](https://github.com/rytilahti/python-miio/blob/72cd423433ad71918b5a8e55833a5b2eda9877a5/miio/integrations/vacuum/roborock/vacuum.py#L125-L153)) for that class.

Before submitting, use the search to see if there is an existing issue for the device model, thanks!

**Device information:**

- Name(s) of the device:
- Link:

Use `miiocli device --ip <ip address> --token <token>`.

- Model: [e.g., lumi.gateway.v3]
- Hardware version:
- Firmware version:
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
python-version: ["3.9"]
python-version: ["3.10"]

steps:
- uses: "actions/checkout@v2"
Expand All @@ -26,6 +26,9 @@ jobs:
run: |
python -m pip install --upgrade pip poetry
poetry install --extras docs
- name: "Run pyupgrade"
run: |
poetry run pre-commit run pyupgrade --all-files
- name: "Code formating (black)"
run: |
poetry run pre-commit run black --all-files
Expand Down Expand Up @@ -55,7 +58,7 @@ jobs:

strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "pypy3"]
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy3"]
os: [ubuntu-latest, macos-latest, windows-latest]
# test pypy3 only on ubuntu as cryptography requires rust compilation
# which slows the pipeline and was not currently working on macos
Expand All @@ -78,6 +81,6 @@ jobs:
run: |
poetry run pytest --cov miio --cov-report xml
- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v1"
uses: "codecov/codecov-action@v2"
with:
fail_ci_if_error: true
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish packages
on:
release:
types: [published]

jobs:
build-n-publish:
name: Build release packages
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish release on pypi
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
5 changes: 5 additions & 0 deletions .github_changelog_generator
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
breaking_labels=breaking change
issues=false
add-sections={"newdevs":{"prefix":"**New devices:**","labels":["new device"]},"docs":{"prefix":"**Documentation updates:**","labels":["documentation"]}}
release_branch=master
usernames-as-github-logins=true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ __pycache__
.coverage

docs/_build/
.vscode/settings.json
24 changes: 15 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -12,19 +12,19 @@ repos:
- id: check-ast

- repo: https://github.com/psf/black
rev: 20.8b1
rev: 21.12b0
hooks:
- id: black
language_version: python3

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.7.0
rev: v5.9.3
hooks:
- id: isort
additional_dependencies: [toml]

- repo: https://github.com/PyCQA/doc8
rev: 0.8.1
rev: 0.10.1
hooks:
- id: doc8

Expand All @@ -35,20 +35,26 @@ repos:
args: [--in-place, --wrap-summaries, '88', --wrap-descriptions, '88']

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings, flake8-bugbear, flake8-builtins, flake8-print, flake8-pytest-style, flake8-return, flake8-simplify, flake8-annotations]

- repo: https://github.com/PyCQA/bandit
rev: 1.7.0
rev: 1.7.1
hooks:
- id: bandit
args: [-x, 'tests']
args: [-x, 'tests', -x, '**/test_*.py']


- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
rev: v0.920
hooks:
- id: mypy
# args: [--no-strict-optional, --ignore-missing-imports]
additional_dependencies: [types-attrs, types-PyYAML, types-requests, types-pytz, types-croniter]

- repo: https://github.com/asottile/pyupgrade
rev: v2.29.1
hooks:
- id: pyupgrade
args: ['--py37-plus']
Loading

0 comments on commit 9550567

Please sign in to comment.