Compare commits

...

4 Commits

Author SHA1 Message Date
Stefan Allius
c828b94acc prepare version 0.11.1 2024-11-20 20:39:09 +01:00
Stefan Allius
2ba97a6f30 bump sonarcloud-github-action to v3.1.0 2024-11-20 20:30:41 +01:00
dependabot[bot]
6d66f44d73 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] <support@github.com>
2024-11-20 18:57:02 +00:00
Stefan Allius
6da5d2cef6 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__
2024-10-15 22:16:22 +02:00
7 changed files with 19 additions and 18 deletions

View File

@@ -24,27 +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:
# 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
@@ -68,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 }}

View File

@@ -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)

View File

@@ -1,4 +1,4 @@
aiomqtt==2.3.0
schema==0.7.7
aiocron==1.8
aiohttp==3.10.5
aiohttp==3.10.11

View File

@@ -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

View File

@@ -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 = '') \

View File

@@ -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': '<L'}, # noqa: E501
0x41020018: {'reg': Register.DATA_UP_INTERVAL, 'fmt': '<B', 'ratio': 60, 'dep': ProxyMode.SERVER}, # noqa: E501
@@ -68,6 +68,8 @@ class RegisterMap:
class InfosG3P(Infos):
__slots__ = ('client_mode', )
def __init__(self, client_mode: bool):
super().__init__()
self.client_mode = client_mode

View File

@@ -152,6 +152,8 @@ class ClrAtMidnight:
class Infos:
__slots__ = ('db', 'tracer', )
LIGHTNING = 'mdi:lightning-bolt'
COUNTER = 'mdi:counter'
GAUGE = 'mdi:gauge'