Repository: plugwise/python-plugwise (language: python)

Issue:
Add python 3.10 checking, cleanup dependencies

Add python 3.10 checking, cleanup dependencies



Discussion / hints:
# [Codecov](https://codecov.io/gh/plugwise/python-plugwise/pull/111?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise) Report
> Merging [#111](https://codecov.io/gh/plugwise/python-plugwise/pull/111?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise) (7b3ca8b) into [main](https://codecov.io/gh/plugwise/python-plugwise/commit/43d8692ab600888f87ed55ecde0b1ef1b16a6005?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise) (43d8692) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/plugwise/python-plugwise/pull/111/graphs/tree.svg?width=650&height=150&src=pr&token=rGc80CfJhd&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise)](https://codecov.io/gh/plugwise/python-plugwise/pull/111?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise)

```diff
@@            Coverage Diff            @@
##              main      #111   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines         2067      2067           
=========================================
  Hits          2067      2067           
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/plugwise/python-plugwise/pull/111?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/plugwise/python-plugwise/pull/111?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise). Last update [43d8692...7b3ca8b](https://codecov.io/gh/plugwise/python-plugwise/pull/111?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise).

# [Codecov](https://codecov.io/gh/plugwise/python-plugwise/pull/111?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise) Report
> Merging [#111](https://codecov.io/gh/plugwise/python-plugwise/pull/111?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise) (7b3ca8b) into [main](https://codecov.io/gh/plugwise/python-plugwise/commit/43d8692ab600888f87ed55ecde0b1ef1b16a6005?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise) (43d8692) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/plugwise/python-plugwise/pull/111/graphs/tree.svg?width=650&height=150&src=pr&token=rGc80CfJhd&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise)](https://codecov.io/gh/plugwise/python-plugwise/pull/111?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise)

```diff
@@            Coverage Diff            @@
##              main      #111   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines         2067      2067           
=========================================
  Hits          2067      2067           
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/plugwise/python-plugwise/pull/111?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/plugwise/python-plugwise/pull/111?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise). Last update [43d8692...7b3ca8b](https://codecov.io/gh/plugwise/python-plugwise/pull/111?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plugwise).


Fix patch:
diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml
index c95dfa34a..5c3d7ffa1 100644
--- a/.github/workflows/merge.yml
+++ b/.github/workflows/merge.yml
@@ -4,7 +4,7 @@
 name: Latest release
 
 env:
-  CACHE_VERSION: 1
+  CACHE_VERSION: 3
   DEFAULT_PYTHON: 3.9
 
 # Only run on merges
diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml
index 2e43fb0bd..7af67abcd 100644
--- a/.github/workflows/verify.yml
+++ b/.github/workflows/verify.yml
@@ -4,8 +4,8 @@
 name: Latest commit
 
 env:
-  CACHE_VERSION: 11
-  DEFAULT_PYTHON: 3.9
+  CACHE_VERSION: 16
+  DEFAULT_PYTHON: "3.9"
   PRE_COMMIT_HOME: ~/.cache/pre-commit
 
 on:
@@ -45,10 +45,10 @@ jobs:
       - name: Create Python virtual environment
         if: steps.cache-venv.outputs.cache-hit != 'true'
         run: |
+          pip install virtualenv --upgrade
           python -m venv venv
           . venv/bin/activate
-          pip install -U pip setuptools
-          pip install -e .
+          pip install -U pip setuptools wheel
           pip install -r requirements_test.txt
       - name: Restore pre-commit environment from cache
         id: cache-precommit
@@ -156,7 +156,7 @@ jobs:
           pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual black
           pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual codespell
           pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual flake8
-          pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual isort
+          #pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual isort
           pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual mypy
           pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual userdata
           pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual yamllint
@@ -195,7 +195,6 @@ jobs:
           python -m venv venv
           . venv/bin/activate
           pip install -U pip setuptools wheel
-          pip install -e .
           pip install -r requirements_test.txt
 
   pytest:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 679903d68..320801a61 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,7 +1,7 @@
 repos:
   # Run manually in CI skipping the branch checks
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v3.2.0
+    rev: v4.1.0
     hooks:
       - id: check-executables-have-shebangs
         stages: [manual]
@@ -9,12 +9,12 @@ repos:
         args:
           - --branch=main
   - repo: https://github.com/asottile/pyupgrade
-    rev: v2.7.2
+    rev: v2.30.0
     hooks:
       - id: pyupgrade
         args: [--py37-plus]
   - repo: https://github.com/psf/black
-    rev: 21.10b0
+    rev: 21.12b0
     hooks:
       - id: black
         args:
@@ -22,7 +22,7 @@ repos:
           - --quiet
         files: ^((plugwise|tests)/.+)?[^/]+\.py$
   - repo: https://github.com/codespell-project/codespell
-    rev: v1.17.1
+    rev: v2.1.0
     hooks:
       - id: codespell
         args:
@@ -31,7 +31,7 @@ repos:
           - --quiet-level=2
         exclude_types: [csv, json]
   - repo: https://gitlab.com/pycqa/flake8
-    rev: 3.8.4
+    rev: 3.9.2
     hooks:
       - id: flake8
         additional_dependencies:
@@ -39,7 +39,7 @@ repos:
           - pydocstyle==5.1.1
         files: ^(plugwise|tests)/.+\.py$
   - repo: https://github.com/PyCQA/bandit
-    rev: 1.6.2
+    rev: 1.7.1
     hooks:
       - id: bandit
         args:
@@ -47,12 +47,8 @@ repos:
           - --format=custom
           - --configfile=tests/bandit.yaml
         files: ^(plugwise|tests)/.+\.py$
-  - repo: https://github.com/PyCQA/isort
-    rev: 5.5.3
-    hooks:
-      - id: isort
   - repo: https://github.com/adrienverge/yamllint.git
-    rev: v1.24.2
+    rev: v1.26.3
     hooks:
       - id: yamllint
   - repo: https://github.com/prettier/prettier
@@ -79,3 +75,7 @@ repos:
         types: [python]
         require_serial: true
         files: ^plugwise/.+\.py$
+#  - repo: https://github.com/PyCQA/isort
+#    rev: 5.10.1
+#    hooks:
+#      - id: isort


Test patch:
diff --git a/requirements_test.txt b/requirements_test.txt
index 62d69d079..abf861b8c 100644
--- a/requirements_test.txt
+++ b/requirements_test.txt
@@ -1,10 +1,8 @@
 # In addition to Upstream HA (devbranch)
 -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test.txt
-# and commit
-# -r requirements_commit.txt
+-r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test_pre_commit.txt
 # and setup
 -e .
-#
 # pytest-asyncio
 pytest-cover
 radon
diff --git a/scripts/setup_test.sh b/scripts/setup_test.sh
index 0028dcd3f..9b40f4750 100755
--- a/scripts/setup_test.sh
+++ b/scripts/setup_test.sh
@@ -17,7 +17,7 @@ for venv in venv .venv .; do
     . "${my_path}/${venv}/bin/activate"
 
     # Install testing requirements
-    pip install --upgrade -r requirements_test.txt 
+    pip install --upgrade -r requirements_test.txt
     # Install pre-commit hook
     ${my_path}/${venv}/bin/pre-commit install
   fi