Skip to content

Commit ea969fb

Browse files
cclaussamilcarlucas
authored andcommitted
pre-commit autoupdate 2025-07-25
1 parent 3ee3560 commit ea969fb

File tree

83 files changed

+5002
-5004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+5002
-5004
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
# *.js @username1 @username2
88

99
# And you can specify owners for specific directories
10-
# /docs/ @username
10+
# /docs/ @username

.github/instructions/codebase_analysis_instructions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The codebase is organized into the following categories:
3838
```bash
3939
# Find all markdown files
4040
find . -name "*.md" -type f
41-
41+
4242
# Count lines in documentation
4343
find . -name "*.md" -type f | xargs cloc
4444
```
@@ -53,7 +53,7 @@ The codebase is organized into the following categories:
5353
```bash
5454
# Find all JSON files
5555
find . -name "*.json" -type f
56-
56+
5757
# Count lines in configuration files
5858
find . -name "*.json" -type f | xargs cloc
5959
```
@@ -87,7 +87,7 @@ The codebase is organized into the following categories:
8787
```bash
8888
# Find all Python scripts in root directory
8989
find . -maxdepth 1 -name "*.py" -type f
90-
90+
9191
# Count lines in root directory scripts
9292
cloc ./unix2dos.py ./create_pot_file.py ./insert_missing_translations.py \
9393
./mavproxy_param.py ./copy_magfit_pdef_to_template_dirs.py ./setup.py \
@@ -98,7 +98,7 @@ The codebase is organized into the following categories:
9898
./param_filter.py ./create_mo_files.py ./copy_param_files.py \
9999
./update_configuration_steps_translation.py ./merge_pot_file.py \
100100
./mavftp.py ./dos2unix.py
101-
101+
102102
# Count lines in scripts directory
103103
cloc scripts/
104104
```

