-
Notifications
You must be signed in to change notification settings - Fork 2
Bugfix: implement solution for production energy-logs problem #259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis update introduces a bugfix related to log direction determination in the Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🧰 Additional context used🪛 LanguageToolCHANGELOG.md[uncategorized] ~10-~10: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short). (COMMA_COMPOUND_SENTENCE_2) ⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (2)
✨ Finishing Touches🧪 Generate Unit Tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #259 +/- ##
=======================================
Coverage 81.21% 81.21%
=======================================
Files 36 36
Lines 7537 7537
=======================================
Hits 6121 6121
Misses 1416 1416 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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
🧹 Nitpick comments (2)
plugwise_usb/nodes/helpers/pulses.py (1)
517-520: Simplify / clarify majority-timestamp testThe intent (see comment above the code) is “True when exactly two logs share the same timestamp”.
The current boolean expression works but is hard to scan. Consider making that explicit:- self._log_production = ( - next_timestamp == timestamp and prev_timestamp != timestamp - ) or (prev_timestamp == timestamp and next_timestamp != timestamp) + two_same = ( + (prev_timestamp == timestamp) ^ (next_timestamp == timestamp) + ) + self._log_production = two_sameThe XOR (
^) expresses “one and only one matches”, lining up with the comment.CHANGELOG.md (1)
3-6: Date stamp missingChangelog entries normally include a release date (
yyyy-mm-dd) so downstream users know when the fix shipped.
Example:## v0.44.2 – 2025-06-14
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
CHANGELOG.md(1 hunks)plugwise_usb/nodes/helpers/pulses.py(1 hunks)pyproject.toml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Ruff check and force
- GitHub Check: Check commit
🔇 Additional comments (1)
pyproject.toml (1)
7-7: Python 3.13 requirement may be too strict
requires-python = ">=3.13.0"blocks installation on currently-released interpreters (3.12 and below).
If 3.13 is not essential for this bug-fix, consider relaxing:requires-python = ">=3.10"This avoids unnecessary incompatibility until 3.13 is GA.
Improve function docstring
|



Summary by CodeRabbit
Bug Fixes
Chores