mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-24 07:52:44 +08:00
* feat(uxrce_dds_client): bridge the topics of out-of-tree messages Out-of-tree uORB messages build into PX4 like any other, but the bridge reads only dds_topics.yaml, so bridging one means editing that file and carrying the change through every PX4 update. When $EXTERNAL_MODULES_LOCATION/msg/dds_topics.yaml exists, the build passes it to the generator after dds_topics.yaml, and the generator appends each file's lists to those before it. A topic declared twice in the same list stops the build, since it would be bridged twice. A single file, as Zenoh's build passes, yields its lists unchanged. Assisted-by: Claude-Code:claude-opus-5-5 * test(uxrce_dds_client): test the topic generator in the Python checks The generator runs only inside a firmware build, so a change that breaks joining topic files, or the check for repeated topics, would first show up as a broken build. The tests run it on its own: a second file appends its topics to each list, lists split across files give the same header as one file, files without topics add nothing, and a repeated topic stops it. The Python checks job installs empy for the generator, in the range PX4's requirements.txt gives. Assisted-by: Claude-Code:claude-opus-5-5 * feat(scripts): copy out-of-tree messages into px4_msgs ROS 2 needs every bridged message in px4_msgs, and copy_to_ros_ws.sh copies only PX4's own. An optional second argument, the external modules location, adds the messages of its msg directory, if it has any. A message with the name of a PX4 message would replace PX4's definition in px4_msgs, so the script refuses it before copying anything. A test in the Python checks runs the script on throwaway workspaces: PX4's messages alone, a location's messages added, a location without messages, and the refusals of a PX4 message name and of a location without a msg directory. Assisted-by: Claude-Code:claude-opus-5-5 * docs(uxrce_dds): document bridging out-of-tree messages The uXRCE-DDS page covers dds_topics.yaml but not the topics of out-of-tree messages. Describe their topics file and the copy into px4_msgs there, and point to it from the External Modules page. Assisted-by: Claude-Code:claude-opus-5-5
83 lines
2.5 KiB
YAML
83 lines
2.5 KiB
YAML
name: Python CI Checks
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}"]
|
|
steps:
|
|
- uses: runs-on/action@v2
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.10"
|
|
|
|
- name: Install tools
|
|
run: |
|
|
pip install mypy types-requests types-PyYAML flake8 pyyaml "empy>=3.3,<4"
|
|
pip install -r Tools/setup/test-requirements.txt
|
|
|
|
- name: Check MAVSDK test scripts with mypy
|
|
run: mypy --strict test/mavsdk_tests/*.py
|
|
|
|
- name: Check MAVSDK test scripts with flake8
|
|
run: flake8 --config test/mavsdk_tests/.flake8 test/mavsdk_tests/*.py
|
|
|
|
- name: Check USB ID tooling with mypy and flake8
|
|
working-directory: Tools/ci
|
|
run: |
|
|
mypy --strict check_usb_ids.py usb_ids_runner.py test_check_usb_ids.py test_usb_ids_runner.py
|
|
flake8 check_usb_ids.py usb_ids_runner.py test_check_usb_ids.py test_usb_ids_runner.py
|
|
|
|
- name: Check AI review tooling and the PR review poster
|
|
working-directory: Tools/ci
|
|
run: |
|
|
mypy --strict -p ai_review
|
|
flake8 ai_review test_pr_review_poster.py
|
|
python3 -m unittest discover -s ai_review -t . -v
|
|
python3 -m unittest -v test_pr_review_poster
|
|
|
|
- name: Test PR title check
|
|
working-directory: Tools/ci
|
|
run: python3 -m unittest -v test_check_pr_title
|
|
|
|
- name: Check ROS workspace tooling
|
|
run: |
|
|
flake8 Tools/ros2/*.py
|
|
python3 -m unittest discover -s Tools/ros2 -p 'test_*.py'
|
|
|
|
- name: Check the uXRCE-DDS topic generator
|
|
run: |
|
|
flake8 src/modules/uxrce_dds_client/test_generate_dds_topics.py
|
|
python3 -m unittest discover -s src/modules/uxrce_dds_client -p 'test_*.py' -v
|
|
|
|
- name: Test the ROS workspace copy script
|
|
run: |
|
|
flake8 Tools/test_copy_to_ros_ws.py
|
|
python3 -m unittest discover -s Tools -p 'test_copy_to_ros_ws.py' -v
|
|
|
|
- name: Test submodule check
|
|
run: python3 -m unittest discover -s Tools -p 'test_check_submodules.py' -v
|
|
|
|
- name: Check parameter file migration
|
|
run: |
|
|
flake8 Tools/migrate_param_file.py Tools/test_migrate_param_file.py
|
|
python3 -m unittest discover -s Tools -p 'test_migrate_param_file.py' -v
|