Skip to content

Commit 5d164eb

Browse files
authored
Merge branch 'master' into dependabot/pip/matplotlib-3.10.0
2 parents a51f873 + 4c97e2e commit 5d164eb

File tree

9 files changed

+56
-11
lines changed

9 files changed

+56
-11
lines changed

.github/workflows/markdown-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
uses: actions/checkout@v4
1818

1919
- name: lint markdown
20-
uses: DavidAnson/markdownlint-cli2-action@v18
20+
uses: DavidAnson/markdownlint-cli2-action@v19
2121
with:
2222
globs: '**/*.md'

.github/workflows/pylint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
# https://docs.astral.sh/uv/guides/integration/github/
2727
- name: Install uv and set the python version
28-
uses: astral-sh/setup-uv@v4
28+
uses: astral-sh/setup-uv@v5
2929
with:
3030
python-version: ${{ matrix.python-version }}
3131

.github/workflows/python-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
# https://docs.astral.sh/uv/guides/integration/github/
3333
- name: Install uv and set the python version
34-
uses: astral-sh/setup-uv@v4
34+
uses: astral-sh/setup-uv@v5
3535
with:
3636
python-version: '3.12'
3737

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Renovate Pre-commit Hooks
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *" # Runs daily at midnight
6+
workflow_dispatch: # Allows manual trigger
7+
8+
jobs:
9+
renovate:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Self-hosted Renovate
16+
uses: renovatebot/github-action@v39.1.1
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
configurationFile: renovate-config.json
20+
env:
21+
LOG_LEVEL: debug
22+
23+
- name: Create Pull Request
24+
uses: peter-evans/create-pull-request@v5
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
branch: renovate/pre-commit-hooks
28+
title: "chore(deps): update pre-commit hooks"
29+
commit-message: "chore(deps): update pre-commit hooks"
30+
body: |
31+
Updates pre-commit hook versions in .pre-commit-config.yaml

.github/workflows/reuse.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v4
1818

1919
- name: Install uv and set the python version
20-
uses: astral-sh/setup-uv@v4
20+
uses: astral-sh/setup-uv@v5
2121
with:
2222
python-version: '3.13'
2323

REUSE.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ SPDX-FileCopyrightText = "2024-2025 Amilcar Lucas"
2626
SPDX-License-Identifier = "GPL-3.0-or-later"
2727

2828
[[annotations]]
29-
path = ["24_inflight_magnetometer_fit_setup.pdef.xml", "REUSE.toml", "SECURITY.md", "SetupDeveloperPC.bat", "SetupDeveloperPC.sh"]
29+
path = ["24_inflight_magnetometer_fit_setup.pdef.xml", "REUSE.toml", "SECURITY.md", "SetupDeveloperPC.bat", "SetupDeveloperPC.sh", "renovate-config.json"]
3030
SPDX-FileCopyrightText = "2024-2025 Amilcar Lucas"
3131
SPDX-License-Identifier = "GPL-3.0-or-later"
3232

copilot_translate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class CopilotClient: # pylint: disable=too-few-public-methods
5555
headers: dict[str, str]
5656

5757
def __init__(self) -> None:
58-
self.api_key = os.getenv("GITHUB_COPILOT_TOKEN")
58+
self.api_key = os.getenv("GITHUB_COPILOT_TOKEN", "")
5959
if not self.api_key:
6060
msg = "GITHUB_COPILOT_TOKEN environment variable not set"
6161
raise ValueError(msg)

renovate-config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": ["config:base"],
3+
"enabledManagers": ["pre-commit"],
4+
"packageRules": [
5+
{
6+
"matchManagers": ["pre-commit"],
7+
"automerge": true
8+
}
9+
]
10+
}

update_flight_controller_ids.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
# Define the base directory to crawl
2020
BASE_DIR = "../ardupilot/libraries/AP_HAL_ChibiOS/hwdef/"
2121

22+
hwdef_dict = dict[str, tuple[int, int, int, str, str, str]]
23+
2224
logging.basicConfig(level="INFO", format="%(asctime)s - %(levelname)s - %(message)s")
2325

2426
# Add ../ardupilot/libraries/AP_HAL_ChibiOS/hwdef/scripts to the PYTHON path
@@ -50,8 +52,8 @@ def remove_suffixes(base_dirname: str, suffixes: list) -> str:
5052
return base_dirname
5153

5254

53-
def process_hwdef_files(base_directory: str) -> dict[str, tuple[int, int, int, str, str]]:
54-
hwdef_data: dict[str, tuple[int, int, int, str, str, str]] = {}
55+
def process_hwdef_files(base_directory: str) -> hwdef_dict:
56+
hwdef_data: hwdef_dict = {}
5557

5658
# Walk through the directory
5759
for dirpath, _dirnames, filenames in os.walk(base_directory):
@@ -72,16 +74,18 @@ def process_hwdef_files(base_directory: str) -> dict[str, tuple[int, int, int, s
7274
dirname = os.path.basename(dirpath)
7375
numeric_board_id = int(c.get_numeric_board_id())
7476
vid, pid = c.get_USB_IDs()
77+
vid = int(vid)
78+
pid = int(pid)
7579
vid_name = str(c.get_config("USB_STRING_MANUFACTURER", default="ArduPilot")).strip('"').strip("'")
7680
pid_name = str(c.get_config("USB_STRING_PRODUCT", default=dirname)).strip('"').strip("'")
77-
mcu_series = c.mcu_series
81+
mcu_series = str(c.mcu_series)
7882
hwdef_data[dirname] = (numeric_board_id, vid, pid, vid_name, pid_name, mcu_series)
7983
# Sort the dictionary by the (dirname) key, so that python 3.13 produces similar results to python 3.12
8084
return dict(sorted(hwdef_data.items(), key=lambda x: x[0].lower()))
8185

8286

8387
def create_dicts( # pylint: disable=too-many-locals
84-
hwdef_data: dict[str, tuple[int, int, int, str, str, str]],
88+
hwdef_data: hwdef_dict,
8589
) -> tuple[dict[int, str], dict[tuple[int, int], str], dict[int, str], dict[int, str], dict[int, str]]:
8690
vid_vendor_dict: dict[int, str] = {}
8791
vid_pid_product_dict: dict[tuple[int, int], str] = {}
@@ -223,7 +227,7 @@ def main() -> None:
223227
apj_board_id_vendor_dict: dict[int, str] = {}
224228
mcu_series_dict: dict[int, str] = {}
225229

226-
hwdef_data: dict[str, tuple[int, int, int, str, str]] = process_hwdef_files(BASE_DIR)
230+
hwdef_data: hwdef_dict = process_hwdef_files(BASE_DIR)
227231
vid_vendor_dict, vid_pid_product_dict, apj_board_id_name_dict, apj_board_id_vendor_dict, mcu_series_dict = create_dicts(
228232
hwdef_data
229233
)

0 commit comments

Comments
 (0)