Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v7

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -56,7 +56,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v4

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -69,6 +69,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.11"
- name: Install locked dependencies
env:
PIP_CONFIG_FILE: "${{ github.workspace }}/pip.conf"
run: python -m pip install --require-hashes -r requirements.txt
- name: Run unit tests
run: python -m coverage run --source=ariston -m unittest discover --start-directory tests --verbose
- name: Report coverage
run: python -m coverage report --show-missing --fail-under=90
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ Use pip3 to install the latest version of this module.
pip3 install ariston
```

## Tests
Run the unit test suite with Python 3.11 or newer:
```
python -m unittest discover --start-directory tests --verbose
```

## The easy way (recommended for testing the module)
First, open Python 3 and import ariston module.
```
Expand Down
2 changes: 1 addition & 1 deletion ariston/lux_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def async_set_water_heater_operation_mode(self, operation_mode: str):
@property
def water_heater_target_temperature(self) -> Optional[float]:
"""Get water heater target temperature"""
if self.data.get(EvoDeviceProperties.MODE) == LuxPlantMode.BOOST:
if self.data.get(EvoDeviceProperties.MODE) == LuxPlantMode.BOOST.value:
return self.water_heater_maximum_setpoint_temperature_maximum
else:
return self.data.get(EvoLydosDeviceProperties.REQ_TEMP, None)
2 changes: 2 additions & 0 deletions pip.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[global]
only-binary = :all:
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies = [
"aiohttp",
"requests"
]
requires-python = ">=3.9"
requires-python = ">=3.11"
license = { file = "LICENSE" }
version = "0.19.9"
dynamic = ['description']
Expand Down
33 changes: 33 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Hash-locked Linux x86_64 dependencies for the Python 3.11 CI runner.
aiohappyeyeballs==2.7.1 \
--hash=sha256:9243213661e29250eb41368e5daa826fc017156c3b8a11440826b2e3ed376472
aiohttp==3.14.5 \
--hash=sha256:50a195903119008fe9cc68710535eb37f556ffffd6a7759afe70a2c145587045
aiosignal==1.4.0 \
--hash=sha256:053243f8b92b990551949e63930a839ff0cf0b0ebbe0597b0f3fb19e1a0fe82e
attrs==26.1.0 \
--hash=sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309
certifi==2026.10.19 \
--hash=sha256:42d35340cc5b9ba78e818ddbff0c5b1c2b779de448a340fd1b989f5fa8670e1b
coverage==7.17.2 \
--hash=sha256:01303d9e68b6e6bdc5459b54e3bd0e3539c94c25b50ac7362b7cbcacbc815fbc
charset-normalizer==3.5.2 \
--hash=sha256:211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f
flit_core==3.12.0 \
--hash=sha256:e7a0304069ea895172e3c7bb703292e992c5d1555dd1233ab7b5621b5b69e62c
frozenlist==1.8.0 \
--hash=sha256:2552f44204b744fba866e573be4c1f9048d6a324dfe14475103fd51613eb1d1f
idna==3.20 \
--hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c
multidict==7.2.1 \
--hash=sha256:3b7542fad2706595c1b1853b46f2c3c4ae5cc5a6252b7225f294d607a29e1bdf
propcache==0.5.4 \
--hash=sha256:6e9368e87a3efc285e559131092c5db643eb8e56de4ee42064d5baec22ef2bb5
requests==2.34.2 \
--hash=sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0
typing_extensions==4.16.0 \
--hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8
urllib3==2.8.0 \
--hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3
yarl==1.25.1 \
--hash=sha256:d5add7b4ca7afeea91d52e4d4e4db3b1fe9885b71f07054560d8c4296b7441a2
Loading
Loading