You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-12Lines changed: 18 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,19 @@
1
1
# Plugwise python module
2
2
3
-
This module is the backend for the [`plugwise` component](https://github.com/home-assistant/core/tree/dev/homeassistant/components/plugwise) which we maintain in Home Assistant Core.
3
+
This module is the backend for the [`plugwise` component](https://github.com/home-assistant/core/tree/dev/homeassistant/components/plugwise) which we maintain as co-code owners Home Assistant Core.
4
4
5
5
Our main usage for this module is supporting [Home Assistant](https://www.home-assistant.io) / [home-assistant](http://github.com/home-assistant/core/)
Works out of the box with every Home Assistant installation
25
+
Works out of the box with every Home Assistant installation, use the button below to install
26
+
27
+
[](https://my.home-assistant.io/redirect/integrations/)
24
28
25
29
### Home-Assistant custom_component (beta)
26
30
27
-
Intended for users helping us test new features (use at your own risk)
31
+
We do (also) maintain a `custom_component`, please note this is **only** intended for users helping us test new features (use at your own risk)
You can add our `custom_component` repository to HACS, do note that we do not intent for our `beta``custom_component` to be included in the HACS repository.
See the [`plugwise-beta`](https://github.com/plugwise/plugwise-beta) repository for more info. Requires additional configuration/handling to get your integration running.
39
+
See the [`plugwise-beta`](https://github.com/plugwise/plugwise-beta) repository for more info.
34
40
35
41
## Development/patches
36
42
37
-
Like Home Assistant Core we use `pre-commit` to validate your commits and eventually PRs.
43
+
Like Home Assistant Core we use `pre-commit`and additionally run [pre-commit.ci](http://pre-commit.ci)to automatically validate your commits and PRs.
38
44
39
-
Please make sure you at least ran`scripts/setup.sh`before attempting to `git commit`. But we sincerely recommended to also use local testing, see `tests/README.md` for more information.
45
+
If you want to create a PR please make sure you at least run`scripts/setup.sh`. This will ensure your environment is set up correctly before attempting to `git commit`. We sincerely and highly recommended also setting up local testing, see [`tests/README.md`](https://github.com/plugwise/python-plugwise/blob/main/tests/README.md) for more information and run `scripts/setup_test.sh` to prepare your environment.
40
46
41
47
## Project support status
42
48
@@ -76,8 +82,8 @@ Origins (from newest to oldest):
76
82
- Networked Plugwise Anna module with custom_module - `haanna/anna-ha` via <https://github.com/laetificat> (Kevin)
77
83
- USB-based stick module with custom_module - `plugwise-stick/plugwise` by @brefra (Frank)
78
84
- USB-plugwise module - `plugwise` by <https://github.com/cyberjunky/python-plugwise> (Ron) originally by <https://github.com/aequitas/python-plugwise> (Johan) (with reference only in license to Sven)
79
-
- Sensor for Plugwise Smile P1 integration - `home-assistant-sensor-plugwise-smile-p1` by <https://bitbucket.org/jvdschoot/home-assistant-sensor-plugwise-smile-p1> (Jeroen van der Schoot)
85
+
- Sensor for Plugwise Smile P1 integration - `home-assistant-sensor-plugwise-smile-p1` by <https://bitbucket.org/jvdschoot/home-assistant-sensor-plugwise-smile-p1> (Jeroen van der Schoot)
80
86
81
87
## Thanks
82
88
83
-
On behalf all of us, big thanks to Plugwise and community members @riemers and @tane from [HAshop](https://hashop.nl)for their support and obviously all our users and testers who dealt with our typos and challenges. Disclaimer, while we are communicating with Plugwise and they expressed their gratitude through their newsletter, we are not part of Plugwise as a company. We are just a bunch of guys anxious to get our (and your) Plugwise products working with Home Assistant.
89
+
On behalf all of us, big thanks to Plugwise and community members @riemers and @tane from [HAshop](https://hashop.nl)for their support and obviously all our users and testers who dealt with our typos and challenges. Disclaimer, while we are communicating with Plugwise and they expressed their gratitude through their newsletter, we are not part of Plugwise as a company. We are just a bunch of guys anxious to get our (and your) Plugwise products working with Home Assistant.
Copy file name to clipboardExpand all lines: tests/INIT.md
+14-16Lines changed: 14 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,35 +4,35 @@
4
4
5
5
Needed:
6
6
7
-
-[ ] Github account (or organisation and account(s))
8
-
-[ ] Codecov account (just choose 'login with github')
9
-
-[ ] CodeFactor account (again, login with github)
10
-
-[ ] Add codecov as an integration from Github's integrations (basically 'buy' it, except its at no cost)
7
+
-[ ] Github account (or organisation and account(s))
8
+
-[ ] Codecov account (just choose 'login with github')
9
+
-[ ] CodeFactor account (again, login with github)
10
+
-[ ] Add codecov as an integration from Github's integrations (basically 'buy' it, except its at no cost)
11
11
12
12
## Configuration
13
13
14
14
After the initial setup of the repo/initial commit, walk the repo-settings on GitHub using your browser.
15
15
16
-
-[ ][Set the product image, turn off wiki and automatically delete branches (from defaults)](https://github.com/plugwise/python-plugwise/settings)
17
-
-[ ][Activate both dependabots and keep dependency graph open](https://github.com/plugwise/python-plugwise/settings/security_analysis)
18
-
-[ ][Integrations, configure codecov (should show up from organisation)](https://github.com/plugwise/python-plugwise/settings/installations)
16
+
-[ ][Set the product image, turn off wiki and automatically delete branches (from defaults)](https://github.com/plugwise/python-plugwise/settings)
17
+
-[ ][Activate both dependabots and keep dependency graph open](https://github.com/plugwise/python-plugwise/settings/security_analysis)
18
+
-[ ][Integrations, configure codecov (should show up from organisation)](https://github.com/plugwise/python-plugwise/settings/installations)
19
19
20
20
For this step you might need to follow [this publishing guide](https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/) taking you through most of the steps. Note that the projects on PyPi already [**need to exist**](https://packaging.python.org/tutorials/packaging-projects/) so use a generic token first and later adjust that to only this project (as explained on that howto):
21
21
22
-
-[ ][Configure secrets for PYPI_TOKEN and TESTPYPI_TOKEN](https://github.com/plugwise/Plugwise-Smile/settings/secrets)
22
+
-[ ][Configure secrets for PYPI_TOKEN and TESTPYPI_TOKEN](https://github.com/plugwise/Plugwise-Smile/settings/secrets)
23
23
24
24
## Initializing pypi
25
25
26
-
Once the project is ready for upload to test (i.e. version number ending in `a0` or something likewise): upload it manually using `twine upload`:
26
+
Once the project is ready for upload to test (i.e. version number ending in `a0` or something likewise): upload it manually using `twine upload`:
Plugwise-Smile has to be in working and functioning condition on all circumstances. Hence testing.
3
+
Plugwise-Smile has to be in working and functioning condition on all circumstances. Hence testing is applied and tested through [Github Actions](https://github.com/plugwise/python-plugwise/actions).
4
4
5
5
## Tests
6
+
6
7
From the above list of setups a number of values is selected to be asserted. Currently we have the following asserts in place:
7
8
8
9
Information gathering: (negative)
10
+
9
11
- Check handling against a Smile that 'times out' during request
10
12
- Check handling against a Smile refusing contact (`internal server error`)
11
13
12
14
Service handling (i.e. changing setpoint or switching a relay)
15
+
13
16
- Check against a Smile not accepting change (`internal server error`) (negative)
14
17
- Switch a relay, change a setpoint or change a schema/preset (positive)
15
18
16
19
Data processing (positive)
20
+
17
21
- Includes checking various `measures` and settings for each device / location / combination of both
18
22
19
23
## Running tests against Plugwise Smile
20
24
21
-
Our tests are mainly conducted locally by the contributors and using Github Actions. You can always look up the latest (hopefully successful) build at (python-plugwise Github actions)[https://github.com/plugwise/python-plugwise/actions].
25
+
`*) This states Smile as unfortunately tests for USB are still to be added`
26
+
27
+
Our tests are mainly conducted locally by the contributors and using Github Actions, see the workflows in `.github/workflows`. You can always look up the latest (hopefully successful) build at [python-plugwise Github actions](https://github.com/plugwise/python-plugwise/actions).
22
28
23
-
If you want to run tests locally, use the provided `scripts/setup.sh` to initialize and enable your virtualenv using `source venv/bin/activate`.
29
+
If you want to run tests locally, use the provided `scripts/setup_test.sh` to initialize and enable your virtualenv using `source venv/bin/activate`.
24
30
25
-
Without your virtualenv, run the `scripts/setup_test.sh` script. With that (and your virtualenv enabled) you can run `scripts/tests_and_coverage.sh` or `scripts/complexity` to show areas that need Cyclometic Complexity improving.
31
+
Without your virtualenv, run the `scripts/setup_test.sh` script. With that (and your virtualenv enabled) you can run `scripts/tests_and_coverage.sh` or `scripts/complexity.sh` to show areas that need Cyclometic Complexity improving.
26
32
27
33
## Quality
28
34
29
-
Code quality is checked (through Github Actions) at (CodeFactor)[https://www.codefactor.io/repository/github/plugwise/python-plugwise] and (codecov.io)[https://app.codecov.io/gh/plugwise/python-plugwise] as depicted by the badges on the (main repository page)[https://github.com/plugwise/python-plugwise].
35
+
Code quality is checked (through [Github Actions](https://github.com/plugwise/python-plugwise/actions)) at [CodeFactor](https://www.codefactor.io/repository/github/plugwise/python-plugwise) and [codecov.io](https://app.codecov.io/gh/plugwise/python-plugwise) as depicted by the badges on the [main repository page](https://github.com/plugwise/python-plugwise).
0 commit comments