chore(cursor): configure cloud environment - #52
Merged
Conversation
…oud setup) Co-authored-by: Artic0din <Artic0din@users.noreply.github.com>
Artic0din
marked this pull request as ready for review
July 22, 2026 06:20
There was a problem hiding this comment.
Pull request overview
This PR updates repository tooling/docs to support Cursor Cloud (cloud agent) by installing the integration’s runtime dependencies plus pytest, and documenting the verified cloud workflow and known test-isolation caveats. No product/integration code is changed.
Changes:
- Add Cursor Cloud workflow notes to
AGENTS.md, including dependency installation and test-run expectations. - Update
.cursor/environment.jsontopip installPowerSync runtime deps (matchingmanifest.json) pluspytestandtzdata.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| AGENTS.md | Documents Cursor Cloud setup, test execution, and known test-isolation/stub failure context. |
| .cursor/environment.json | Installs runtime + test dependencies in Cursor Cloud via pip. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "name": "PowerSync source review", | ||
| "install": "python3 -m compileall -q custom_components" | ||
| "install": "python3 -m pip install --break-system-packages pytest aiohttp 'aemo-to-tariff>=0.7.15' 'cryptography>=42.0.0' 'goodwe>=0.4.9' 'protobuf>=4.25.0' 'highspy>=1.7.0' tzdata" |
| - Runtime is Python 3.12 (`.python-version`). Dependencies are installed by the `.cursor/environment.json` `install` step (pip: `pytest`, `aiohttp`, `aemo-to-tariff`, `cryptography`, `goodwe`, `protobuf`, `highspy`, `tzdata`); there is no `requirements.txt`/`pyproject.toml`. Runtime deps are declared in `custom_components/power_sync/manifest.json`. | ||
| - `tzdata` is required (not optional): `aemo-to-tariff` resolves IANA zones like `Australia/ACT` at import time, which fails on the minimal VM without it. | ||
| - Tests: `python3 -m pytest` from the repo root (config is `pytest.ini`). Home Assistant is fully stubbed via `sys.modules`, so no Home Assistant install is needed. Prefer running focused test files. | ||
| - A full `python3 -m pytest` run currently reports ~57 failures out of ~1990 that are test-isolation/stale-stub issues, not environment problems: many pass in isolation (cross-module `sys.modules` stub pollution), and files like `tests/test_ev_vehicle_status.py` force-re-import `power_sync` against an incomplete `power_sync.optimization.coordinator` stub that omits symbols the current `__init__.py` imports (e.g. `sigenergy_capped_optimizer_limit_w`). Treat these as pre-existing; validate your change with the focused tests covering it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of change
Validation
Docs impact
Checklist