Refactor component editor#729
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the component editor to improve the save workflow and data model structure. The changes focus on separating validation from save operations and improving project state tracking.
- Renamed and refactored the save validation method to clarify its purpose
- Replaced template-based project tracking with a dedicated new project flag
- Updated tests to reflect the new save workflow
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
ardupilot_methodic_configurator/frontend_tkinter_component_editor_base.py |
Refactored save method from validate_and_save_component_json to on_save_pressed, added window closing behavior, and improved exception handling |
ardupilot_methodic_configurator/data_model_vehicle_components_base.py |
Replaced get_configuration_template() with is_new_project() flag for better project state tracking |
tests/test_frontend_tkinter_component_editor_base.py |
Updated tests to use new method names and adjusted assertions for the refactored save workflow |
tests/test_data_model_vehicle_components_templates.py |
Removed tests related to the deprecated configuration template tracking |
.github/workflows/bump_version_and_tag.yml |
Fixed regex pattern to use head -n1 for more reliable version extraction |
Update the pytests
256cb0c to
4b8132c
Compare
1 task
Contributor
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the component editor to improve the save workflow and data model structure. The changes focus on separating validation from save operations and improving project state tracking.