delonghi-comfort 0.2.0__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.
Files changed (31) hide show
  1. delonghi_comfort-0.2.0/.github/actions/install-deps/action.yml +21 -0
  2. delonghi_comfort-0.2.0/.github/dependabot.yml +10 -0
  3. delonghi_comfort-0.2.0/.github/workflows/linting.yml +34 -0
  4. delonghi_comfort-0.2.0/.github/workflows/publish.yml +88 -0
  5. delonghi_comfort-0.2.0/.gitignore +39 -0
  6. delonghi_comfort-0.2.0/.pre-commit-config.yaml +35 -0
  7. delonghi_comfort-0.2.0/.release-please-manifest.json +3 -0
  8. delonghi_comfort-0.2.0/CHANGELOG.md +18 -0
  9. delonghi_comfort-0.2.0/LICENSE +674 -0
  10. delonghi_comfort-0.2.0/PKG-INFO +133 -0
  11. delonghi_comfort-0.2.0/README.md +107 -0
  12. delonghi_comfort-0.2.0/delonghi_comfort/__init__.py +30 -0
  13. delonghi_comfort-0.2.0/delonghi_comfort/client.py +200 -0
  14. delonghi_comfort-0.2.0/delonghi_comfort/const.py +117 -0
  15. delonghi_comfort-0.2.0/delonghi_comfort/exceptions.py +23 -0
  16. delonghi_comfort-0.2.0/delonghi_comfort/gigya.py +147 -0
  17. delonghi_comfort-0.2.0/delonghi_comfort/models.py +194 -0
  18. delonghi_comfort-0.2.0/delonghi_comfort/mqtt.py +361 -0
  19. delonghi_comfort-0.2.0/delonghi_comfort/py.typed +0 -0
  20. delonghi_comfort-0.2.0/delonghi_comfort/rest.py +44 -0
  21. delonghi_comfort-0.2.0/pyproject.toml +198 -0
  22. delonghi_comfort-0.2.0/release-please-config.json +13 -0
  23. delonghi_comfort-0.2.0/tests/__init__.py +0 -0
  24. delonghi_comfort-0.2.0/tests/fakes.py +122 -0
  25. delonghi_comfort-0.2.0/tests/test_client.py +131 -0
  26. delonghi_comfort-0.2.0/tests/test_gigya.py +140 -0
  27. delonghi_comfort-0.2.0/tests/test_models.py +135 -0
  28. delonghi_comfort-0.2.0/tests/test_mqtt.py +143 -0
  29. delonghi_comfort-0.2.0/tests/test_mqtt_robustness.py +311 -0
  30. delonghi_comfort-0.2.0/tests/test_rest.py +42 -0
  31. delonghi_comfort-0.2.0/uv.lock +848 -0
@@ -0,0 +1,21 @@
1
+ name: "Common steps to install and cache dependencies"
2
+ description: "This action installs dependencies and caches them for use in workflows."
3
+
4
+ runs:
5
+ using: "composite"
6
+ steps:
7
+ - name: Install uv
8
+ uses: astral-sh/setup-uv@v6
9
+ with:
10
+ enable-cache: true
11
+
12
+ - name: Set up Python
13
+ shell: bash
14
+ # --locked: fail if the committed uv.lock has drifted from pyproject.toml
15
+ # (rather than silently updating it), so a stale lock never reaches main.
16
+ run: |
17
+ echo "PYTHON_VERSION=$(uv run --locked python -c 'import platform; print(platform.python_version())')" >> "$GITHUB_ENV"
18
+
19
+ - name: Install dependencies with uv
20
+ shell: bash
21
+ run: uv sync --locked
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: pip
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ labels:
8
+ - "dependencies"
9
+ ignore:
10
+ - dependency-name: "homeassistant"
@@ -0,0 +1,34 @@
1
+ name: Linting
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ pre-commit:
11
+ name: Pre-commit
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Check out the repository
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Prepare and install deps
18
+ uses: ./.github/actions/install-deps
19
+
20
+ - uses: actions/cache@v4
21
+ name: Cache prek hooks
22
+ with:
23
+ path: ~/.cache/prek/
24
+ key: >
25
+ ${{ format('prek-{0}-{1}',
26
+ runner.os,
27
+ hashFiles('.pre-commit-config.yaml')
28
+ ) }}
29
+ restore-keys: |
30
+ prek-${{ runner.os }}-
31
+
32
+ - name: Run prek on all files
33
+ run: |
34
+ uvx prek run --all-files --show-diff-on-failure --color=always
@@ -0,0 +1,88 @@
1
+ name: release
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ permissions: {}
6
+ jobs:
7
+ # Runs with a short-lived GitHub App token (comfort-hub-release), NOT the
8
+ # workflow's GITHUB_TOKEN: events created by GITHUB_TOKEN never trigger other
9
+ # workflows, which would leave release PRs with no CI runs. App-token pushes
10
+ # trigger the normal pull_request checks, so release PRs get validated.
11
+ release-please:
12
+ runs-on: ubuntu-latest
13
+ permissions: {} # the app token carries the write authority
14
+ outputs:
15
+ release_created: ${{ steps.rp.outputs.release_created }}
16
+ tag_name: ${{ steps.rp.outputs.tag_name }}
17
+ pr: ${{ steps.rp.outputs.pr }}
18
+ steps:
19
+ - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
20
+ id: app-token
21
+ with:
22
+ app-id: ${{ vars.RELEASE_BOT_APP_ID }}
23
+ private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
24
+ permission-contents: write # push release branch, create tag + release
25
+ permission-pull-requests: write # open/update the release PR
26
+ - id: rp
27
+ uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5
28
+ with:
29
+ token: ${{ steps.app-token.outputs.token }}
30
+ config-file: release-please-config.json
31
+ manifest-file: .release-please-manifest.json
32
+
33
+ # release-please bumps pyproject.toml but cannot regenerate uv.lock — refresh
34
+ # the lock on the release branch so it never drifts from the released version.
35
+ # The push uses the app token so the release PR's HEAD commit still gets CI
36
+ # (required checks evaluate the head commit).
37
+ sync-lock:
38
+ needs: release-please
39
+ if: needs.release-please.outputs.pr != ''
40
+ runs-on: ubuntu-latest
41
+ permissions: {} # the app token carries the write authority
42
+ steps:
43
+ - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
44
+ id: app-token
45
+ with:
46
+ app-id: ${{ vars.RELEASE_BOT_APP_ID }}
47
+ private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
48
+ permission-contents: write # push the refreshed lock to the release branch
49
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 # zizmor: ignore[artipacked] -- job must push the refreshed lock back
50
+ with:
51
+ ref: ${{ fromJSON(needs.release-please.outputs.pr).headBranchName }}
52
+ token: ${{ steps.app-token.outputs.token }}
53
+ persist-credentials: true
54
+ - uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
55
+ - name: Refresh uv.lock for the release version
56
+ run: |
57
+ uv lock
58
+ if ! git diff --quiet -- uv.lock; then
59
+ git config user.name "github-actions[bot]"
60
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
61
+ git commit -m "chore: refresh uv.lock for release" -- uv.lock
62
+ git push
63
+ fi
64
+
65
+ # Publishes to PyPI via trusted publishing (OIDC) ONLY when release-please cut a
66
+ # release in this same run — sidesteps the GITHUB_TOKEN recursion guard, so no PAT.
67
+ publish:
68
+ needs: release-please
69
+ if: needs.release-please.outputs.release_created == 'true'
70
+ runs-on: ubuntu-latest
71
+ environment:
72
+ name: pypi
73
+ url: https://pypi.org/project/delonghi-comfort/
74
+ permissions:
75
+ id-token: write # OIDC for PyPI trusted publishing
76
+ contents: read
77
+ steps:
78
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
79
+ with:
80
+ persist-credentials: false
81
+ - uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
82
+ with:
83
+ python-version: "3.12"
84
+ enable-cache: false # release artifact must not depend on a (poisonable) cache
85
+ - name: Build sdist + wheel
86
+ run: uv build
87
+ - name: Publish to PyPI (trusted publishing)
88
+ uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
@@ -0,0 +1,39 @@
1
+ # Byte-compiled / optimized
2
+ __pycache__/
3
+ *.py[cod]
4
+
5
+ # Packaging / builds
6
+ build/
7
+ dist/
8
+ *.egg
9
+ *.egg-info/
10
+
11
+ # Virtual environments
12
+ .venv/
13
+ venv/
14
+ pyvenv.cfg
15
+
16
+ # Tooling caches
17
+ .mypy_cache/
18
+ .dmypy.json
19
+ .ruff_cache/
20
+ .pytest_cache/
21
+ .cache/
22
+
23
+ # Coverage / test reports
24
+ .coverage
25
+ coverage.xml
26
+ htmlcov/
27
+
28
+ # Environment / secrets
29
+ .env
30
+
31
+ # Editors / OS
32
+ .idea/
33
+ .vscode/
34
+ *.swp
35
+ *.swo
36
+ .DS_Store
37
+
38
+ # AI tooling
39
+ .claude/
@@ -0,0 +1,35 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: check-added-large-files
6
+ - id: check-json
7
+ - id: check-yaml
8
+ - id: end-of-file-fixer
9
+ - id: trailing-whitespace
10
+ - repo: local
11
+ hooks:
12
+ - id: ruff-format
13
+ name: ruff format
14
+ entry: uv run ruff format
15
+ language: system
16
+ types: [python]
17
+ require_serial: true
18
+ - id: ruff-check
19
+ name: ruff check
20
+ entry: uv run ruff check --fix
21
+ language: system
22
+ types: [python]
23
+ require_serial: true
24
+ - id: mypy
25
+ name: mypy
26
+ entry: uv run mypy
27
+ language: system
28
+ types: [python]
29
+ require_serial: true
30
+ - id: codespell
31
+ name: codespell
32
+ entry: uv run codespell --write-changes
33
+ language: system
34
+ pass_filenames: false
35
+ always_run: true
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.2.0"
3
+ }
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ ## [0.2.0](https://github.com/comfort-hub/delonghi-comfort/compare/v0.1.0...v0.2.0) (2026-07-18)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * temperature-setting APIs take a TemperatureUnit enum instead of a `celsius: bool`.
9
+
10
+ ### Features
11
+
12
+ * add schedule-enable and temp-unit commands + telemetry models ([3dc7ece](https://github.com/comfort-hub/delonghi-comfort/commit/3dc7ece6faa7f84e3715e5c1a595070277c8f3db))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * harden the MQTT transport against listener errors and reconnects ([a765fe9](https://github.com/comfort-hub/delonghi-comfort/commit/a765fe9d8167111e3f91fd72890b2f358e04687e))
18
+ * make Gigya auth resilient to gateway errors and rate limits ([d50c186](https://github.com/comfort-hub/delonghi-comfort/commit/d50c1861c71611c1fac0440812a1df459c77859c))