Skip to content

Batt specifications#1477

Merged
amilcarlucas merged 3 commits into
masterfrom
BATT_specifications
Apr 9, 2026
Merged

Batt specifications#1477
amilcarlucas merged 3 commits into
masterfrom
BATT_specifications

Conversation

@amilcarlucas
Copy link
Copy Markdown
Collaborator

No description provided.

…te checks

The elif branches in battery monitor and GNSS protocol lookups were
unreachable because all conn_type values in BATT_MONITOR_CONNECTION
and GNSS_RECEIVER_CONNECTION are list objects.

The Battery Monitor ESC duplicate-connection allowance was also
unreachable: BATT_MONITOR=9 maps to type "other", which is never
a serial port and therefore never triggers the duplicate check.
- Add config:best-practices to extends (pins digests, GitHub Action digests, config migration, dev dep pinning, abandonment alerts, npm min release age)
- Enable dependencyDashboard (currently false, required by best practices)
- Add minimumReleaseAge: "14 days" to the automerge rule — prevents merging malicious packages before registries can pull them
- Enable osvVulnerabilityAlerts and vulnerabilityAlerts
Copilot AI review requested due to automatic review settings April 9, 2026 20:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Renovate configuration and refines vehicle component validation logic, with a focus on battery/connection-related choices and validation behavior.

Changes:

  • Enable Renovate best-practices + semantic commits, turn on dependency dashboard and vulnerability alert features, and add a minimum release age for pre-commit automerge.
  • Simplify protocol-choice filtering logic for Battery Monitor and GNSS Receiver connection types.
  • Adjust validation code by removing a duplicate-connection exception and changing validate_entry_limits definition metadata.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
renovate.json Adopts Renovate recommended presets, enables dashboards/alerts, and adds pre-commit update aging before automerge.
ardupilot_methodic_configurator/data_model_vehicle_components_validation.py Simplifies connection-type/protocol filtering and tweaks validation/duplicate-connection handling.

)

def validate_entry_limits(self, value: str, path: ComponentPath) -> tuple[str, Optional[float]]: # noqa: PLR0911 # pylint: disable=too-many-return-statements
def validate_entry_limits(self, value: str, path: ComponentPath) -> tuple[str, Optional[float]]:
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validate_entry_limits still contains many early returns (e.g., type conversion errors, range checks, TOW min/max cross-validation, and delegation to validate_cell_voltage). Since Ruff is configured to lint PLR rules (including PLR0911 too-many-return-statements), removing the previous # noqa: PLR0911 / pylint disable will likely make this file fail linting. Consider re-adding the suppression for this function or refactoring to reduce the number of return statements (e.g., accumulate an (error, corrected) result and return once).

Suggested change
def validate_entry_limits(self, value: str, path: ComponentPath) -> tuple[str, Optional[float]]:
def validate_entry_limits( # noqa: PLR0911 # pylint: disable=too-many-return-statements
self, value: str, path: ComponentPath
) -> tuple[str, Optional[float]]:

Copilot uses AI. Check for mistakes.
@amilcarlucas amilcarlucas force-pushed the BATT_specifications branch from 5a5ac2c to e14775a Compare April 9, 2026 21:03
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
12052 11339 94% 89% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: e14775a by action🐍

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

Test Results

     4 files       4 suites   41m 35s ⏱️
 3 527 tests  3 525 ✅  2 💤 0 ❌
13 900 runs  13 876 ✅ 24 💤 0 ❌

Results for commit e14775a.

@amilcarlucas amilcarlucas merged commit 7b4372c into master Apr 9, 2026
31 checks passed
@amilcarlucas amilcarlucas deleted the BATT_specifications branch April 9, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants