-
Notifications
You must be signed in to change notification settings - Fork 1
Update readme #119
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
Update readme #119
Conversation
WalkthroughThis PR introduces support for multiple AirOS firmware variants (AirOS6 and AirOS8) through runtime polymorphic device instantiation. The implementation detects firmware version at runtime, selects the appropriate device class, and adapts data structure access patterns to accommodate differences between firmware versions. Changes
Sequence DiagramsequenceDiagram
participant User
participant Main
participant Device as Device Factory
participant AirOS6
participant AirOS8
User->>Main: Invoke script
Main->>Device: async_get_firmware_data(conn_data)
Device->>Device: Detect AirOS version
alt Firmware Major Version 6
Device->>AirOS6: Select AirOS6 class
else Firmware Major Version 8
Device->>AirOS8: Select AirOS8 class
end
Device-->>Main: Return device class & data
Main->>Main: airos_device = airos_class(conn_data)
Main->>airos_device: login()
airos_device-->>Main: Connection established
Main->>airos_device: status()
alt AirOS6 structure
airos_device-->>Main: status.host, status.wireless.stations
else AirOS8 structure
airos_device-->>Main: status.host, status.wireless.sta
end
Main->>Main: Process stations (polymorphic)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes The PR introduces a new polymorphic pattern with runtime device class selection based on firmware detection, affecting multiple logical areas (imports, instantiation, data access). The changes follow a consistent approach across variants but require verification of correct version detection logic, data structure mappings, and end-to-end polymorphic behavior. Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
|
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 (1)
README.md (1)
83-99
: Drop or use the unused type alias.
AirOSDataDetect = AirOS8Data | AirOS6Data
isn’t referenced later, so the alias reads like a leftover and adds noise to the example. Either remove it or put it to work by annotatingstatus_data
(e.g.,status_data: AirOSDataDetect = await airos_device.status()
).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #119 +/- ##
=======================================
Coverage 89.57% 89.57%
=======================================
Files 8 8
Lines 681 681
=======================================
Hits 610 610
Misses 71 71 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary by CodeRabbit
New Features
Refactor