add partial import export and config preview#960
Conversation
Added the -y/--yes argument to skip prompts. Added --include-settings and --exclude-settings and filter to the binary protobuf both upon export and import. When configuring using a .cfg file and -y is omitted, the CLI will now output the config differences and prompt "Apply these changes to the node? [y/N]" before modifying any hardware settings. YAML files are skipped from the preview flow.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds selective ChangesSelective configuration profiles
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant filter_profile
participant export_profile
participant ProtobufSerializer
CLI->>filter_profile: Apply include/exclude selectors
filter_profile-->>CLI: Return filtered DeviceProfile
CLI->>CLI: Confirm binary profile application
CLI->>export_profile: Export with selectors
export_profile->>filter_profile: Filter constructed profile
filter_profile-->>export_profile: Return filtered profile
export_profile->>ProtobufSerializer: Serialize filtered profile
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
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 `@meshtastic/__main__.py`:
- Around line 1497-1580: Fix filter_profile so overlapping include entries merge
safely, preserving all-subfields semantics when a base is included alongside
specific subfields instead of calling add on None. Group top-level aliases by
their mapped protobuf field and clear each underlying field only when none of
its aliases are included. Normalize include bases consistently when matching
config and module_config fields, including underscore-less aliases, and use the
normalized key to apply subfield filtering. Apply the same normalization and
alias-aware lookup in the excludes branch so underscore-less and camel-case base
or subfield names clear the intended fields.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8ff7baf7-c32a-41bd-9f2e-a0476bd531d6
📒 Files selected for processing (1)
meshtastic/__main__.py
Added the -y/--yes argument to skip prompts (used during config import)
Added --include-settings and --exclude-settings and filter to the binary protobuf both upon export and import. When configuring using a .cfg file and -y is omitted, the CLI will now output the config differences and prompt "Apply these changes to the node? [y/N]" before modifying any hardware settings. YAML files are skipped from the preview flow.
Summary by CodeRabbit
--yesoption to bypass confirmation.