Skip to content

chore(cursor): configure cloud environment - #52

Merged
Artic0din merged 1 commit into
mainfrom
cursor/setup-dev-environment-fc22
Jul 22, 2026
Merged

chore(cursor): configure cloud environment#52
Artic0din merged 1 commit into
mainfrom
cursor/setup-dev-environment-fc22

Conversation

@Artic0din

@Artic0din Artic0din commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Configure Cursor Cloud to install PowerSync runtime and test dependencies.
  • Document the verified Cloud Agent setup and known repository test-isolation failures.
  • No product code changed.

Type of change

  • Documentation-only change
  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change
  • Tooling/automation/CI change

Validation

python3 -m compileall custom_components
Result: passed

python3 -m pytest
Result: 1932 passed, 57 pre-existing test-isolation or stale-stub failures

GitHub Actions
Result: validate-hacs passed; validate-hassfest passed

HiGHS optimizer smoke test
Result: feasible 288-period schedule

Docs impact

  • README updated.
  • docs/ updated.
  • CHANGELOG.md updated.
  • AGENTS.md updated for the Cursor Cloud workflow.

Checklist

  • I have reviewed existing automation/scripts and reused them where applicable.
  • I have not moved or relocated application code.
  • I have updated or confirmed docs for behavior/config/workflow changes.

…oud setup)

Co-authored-by: Artic0din <Artic0din@users.noreply.github.com>
@Artic0din Artic0din changed the title chore: set up development environment chore(cursor): configure cloud environment Jul 22, 2026
@Artic0din
Artic0din marked this pull request as ready for review July 22, 2026 06:20
Copilot AI review requested due to automatic review settings July 22, 2026 06:20
@Artic0din
Artic0din merged commit 871281f into main Jul 22, 2026
2 checks passed
@Artic0din
Artic0din deleted the cursor/setup-dev-environment-fc22 branch July 22, 2026 06:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to pip install PowerSync runtime deps (matching manifest.json) plus pytest and tzdata.

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.

Comment thread .cursor/environment.json
{
"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"
Comment thread AGENTS.md
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants