smartbox 2.2.0__tar.gz → 2.2.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.
- {smartbox-2.2.0 → smartbox-2.2.1}/.github/workflows/publish-to-pypi.yml +1 -1
- {smartbox-2.2.0 → smartbox-2.2.1}/.github/workflows/python-package.yml +5 -5
- {smartbox-2.2.0 → smartbox-2.2.1}/PKG-INFO +2 -2
- {smartbox-2.2.0 → smartbox-2.2.1}/pyproject.toml +2 -2
- {smartbox-2.2.0 → smartbox-2.2.1}/src/smartbox/reseller.py +13 -4
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/test_cmd.py +3 -11
- {smartbox-2.2.0 → smartbox-2.2.1}/uv.lock +295 -295
- {smartbox-2.2.0 → smartbox-2.2.1}/.github/FUNDING.yml +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/.github/ISSUE_TEMPLATE/new-reseller.md +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/.github/dependabot.yml +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/.gitignore +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/.pre-commit-config.yaml +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/.vscode/settings.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/CHANGELOG.md +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/CODEOWNERS +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/LICENSE +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/README.md +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/api-notes.md +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/codecov.yml +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/src/smartbox/__init__.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/src/smartbox/cmd.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/src/smartbox/error.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/src/smartbox/models.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/src/smartbox/py.typed +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/src/smartbox/session.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/src/smartbox/socket.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/src/smartbox/update_manager.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/__init__.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/common.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/conftest.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device1/acm/1/samples.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device1/acm/1/setup.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device1/acm/1/status.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device1/connected.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device1/htr/0/samples.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device1/htr/0/setup.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device1/htr/0/status.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device1/htr_system/power_limit.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device1/mgr/away_status.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device1/mgr/nodes.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device1/pmo/3/samples.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device1/pmo/3/setup.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device1/pmo/3/status.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/connected.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/0/samples.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/0/setup.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/0/status.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/1/samples.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/1/setup.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/1/status.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/2/samples.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/2/setup.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/2/status.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/3/samples.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/3/setup.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/3/status.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/4/samples.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/4/setup.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/4/status.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/5/samples.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/5/setup.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_mod/5/status.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/htr_system/power_limit.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/mgr/away_status.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs/device2/mgr/nodes.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/devs.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/grouped_devs.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/groups/test_home/guest_users.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/fixtures/test_path.json +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/test_models.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/test_reseller.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/test_session.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tests/test_update_manager.py +0 -0
- {smartbox-2.2.0 → smartbox-2.2.1}/tox.ini +0 -0
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
with:
|
|
23
23
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
24
24
|
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
|
25
|
-
uses: actions/setup-python@v5.
|
|
25
|
+
uses: actions/setup-python@v5.6.0
|
|
26
26
|
with:
|
|
27
27
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
28
28
|
- name: Build a binary wheel and a source tarball
|
|
@@ -25,7 +25,7 @@ jobs:
|
|
|
25
25
|
with:
|
|
26
26
|
python-version: ${{ matrix.python-version }}
|
|
27
27
|
- name: Set up Python ${{ matrix.python-version }}
|
|
28
|
-
uses: actions/setup-python@v5.
|
|
28
|
+
uses: actions/setup-python@v5.6.0
|
|
29
29
|
with:
|
|
30
30
|
python-version: ${{ matrix.python-version }}
|
|
31
31
|
- name: Install the project
|
|
@@ -47,7 +47,7 @@ jobs:
|
|
|
47
47
|
with:
|
|
48
48
|
python-version: ${{ matrix.python-version }}
|
|
49
49
|
- name: Set up Python ${{ matrix.python-version }}
|
|
50
|
-
uses: actions/setup-python@v5.
|
|
50
|
+
uses: actions/setup-python@v5.6.0
|
|
51
51
|
with:
|
|
52
52
|
python-version: ${{ matrix.python-version }}
|
|
53
53
|
- name: Install the project
|
|
@@ -70,13 +70,13 @@ jobs:
|
|
|
70
70
|
python-version: ${{ matrix.python-version }}
|
|
71
71
|
|
|
72
72
|
- name: Set up Python ${{ matrix.python-version }}
|
|
73
|
-
uses: actions/setup-python@v5.
|
|
73
|
+
uses: actions/setup-python@v5.6.0
|
|
74
74
|
with:
|
|
75
75
|
python-version: ${{ matrix.python-version }}
|
|
76
76
|
- name: Install the project
|
|
77
77
|
run: |
|
|
78
78
|
uv sync --all-extras --dev
|
|
79
|
-
tox -e py
|
|
79
|
+
uv run tox -e py
|
|
80
80
|
- name: "Upload coverage to Codecov"
|
|
81
81
|
uses: codecov/codecov-action@v5
|
|
82
82
|
with:
|
|
@@ -86,4 +86,4 @@ jobs:
|
|
|
86
86
|
if: ${{ !cancelled() }}
|
|
87
87
|
uses: codecov/test-results-action@v1
|
|
88
88
|
with:
|
|
89
|
-
token: ${{ secrets.CODECOV_TOKEN }}
|
|
89
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: smartbox
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: Python API to control heating 'smart boxes'
|
|
5
5
|
Project-URL: Homepage, https://github.com/ajtudela/smartbox
|
|
6
6
|
Project-URL: Issues, https://github.com/ajtudela/smartbox/issues
|
|
@@ -15,7 +15,7 @@ Requires-Dist: aiohttp>=3.11.11
|
|
|
15
15
|
Requires-Dist: asyncclick>=8.1.8
|
|
16
16
|
Requires-Dist: jq>=1.8.0
|
|
17
17
|
Requires-Dist: pydantic>=2.10.4
|
|
18
|
-
Requires-Dist: python-socketio==5.
|
|
18
|
+
Requires-Dist: python-socketio==5.13.0
|
|
19
19
|
Requires-Dist: requests>=2.32.3
|
|
20
20
|
Requires-Dist: websocket-client>=1.8.0
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "smartbox"
|
|
3
|
-
version = "2.2.
|
|
3
|
+
version = "2.2.1"
|
|
4
4
|
requires-python = ">=3.13"
|
|
5
5
|
authors = [
|
|
6
6
|
{ name="Alberto Tudela", email="ajtudela@gmail.com" },
|
|
@@ -22,7 +22,7 @@ dependencies = [
|
|
|
22
22
|
"asyncclick>=8.1.8",
|
|
23
23
|
"jq>=1.8.0",
|
|
24
24
|
"pydantic>=2.10.4",
|
|
25
|
-
"python-socketio==5.
|
|
25
|
+
"python-socketio==5.13.0",
|
|
26
26
|
"requests>=2.32.3",
|
|
27
27
|
"websocket-client>=1.8.0",
|
|
28
28
|
]
|
|
@@ -68,12 +68,18 @@ class AvailableResellers:
|
|
|
68
68
|
basic_auth="NTU2ZDc0MWI3OGUzYmU5YjU2NjA3NTQ4OnZkaXZkaQ==",
|
|
69
69
|
serial_id=14,
|
|
70
70
|
),
|
|
71
|
-
"api-
|
|
72
|
-
name="Technotherm
|
|
71
|
+
"api-technoterm": SmartboxReseller(
|
|
72
|
+
name="Technotherm",
|
|
73
73
|
web_url="https://ttiapp.technotherm.com/",
|
|
74
74
|
api_url="api-lhz",
|
|
75
75
|
serial_id=16,
|
|
76
76
|
),
|
|
77
|
+
"api-smartcontrol": SmartboxReseller(
|
|
78
|
+
name="SmartControl",
|
|
79
|
+
web_url="https://app.smart-control.eu/",
|
|
80
|
+
api_url="api-lhz",
|
|
81
|
+
serial_id=17,
|
|
82
|
+
),
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
def __init__(
|
|
@@ -94,14 +100,17 @@ class AvailableResellers:
|
|
|
94
100
|
@property
|
|
95
101
|
def reseller(self) -> SmartboxReseller:
|
|
96
102
|
"""Get the reseller."""
|
|
97
|
-
reseller =
|
|
103
|
+
reseller = next(
|
|
104
|
+
(r for r in self.resellers.values() if r.api_url == self._api_url),
|
|
105
|
+
None,
|
|
106
|
+
)
|
|
98
107
|
if reseller is None:
|
|
99
108
|
if (
|
|
100
109
|
self._basic_auth is None
|
|
101
110
|
or self._web_url is None
|
|
102
111
|
or self._serial_id is None
|
|
103
112
|
):
|
|
104
|
-
msg = "This reseller is not yet available or some arguments are missing."
|
|
113
|
+
msg = f"This reseller {self._api_url} is not yet available or some arguments are missing."
|
|
105
114
|
raise ResellerNotExistError(msg)
|
|
106
115
|
try:
|
|
107
116
|
_LOGGER.debug(
|
|
@@ -263,22 +263,14 @@ async def test_node_samples(runner, mock_session):
|
|
|
263
263
|
|
|
264
264
|
|
|
265
265
|
@pytest.mark.anyio
|
|
266
|
-
async def test_reseller(runner, mocker):
|
|
267
|
-
mock_resellers = mocker.patch("smartbox.cmd.AvailableResellers.resellers")
|
|
268
|
-
mock_resellers.items.return_value = [
|
|
269
|
-
("reseller1", "details1"),
|
|
270
|
-
("reseller2", "details2"),
|
|
271
|
-
]
|
|
272
|
-
|
|
266
|
+
async def test_reseller(runner, mocker, reseller):
|
|
273
267
|
result = await runner.invoke(
|
|
274
268
|
smartbox,
|
|
275
269
|
[*DEFAULT_ARGS, "resellers"],
|
|
276
270
|
)
|
|
277
271
|
assert result.exit_code == 0
|
|
278
|
-
assert "
|
|
279
|
-
assert "
|
|
280
|
-
assert "reseller2" in result.output
|
|
281
|
-
assert "details2" in result.output
|
|
272
|
+
assert "test_api" in result.output
|
|
273
|
+
assert "http" in result.output
|
|
282
274
|
|
|
283
275
|
|
|
284
276
|
@pytest.mark.anyio
|