python-izone 1.3.0__tar.gz → 1.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_izone-1.3.0 → python_izone-1.3.1}/.github/workflows/main.yml +9 -7
- {python_izone-1.3.0 → python_izone-1.3.1}/PKG-INFO +1 -1
- {python_izone-1.3.0 → python_izone-1.3.1}/pizone/discovery.py +1 -5
- {python_izone-1.3.0 → python_izone-1.3.1}/pizone/version.py +2 -2
- {python_izone-1.3.0 → python_izone-1.3.1}/tests/test_discovery.py +19 -1
- {python_izone-1.3.0 → python_izone-1.3.1}/.gitattributes +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/.gitignore +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/.pre-commit-config.yaml +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/.pylintrc +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/.python-version +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/.vscode/.ropeproject/config.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/.vscode/launch.json +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/.vscode/settings.json +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/README.md +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/api_docs/AC-DOC-1401-11_iZoneEthernetInterface.pdf +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/api_docs/iPower_JSON_datastrings_Out.h +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/api_docs/iZone_JSON_datastrings.h +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/licence.txt +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/pizone/__init__.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/pizone/controller.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/pizone/exceptions.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/pizone/power.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/pizone/py.typed +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/pizone/zone.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/pyproject.toml +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/scripts/check +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/scripts/coverage +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/tests/__init__.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/tests/conftest.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/tests/http_fakes.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/tests/power_data.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/tests/resources.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/tests/test_controller.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/tests/test_fullstack.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/tests/test_http.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/tests/test_power.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/tests/test_zone.py +0 -0
- {python_izone-1.3.0 → python_izone-1.3.1}/uv.lock +0 -0
|
@@ -6,18 +6,21 @@ jobs:
|
|
|
6
6
|
build:
|
|
7
7
|
|
|
8
8
|
runs-on: ubuntu-latest
|
|
9
|
+
permissions:
|
|
10
|
+
id-token: write
|
|
9
11
|
strategy:
|
|
10
12
|
matrix:
|
|
11
13
|
python-version: ["3.14"]
|
|
12
14
|
|
|
13
15
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
16
|
+
- uses: actions/checkout@v7
|
|
15
17
|
with:
|
|
16
18
|
fetch-depth: 0
|
|
17
19
|
- name: Install uv
|
|
18
|
-
uses: astral-sh/setup-uv@
|
|
20
|
+
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
|
19
21
|
with:
|
|
20
22
|
python-version: ${{ matrix.python-version }}
|
|
23
|
+
cache-suffix: build
|
|
21
24
|
- name: Install dependencies
|
|
22
25
|
run: uv sync --frozen --all-extras --group dev
|
|
23
26
|
- name: Lint with Pylint
|
|
@@ -31,24 +34,23 @@ jobs:
|
|
|
31
34
|
- name: Publish package
|
|
32
35
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.python-version == '3.14'
|
|
33
36
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
34
|
-
with:
|
|
35
|
-
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
36
37
|
|
|
37
38
|
coverage:
|
|
38
39
|
runs-on: ubuntu-latest
|
|
39
40
|
continue-on-error: true
|
|
40
41
|
steps:
|
|
41
|
-
- uses: actions/checkout@
|
|
42
|
+
- uses: actions/checkout@v7
|
|
42
43
|
- name: Install uv
|
|
43
|
-
uses: astral-sh/setup-uv@
|
|
44
|
+
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
|
44
45
|
with:
|
|
45
46
|
python-version: "3.14"
|
|
47
|
+
cache-suffix: coverage
|
|
46
48
|
- name: Install dependencies
|
|
47
49
|
run: uv sync --frozen --all-extras --group dev
|
|
48
50
|
- name: Test coverage (advisory)
|
|
49
51
|
run: uv run pytest tests/ -q --cov=pizone --cov-report=term-missing:skip-covered --cov-report=html
|
|
50
52
|
- name: Upload HTML coverage report
|
|
51
|
-
uses: actions/upload-artifact@
|
|
53
|
+
uses: actions/upload-artifact@v7
|
|
52
54
|
if: always()
|
|
53
55
|
with:
|
|
54
56
|
name: coverage-html
|
|
@@ -448,11 +448,7 @@ class DiscoveryService:
|
|
|
448
448
|
|
|
449
449
|
def _discovery_received(self, data: bytes) -> None:
|
|
450
450
|
message = data.decode().split(",")
|
|
451
|
-
if (
|
|
452
|
-
len(message) < 3
|
|
453
|
-
or message[0] != "ASPort_12107"
|
|
454
|
-
or (len(message) >= 4 and {"iZone", "iZoneV2"}.isdisjoint(message[3:]))
|
|
455
|
-
):
|
|
451
|
+
if len(message) < 3 or message[0] != "ASPort_12107":
|
|
456
452
|
_LOG.warning("Invalid Message Received: %s", data.decode())
|
|
457
453
|
return
|
|
458
454
|
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.3.
|
|
22
|
-
__version_tuple__ = version_tuple = (1, 3,
|
|
21
|
+
__version__ = version = '1.3.1'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 3, 1)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -13,7 +13,7 @@ from pytest import raises
|
|
|
13
13
|
from pizone import Controller, ControllerCommandError, Listener, Zone, discovery
|
|
14
14
|
from pizone.discovery import DiscoveryService
|
|
15
15
|
|
|
16
|
-
from .conftest import MockController, MockDiscoveryService
|
|
16
|
+
from .conftest import MockController, MockDiscoveryService, _register_mock_service
|
|
17
17
|
from .http_fakes import FakeHttpResponse, FakeHttpSession
|
|
18
18
|
|
|
19
19
|
|
|
@@ -440,6 +440,24 @@ async def test_changed_zones_datagram(service: MockDiscoveryService) -> None:
|
|
|
440
440
|
assert controller.zones[0].name == "UPDATED"
|
|
441
441
|
|
|
442
442
|
|
|
443
|
+
@pytest.mark.asyncio
|
|
444
|
+
async def test_x_ac_flag_discovery() -> None:
|
|
445
|
+
"""Bridges that report X for the AC slot should still be discovered."""
|
|
446
|
+
svc = MockDiscoveryService()
|
|
447
|
+
datagram = b"ASPort_12107,Mac_000025841,IP_10.0.0.90,X,iLight,iDrate,iPower"
|
|
448
|
+
|
|
449
|
+
await _register_mock_service(svc, datagram)
|
|
450
|
+
|
|
451
|
+
assert "000025841" in svc._controllers
|
|
452
|
+
controller = cast(MockController, svc._controllers["000025841"])
|
|
453
|
+
assert controller.device_ip == "10.0.0.90"
|
|
454
|
+
assert controller.is_v2 is False
|
|
455
|
+
assert controller.power is not None
|
|
456
|
+
assert controller.power.enabled is True
|
|
457
|
+
|
|
458
|
+
await svc.close()
|
|
459
|
+
|
|
460
|
+
|
|
443
461
|
@pytest.mark.asyncio
|
|
444
462
|
async def test_invalid_discovery_message(
|
|
445
463
|
caplog: pytest.LogCaptureFixture,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_izone-1.3.0 → python_izone-1.3.1}/api_docs/AC-DOC-1401-11_iZoneEthernetInterface.pdf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|