Skip to content

Commit

Permalink
chore(ci): add Codespell workflow (openviess#391)
Browse files Browse the repository at this point in the history
* add poetry

* add codespell workflow

* fix findings

* update lock file

* use python v3.8

* update lock file

* Update lint.yml
  • Loading branch information
CFenner authored Sep 23, 2024
1 parent 8478f6e commit f6d5b89
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 6 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Lint

# yamllint disable-line rule:truthy
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
env:
DEFAULT_PYTHON: "3.11"
jobs:
codespell:
name: codespell
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/[email protected]
- name: 🏗 Set up Poetry
run: pipx install poetry
- name: 🏗 Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/[email protected]
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: 🏗 Install Python dependencies
run: poetry install --no-interaction
- name: 🚀 Check code for common misspellings
run: poetry run codespell **/*.py
2 changes: 1 addition & 1 deletion PyViCare/Feature.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Feature flag to raise an exception in case of a non existing device feature.
# The flag should be fully removed in a later release.
# It allows dependend libraries to gracefully migrate to the new behaviour
# It allows dependent libraries to gracefully migrate to the new behaviour
raise_exception_on_not_supported_device_feature = True

# Feature flag to raise exception if rate limit of the API is hit
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ This library implements access to Viessmann devices by using the official API fr

## Breaking changes in version 2.8.x

- The circuit, burner (Gaz) and compressor (Heat Pump) is now separted. Accessing the properties of the burner/compressor is moved from `device.curcuits` to `device.burners` and `device.compressor`.
- The circuit, burner (Gaz) and compressor (Heat Pump) is now separated. Accessing the properties of the burner/compressor is moved from `device.circuits` to `device.burners` and `device.compressor`.

## Breaking changes in version 2.x

- The API to access your device changed to a general `PyViCare` class. Use this class to load all available devices.
- The API to access the heating circuit of the device has moved to the `Device` class. You can now access and iterate over all available circuits via `device.curcuits`. This allows to easily see which properties are depending on the circuit.
- The API to access the heating circuit of the device has moved to the `Device` class. You can now access and iterate over all available circuits via `device.circuits`. This allows to easily see which properties are depending on the circuit.

See the example below for how you can use that.

## Breaking changes in version 1.x

- The versions prior to 1.x used an inofficial API which stopped working on July, 15th 2021. All users need to migrate to version 1.0.0 to continue using the API.
- The versions prior to 1.x used an unofficial API which stopped working on July, 15th 2021. All users need to migrate to version 1.0.0 to continue using the API.
- Exception is raised if the library runs into a API rate limit. (See feature flag `raise_exception_on_rate_limit`)
- Exception is raised if an unsupported device feature is used. (See feature flag `raise_exception_on_not_supported_device_feature`)
- Python 3.4 is no longer supported.
Expand Down Expand Up @@ -149,7 +149,7 @@ Follow these steps to access the API in Postman:

## More different devices for test cases needed

In order to help ensuring making it easier to create more test cases you can run this code and make a pull request with the new test of your device type added. Your test should be commited into [tests/response](tests/response) and named `<family><model>`.
In order to help ensuring making it easier to create more test cases you can run this code and make a pull request with the new test of your device type added. Your test should be committed into [tests/response](tests/response) and named `<family><model>`.

The code to run to make this happen is below. This automatically removes "sensitive" information like installation id and serial numbers.
You can either replace default values or use the `PYVICARE_*` environment variables.
Expand Down
19 changes: 18 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ requests = ">=2.31.0"
types-requests = ">=2.31"

[tool.poetry.group.dev.dependencies]
codespell = "^2.3.0"
pytest = "^8.3.2"
pytest-cov = "^5.0.0"

Expand Down

0 comments on commit f6d5b89

Please sign in to comment.