From 6da5d2cef61d01716b3836cbf42e31b17aa79a6c Mon Sep 17 00:00:00 2001 From: Stefan Allius <122395479+s-allius@users.noreply.github.com> Date: Tue, 15 Oct 2024 22:16:22 +0200 Subject: [PATCH 1/2] define __slots__ for class ByteFifo (#202) * define __slots__ for class ByteFifo * disable set-timezone action * set set-timezone to UTC * try MathRobin/timezone-action@v1.1 * set TZ to "Europe/Berlin" * define __slots__ --- .github/workflows/python-app.yml | 9 +++------ app/src/byte_fifo.py | 2 ++ app/src/gen3/infos_g3.py | 3 +++ app/src/gen3plus/infos_g3p.py | 4 +++- app/src/infos.py | 2 ++ 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index a9b5fcb..1a9a38d 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -24,18 +24,15 @@ permissions: contents: read pull-requests: read # allows SonarCloud to decorate PRs with analysis results +env: + TZ: "Europe/Berlin" + jobs: build: runs-on: ubuntu-latest steps: - - name: Set timezone - uses: szenius/set-timezone@v2.0 - with: - timezoneLinux: "Europe/Berlin" - timezoneMacos: "Europe/Berlin" - timezoneWindows: "Europe/Berlin" # - name: Start Mosquitto # uses: namoshek/mosquitto-github-action@v1 # with: diff --git a/app/src/byte_fifo.py b/app/src/byte_fifo.py index af9cb09..27d2512 100644 --- a/app/src/byte_fifo.py +++ b/app/src/byte_fifo.py @@ -7,6 +7,8 @@ else: # pragma: no cover class ByteFifo: """ a byte FIFO buffer with trigger callback """ + __slots__ = ('__buf', '__trigger_cb') + def __init__(self): self.__buf = bytearray() self.__trigger_cb = None diff --git a/app/src/gen3/infos_g3.py b/app/src/gen3/infos_g3.py index c39bed9..7c62eac 100644 --- a/app/src/gen3/infos_g3.py +++ b/app/src/gen3/infos_g3.py @@ -10,6 +10,8 @@ else: # pragma: no cover class RegisterMap: + __slots__ = () + map = { 0x00092ba8: {'reg': Register.COLLECTOR_FW_VERSION}, 0x000927c0: {'reg': Register.CHIP_TYPE}, @@ -91,6 +93,7 @@ class RegisterMap: class InfosG3(Infos): + __slots__ = () def ha_confs(self, ha_prfx: str, node_id: str, snr: str, sug_area: str = '') \ diff --git a/app/src/gen3plus/infos_g3p.py b/app/src/gen3plus/infos_g3p.py index 135aa3d..f31f17b 100644 --- a/app/src/gen3plus/infos_g3p.py +++ b/app/src/gen3plus/infos_g3p.py @@ -10,8 +10,8 @@ else: # pragma: no cover class RegisterMap: # make the class read/only by using __slots__ - __slots__ = () + map = { # 0x41020007: {'reg': Register.DEVICE_SNR, 'fmt': ' Date: Wed, 20 Nov 2024 21:08:47 +0100 Subject: [PATCH 2/2] Bump aiohttp from 3.10.5 to 3.10.11 in /app (#209) * Bump aiohttp from 3.10.5 to 3.10.11 in /app Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.10.5 to 3.10.11. - [Release notes](https://github.com/aio-libs/aiohttp/releases) - [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst) - [Commits](https://github.com/aio-libs/aiohttp/compare/v3.10.5...v3.10.11) --- updated-dependencies: - dependency-name: aiohttp dependency-type: direct:production ... Signed-off-by: dependabot[bot] * bump sonarcloud-github-action to v3.1.0 * prepare version 0.11.1 --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stefan Allius --- .github/workflows/python-app.yml | 11 +---------- CHANGELOG.md | 4 ++++ app/requirements.txt | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 1a9a38d..3661e5a 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -33,15 +33,6 @@ jobs: runs-on: ubuntu-latest steps: - # - name: Start Mosquitto - # uses: namoshek/mosquitto-github-action@v1 - # with: - # version: '1.6' - # ports: '1883:1883 8883:8883' - # certificates: ${{ github.workspace }}/.ci/tls-certificates - # config: ${{ github.workspace }}/.ci/mosquitto.conf - # password-file: ${{ github.workspace}}/.ci/mosquitto.passwd - # container-name: 'mqtt' - uses: actions/checkout@v4 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis @@ -65,7 +56,7 @@ jobs: python -m pytest app --cov=app/src --cov-report=xml coverage report - name: Analyze with SonarCloud - uses: SonarSource/sonarcloud-github-action@v2.2.0 + uses: SonarSource/sonarcloud-github-action@v3.1.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index c2bd297..d84e301 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +## [0.11.1] - 2024-11-20 + +- Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.10.5 to 3.10.11. + ## [0.11.0] - 2024-10-13 - fix healthcheck on infrastructure with IPv6 support [#196](https://github.com/s-allius/tsun-gen3-proxy/issues/196) diff --git a/app/requirements.txt b/app/requirements.txt index 6546f18..1fb1c53 100644 --- a/app/requirements.txt +++ b/app/requirements.txt @@ -1,4 +1,4 @@ aiomqtt==2.3.0 schema==0.7.7 aiocron==1.8 - aiohttp==3.10.5 \ No newline at end of file + aiohttp==3.10.11 \ No newline at end of file