.github/instructions/pytest_testing_instructions.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ def test_descriptive_behavior_name(self, fixture_name) -> None:
4747
THEN: Expected outcomes and assertions
4848
"""
4949
# Arrange (Given): Set up test data and mocks
50-
50+
5151
# Act (When): Execute the behavior being tested
52-
52+
5353
# Assert (Then): Verify expected outcomes
5454
```
5555

@@ -64,14 +64,14 @@ Create reusable fixtures that eliminate code duplication:
6464
def mock_vehicle_provider() -> MagicMock:
6565
"""Fixture providing a mock vehicle components provider with realistic test data."""
6666
provider = MagicMock()
67-
67+
6868
# Create properly structured mock data matching real object interfaces
6969
template_1 = MagicMock()
7070
template_1.attributes.return_value = ["name", "fc", "gnss"]
7171
template_1.name = "QuadCopter X"
72-
template_1.fc = "Pixhawk 6C"
72+
template_1.fc = "Pixhawk 6C"
7373
template_1.gnss = "Here3+"
74-
74+
7575
provider.get_vehicle_components_overviews.return_value = {
7676
"Copter/QuadX": template_1,
7777
}
@@ -105,11 +105,11 @@ def configured_window(mock_vehicle_provider) -> ComponentWindow:
105105
```python
106106
class TestUserWorkflow:
107107
"""Test complete user workflows and interactions."""
108-
108+
109109
def test_user_can_complete_primary_task(self, configured_window) -> None:
110110
"""
111111
User can successfully complete the primary workflow.
112-
112+
113113
GIVEN: A user opens the application
114114
WHEN: They follow the standard workflow
115115
THEN: They should achieve their goal without errors
@@ -179,8 +179,8 @@ def test_template_selection(self) -> None:
179179
# Use template_overview_window_setup fixture for complex UI mocking
180180
def test_ui_behavior(self, template_overview_window_setup) -> None:
181181
"""Test UI behavior without full window creation."""
182-
183-
# Use template_window fixture for component testing
182+
183+
# Use template_window fixture for component testing
184184
def test_component_behavior(self, template_window) -> None:
185185
"""Test component behavior with configured window."""
186186
```
@@ -191,7 +191,7 @@ def test_component_behavior(self, template_window) -> None:
191191
# Use minimal mocking for business logic
192192
def test_business_logic(self, mock_data_provider) -> None:
193193
"""Test core logic with realistic data."""
194-
194+
195195
# Mock only external dependencies
196196
@patch('module.external_api_call')
197197
def test_integration_behavior(self, mock_api) -> None:
@@ -203,7 +203,7 @@ def test_integration_behavior(self, mock_api) -> None:
203203
### Required Test Types
204204

205205
1. **User Workflow Tests** - Complete user journeys
206-
2. **Component Behavior Tests** - Individual component functionality
206+
2. **Component Behavior Tests** - Individual component functionality
207207
3. **Error Handling Tests** - Graceful failure scenarios
208208
4. **Integration Tests** - Component interaction validation
209209
5. **Edge Case Tests** - Boundary conditions and unusual inputs
@@ -213,7 +213,7 @@ def test_integration_behavior(self, mock_api) -> None:
213213
```text
214214
tests/
215215
├── test_frontend_tkinter_component.py # UI component tests
216-
├── test_backend_logic.py # Business logic tests
216+
├── test_backend_logic.py # Business logic tests
217217
├── test_integration_workflows.py # End-to-end scenarios
218218
└── conftest.py # Shared fixtures
219219
```
@@ -242,11 +242,11 @@ tests/
242242
```python
243243
class TestTemplateSelection:
244244
"""Test user template selection workflows."""
245-
245+
246246
def test_user_can_select_template_by_double_clicking(self, template_window) -> None:
247247
"""
248248
User can select a vehicle template by double-clicking on the tree item.
249-
249+
250250
GIVEN: A user views available vehicle templates
251251
WHEN: They double-click on a specific template row
252252
THEN: The template should be selected and stored
@@ -255,33 +255,33 @@ class TestTemplateSelection:
255255
# Arrange: Configure template selection behavior
256256
template_window.tree.identify_row.return_value = "template_item"
257257
template_window.tree.item.return_value = {"text": "Copter/QuadX"}
258-
258+
259259
# Act: User double-clicks on template
260260
mock_event = MagicMock(y=100)
261261
template_window._on_row_double_click(mock_event)
262-
262+
263263
# Assert: Template selected and workflow completed
264264
template_window.program_settings_provider.store_template_dir.assert_called_once_with("Copter/QuadX")
265265
template_window.root.destroy.assert_called_once()
266-
266+
267267
def test_user_sees_visual_feedback_during_selection(self, template_window) -> None:
268268
"""
269269
User receives immediate visual feedback when selecting templates.
270-
270+
271271
GIVEN: A user is browsing available templates
272272
WHEN: They click on a template row
273273
THEN: The corresponding vehicle image should be displayed immediately
274274
"""
275275
# Arrange: Set up selection behavior
276276
template_window.tree.selection.return_value = ["selected_item"]
277277
template_window.tree.item.return_value = {"text": "Plane/FixedWing"}
278-
278+
279279
with patch.object(template_window, "_display_vehicle_image") as mock_display:
280280
# Act: User selects template
281281
mock_event = MagicMock()
282282
template_window._on_row_selection_change(mock_event)
283283
template_window._update_selection() # Simulate callback
284-
284+
285285
# Assert: Visual feedback provided
286286
mock_display.assert_called_once_with("Plane/FixedWing")
287287
```
@@ -345,7 +345,7 @@ Before submitting any test changes:
345345
### Success Criteria
346346

347347
- ✅ All tests pass consistently
348-
- ✅ Coverage ≥ 80% on modified modules
348+
- ✅ Coverage ≥ 80% on modified modules
349349
- ✅ Zero ruff/mypy violations
350350
- ✅ Tests follow behavior-driven structure
351351
- ✅ Fixtures eliminate code duplication

.github/instructions/update_motor_diagrams.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ scripts/
8181
The motor diagrams are categorized by frame type:
8282

8383
- **QUAD FRAMES** (m_01_*): Standard quadcopter configurations
84-
- **HEXA FRAMES** (m_02_*): Hexacopter configurations
84+
- **HEXA FRAMES** (m_02_*): Hexacopter configurations
8585
- **OCTO FRAMES** (m_03_*): Octocopter configurations
8686
- **OCTO QUAD FRAMES** (m_04_*): Octo-quad configurations
8787
- **Y6 FRAMES** (m_05_*): Y6 configurations

.github/workflows/update_motor_diagrams.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ jobs:
7979
commit-message: "chore(images): Updated ArduPilot motor diagram SVG files"
8080
body: |
8181
This PR updates the ArduPilot motor diagram SVG files from the upstream ArduPilot documentation.
82-
82+
8383
Changes include:
8484
- Updated motor diagram SVG files from https://ardupilot.org/copter/docs/connect-escs-and-motors.html
8585
- Ensures diagrams are current with latest ArduPilot documentation
86-
86+
8787
These diagrams are used in the Motor Test sub-application to help users understand correct motor order and rotation.
8888
delete-branch: true

.github/workflows/update_vehicle_components_translation.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
runs-on: ubuntu-latest
3232
env:
3333
STRINGS_CHANGED: false
34-
34+
3535
steps:
3636
- name: Harden the runner (Audit all outbound calls)
3737
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
@@ -40,16 +40,16 @@ jobs:
4040

4141
- name: Checkout repository
4242
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43-
43+
4444
- name: Set up Python
4545
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
4646
with:
4747
python-version: '3.10'
48-
48+
4949
- name: Generate vehicle components strings
5050
run: |
5151
python update_vehicle_components_translation.py
52-
52+
5353
- name: Check for changes
5454
run: |
5555
git add ardupilot_methodic_configurator/vehicle_components.py
@@ -58,7 +58,7 @@ jobs:
5858
else
5959
echo "No changes to commit"
6060
fi
61-
61+
6262
- name: Create Pull Request
6363
if: env.STRINGS_CHANGED == 'true'
6464
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
@@ -68,12 +68,12 @@ jobs:
6868
title: 'Update vehicle components translatable strings'
6969
body: |
7070
This PR updates the vehicle_components.py file with new translatable strings.
71-
71+
7272
These strings were automatically extracted from the vehicle_components.json template files
7373
and the vehicle_components_schema.json schema file.
74-
74+
7575
This PR was triggered by changes to one or more files.
7676
branch: update-vehicle-components-strings
7777
delete-branch: true
7878
labels: automated-pr, i18n
79-
reviewers: ${{ github.actor }}
79+
reviewers: ${{ github.actor }}

ARCHITECTURE_1_software_update.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This ensures users always have access to the latest features, bug fixes, and sec
1111
### Functional Requirements - Implementation Status
1212

1313
1. **Version Check****IMPLEMENTED**
14-
- ✅ Checks current version against latest via GitHub releases API
14+
- ✅ Checks current version against latest via GitHub releases API
1515
- ✅ Handles network connectivity issues with proper exception handling
1616
- ✅ Validates version format using `packaging.version.parse()`
1717
- ✅ Supports semantic versioning and prerelease versions
@@ -44,7 +44,7 @@ This ensures users always have access to the latest features, bug fixes, and sec
4444
6. **Error Handling** ⚠️ **PARTIALLY IMPLEMENTED**
4545
- ✅ Network failures handled with appropriate error messages
4646
-**TODO**: No recovery from corrupted downloads
47-
-**TODO**: No rollback for failed installations
47+
-**TODO**: No rollback for failed installations
4848
- ✅ Clear error messages displayed to users
4949

5050
### Non-Functional Requirements - Implementation Status
@@ -157,7 +157,7 @@ This ensures users always have access to the latest features, bug fixes, and sec
157157

158158
-**Main Application**: Called from `__main__.py` during startup before other sub-applications
159159
-**TODO: Configuration System**: No update preferences stored - uses hardcoded behavior (stable releases only)
160-
-**Logging System**: Uses standard Python logging for all update activities and errors
160+
-**Logging System**: Uses standard Python logging for all update activities and errors
161161
-**File System**:
162162
- Windows: Uses `tempfile.TemporaryDirectory()` for secure temporary file handling
163163
- Both platforms: Manages installer/package downloads and cleanup
@@ -176,7 +176,7 @@ This ensures users always have access to the latest features, bug fixes, and sec
176176
### Error Handling Strategy
177177

178178
-**Network Errors**: Comprehensive handling of `RequestException`, `Timeout`, and connection errors
179-
-**Download Corruption**: Validates response status codes and handles stream errors
179+
-**Download Corruption**: Validates response status codes and handles stream errors
180180
-**Installation Failures**: Exception handling with logging for Windows and pip installation failures
181181
-**Permission Errors**: Catches `OSError` for file system permission issues
182182
-**User Feedback**: Clear error messages logged and displayed to users
@@ -199,7 +199,7 @@ This ensures users always have access to the latest features, bug fixes, and sec
199199

200200
```text
201201
middleware_software_updates.py # Core update logic and orchestration ✅
202-
frontend_tkinter_software_update.py # GUI dialog interface ✅
202+
frontend_tkinter_software_update.py # GUI dialog interface ✅
203203
backend_internet.py # Download and installation backend ✅
204204
tests/test_middleware_software_updates.py # Unit tests for core logic ✅
205205
tests/test_frontend_tkinter_software_update.py # UI dialog tests ✅
@@ -286,7 +286,7 @@ tests/test_frontend_tkinter_software_update.py # UI dialog tests ✅
286286
### Medium Priority TODO Items
287287

288288
1. **Add installation validation** to verify successful updates
289-
2. **Implement resume capability** for interrupted downloads
289+
2. **Implement resume capability** for interrupted downloads
290290
3. **Add user configuration** for update preferences
291291
4. **Enhance Windows security** by validating temp directory permissions
292292

ARCHITECTURE_motor_test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Status Legend
44

55
-**Green Check**: Fully implemented and tested with BDD pytest
6-
- 🟡 **Yellow Check**: Implemented but not yet tested with BDD pytest
6+
- 🟡 **Yellow Check**: Implemented but not yet tested with BDD pytest
77
-**Red Cross**: Not implemented
88

99
## Overview

ardupilot_methodic_configurator/AP_Motors_test_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"description": "Human-readable frame class name",
4040
"enum": [
4141
"QUAD",
42-
"HEXA",
42+
"HEXA",
4343
"OCTA",
4444
"OCTAQUAD",
4545
"Y6",

ardupilot_methodic_configurator/images/m_01_00_quad_plus.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)