Skip to content

Add an extra fixture for testing in the Integration#878

Merged
bouwew merged 6 commits into
mainfrom
extra_fixture
May 25, 2026
Merged

Add an extra fixture for testing in the Integration#878
bouwew merged 6 commits into
mainfrom
extra_fixture

Conversation

@bouwew
Copy link
Copy Markdown
Contributor

@bouwew bouwew commented May 25, 2026

Summary by CodeRabbit

  • Tests
    • Added a new test fixture for Plugwise heating system configuration with off-schedule and idle states.
    • Enhanced fixture generation script to support additional test scenario variants.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 25, 2026

Warning

Review limit reached

@bouwew, we couldn't start this review because you've used your available PR reviews for now.

Your plan includes 1 review of capacity. Refill in 11 minutes and 12 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8431ab15-ed83-45dc-bd04-0bbf8f3ac295

📥 Commits

Reviewing files that changed from the base of the PR and between 1976c59 and afc7747.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • scripts/manual_fixtures.py
📝 Walkthrough

Walkthrough

This PR adds a new test fixture variant m_adam_heating_off_schedule for Plugwise Adam heating systems. The fixture generation script is extended to clone the existing m_adam_heating fixture and apply targeted state overrides such as climate modes set to "off" and heating control states set to "idle". The resulting complete fixture data is provided as JSON.

Changes

Adam heating off-schedule fixture generation

Layer / File(s) Summary
Fixture generation script logic
scripts/manual_fixtures.py
Fixture generation is extended to derive m_adam_heating_off_schedule from m_adam_heating by applying targeted overrides: climate modes and control states to "off"/"idle", schedule selection, regulation mode, and heating sensor values.
Generated fixture data
fixtures/m_adam_heating_off_schedule/data.json
Complete JSON fixture dataset containing all Adam heating system entities (heater, gateway, thermostats, groups, sensors) with their metadata, availability, and state reflecting the applied climate/control mode overrides.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • plugwise/python-plugwise#668: Modifies fixture generation similarly by adjusting climate and control state overrides for Adam variants to fix heating/cooling fixture mixups.

Suggested reviewers

  • CoMPaTech
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a new fixture file (m_adam_heating_off_schedule) for testing purposes in the integration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch extra_fixture

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot requested a review from CoMPaTech May 25, 2026 10:36
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (45ab4e3) to head (afc7747).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #878   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         3457      3457           
=========================================
  Hits          3457      3457           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/manual_fixtures.py`:
- Around line 202-225: The patch mistakenly mutates m_adam_heating instead of
the intended m_adam_heating_off_schedule, causing alias-dependent output; fix by
creating m_adam_heating_off_schedule as a deep copy (use copy.deepcopy) of
m_adam_heating or by applying all subsequent overrides to
m_adam_heating_off_schedule (e.g., updates for keys
"f2bf9048bef64cc5b6d5110154e33c81", "f871b8c4d63549319221e294e4f88074",
"da224107914542988a88561b4452b0f6", "056ee145a816487eaa69243c3280f8bf") so
json_writer("m_adam_heating_off_schedule", m_adam_heating_off_schedule) writes
an independently modified object.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1631afcc-bd4a-4927-a98b-d7666df8dd5c

📥 Commits

Reviewing files that changed from the base of the PR and between 45ab4e3 and 1976c59.

📒 Files selected for processing (2)
  • fixtures/m_adam_heating_off_schedule/data.json
  • scripts/manual_fixtures.py

Comment thread scripts/manual_fixtures.py
@sonarqubecloud
Copy link
Copy Markdown

@bouwew bouwew marked this pull request as ready for review May 25, 2026 11:24
@bouwew bouwew requested a review from a team as a code owner May 25, 2026 11:24
@bouwew bouwew merged commit 5f6d559 into main May 25, 2026
18 checks passed
@bouwew bouwew deleted the extra_fixture branch May 25, 2026 11:26
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.

1 participant