-
Notifications
You must be signed in to change notification settings - Fork 1
Make antenna gain and nol options optional #77
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
WalkthroughFields antenna_gain and nol_* in airos/data.py are changed from required ints to optional (int | None). Project version bumped to 0.4.3 in pyproject.toml. CHANGELOG.md updated with entry for 2025-08-22 noting these changes. No exported/public API signatures beyond field optionality adjustments. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ 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. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
=======================================
Coverage 91.36% 91.36%
=======================================
Files 4 4
Lines 730 730
=======================================
Hits 667 667
Misses 63 63 ☔ 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: 0
🧹 Nitpick comments (3)
CHANGELOG.md (1)
5-10: Changelog entry is clear and tied to actual code changes.The “Changed” note concisely communicates the optionality of antenna_gain and nol_*; date is explicit (2025-08-22). LGTM.
If you maintain compare links, consider adding a reference link for [0.4.3] at the bottom for easier diff navigation.
airos/data.py (2)
385-385: Make antenna_gain optional in Remote: correct and consistent.Setting
antenna_gain: int | None = Nonematches the stated device behavior and avoids deserialization failures on Prism/LiteBeam firmwares. LGTM.The trailing comment contains uncertainty (“6.3.5?”). Consider clarifying to keep comments authoritative.
Apply this small comment tweak:
- antenna_gain: int | None = None # Reported on Prism 6.3.5? and LiteBeam 8.7.8 + antenna_gain: int | None = None # Observed on Prism (FW 6.3.5) and LiteBeam (FW 8.7.8)
387-391: Docstring mismatch in Remote.pre_deserialize.Minor copy/paste issue: the docstring says “Wireless” while the method belongs to Remote. Quick fix below.
- def __pre_deserialize__(cls, d: dict[str, Any]) -> dict[str, Any]: - """Pre-deserialize hook for Wireless.""" + def __pre_deserialize__(cls, d: dict[str, Any]) -> dict[str, Any]: + """Pre-deserialize hook for Remote."""
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
CHANGELOG.md(1 hunks)airos/data.py(2 hunks)pyproject.toml(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
airos/data.py (2)
airos/airos8.py (1)
AirOS(32-349)tests/test_airos8.py (1)
test_status_missing_required_key_in_json(251-282)
🔇 Additional comments (2)
pyproject.toml (1)
7-7: Confirm version bump is consistent and ready for release✓ pyproject.toml (line 7): version = "0.4.3"
✓ CHANGELOG.md (line 5): ## [0.4.3] – 2025-08-22
✓ No stray__version__constants found outside build/dist directoriesAll references align with the 0.4.3 release.
airos/data.py (1)
482-485: Wireless optional fields scan complete—no unsafe usages found.Making
nol_state,nol_timeout, andantenna_gainoptional is appropriate and consistent with the rest of the model. I ran a grep for any direct attribute accesses (e.g.x.nol_state,x.nol_timeout,x.antenna_gain) and found none, so there are no consumers that assume these are always non-None. LGTM.• Optional follow-up: add a unit test to ensure that when those keys are omitted or null in input data, the corresponding attributes deserialize to
None(as in the example test in the original comment).



Summary by CodeRabbit