Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c828b94acc | ||
|
|
2ba97a6f30 | ||
|
|
6d66f44d73 | ||
|
|
6da5d2cef6 | ||
|
|
6b9c13ddfe | ||
|
|
c956c13d13 |
20
.github/workflows/python-app.yml
vendored
20
.github/workflows/python-app.yml
vendored
@@ -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 }}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
aiomqtt==2.3.0
|
||||
schema==0.7.7
|
||||
aiocron==1.8
|
||||
aiohttp==3.10.5
|
||||
aiohttp==3.10.11
|
||||
@@ -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
|
||||
|
||||
@@ -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 = '') \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -152,6 +152,8 @@ class ClrAtMidnight:
|
||||
|
||||
|
||||
class Infos:
|
||||
__slots__ = ('db', 'tracer', )
|
||||
|
||||
LIGHTNING = 'mdi:lightning-bolt'
|
||||
COUNTER = 'mdi:counter'
|
||||
GAUGE = 'mdi:gauge'
|
||||
|
||||
Reference in New Issue
Block a user