actuator-lint 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. actuator_lint-0.4.2/.github/ISSUE_TEMPLATE/wrong-result.md +19 -0
  2. actuator_lint-0.4.2/.github/dependabot.yml +7 -0
  3. actuator_lint-0.4.2/.github/workflows/action-check.yml +95 -0
  4. actuator_lint-0.4.2/.github/workflows/install-check.yml +91 -0
  5. actuator_lint-0.4.2/.github/workflows/pypi.yml +48 -0
  6. actuator_lint-0.4.2/.github/workflows/release.yml +85 -0
  7. actuator_lint-0.4.2/.github/workflows/tests.yml +110 -0
  8. actuator_lint-0.4.2/.gitignore +4 -0
  9. actuator_lint-0.4.2/CHANGELOG.md +239 -0
  10. actuator_lint-0.4.2/CONTRIBUTING.md +49 -0
  11. actuator_lint-0.4.2/LICENSE +29 -0
  12. actuator_lint-0.4.2/PKG-INFO +80 -0
  13. actuator_lint-0.4.2/README.md +347 -0
  14. actuator_lint-0.4.2/SECURITY.md +15 -0
  15. actuator_lint-0.4.2/action/install.sh +53 -0
  16. actuator_lint-0.4.2/action/run.sh +80 -0
  17. actuator_lint-0.4.2/action.yml +55 -0
  18. actuator_lint-0.4.2/actuator_lint/__init__.py +10 -0
  19. actuator_lint-0.4.2/actuator_lint/__main__.py +6 -0
  20. actuator_lint-0.4.2/actuator_lint/cli.py +240 -0
  21. actuator_lint-0.4.2/actuator_lint/diff.py +168 -0
  22. actuator_lint-0.4.2/actuator_lint/engine.py +223 -0
  23. actuator_lint-0.4.2/actuator_lint/legal.py +85 -0
  24. actuator_lint-0.4.2/actuator_lint/params.py +244 -0
  25. actuator_lint-0.4.2/actuator_lint/report.py +395 -0
  26. actuator_lint-0.4.2/actuator_lint/rules.py +620 -0
  27. actuator_lint-0.4.2/docs/example-reports/README.md +29 -0
  28. actuator_lint-0.4.2/docs/example-reports/fixed_wing.md +37 -0
  29. actuator_lint-0.4.2/docs/example-reports/fixed_wing_thrust_offset.md +38 -0
  30. actuator_lint-0.4.2/docs/example-reports/hexa_rotor_count_4.md +38 -0
  31. actuator_lint-0.4.2/docs/example-reports/no_rotors.md +14 -0
  32. actuator_lint-0.4.2/docs/example-reports/quad_no_positions.md +38 -0
  33. actuator_lint-0.4.2/docs/example-reports/quad_qgc_export.md +36 -0
  34. actuator_lint-0.4.2/docs/example-reports/quad_rotor_down.md +37 -0
  35. actuator_lint-0.4.2/docs/example-reports/quad_same_spin.md +37 -0
  36. actuator_lint-0.4.2/docs/example-reports/quad_wrong_spin.md +37 -0
  37. actuator_lint-0.4.2/docs/example-reports/standard_vtol.md +81 -0
  38. actuator_lint-0.4.2/docs/example-reports/standard_vtol_pusher_backwards.md +82 -0
  39. actuator_lint-0.4.2/docs/example-reports/standard_vtol_pusher_offset.md +83 -0
  40. actuator_lint-0.4.2/docs/example-reports/standard_vtol_typing_mistakes.md +87 -0
  41. actuator_lint-0.4.2/docs/example-reports/tailsitter.md +56 -0
  42. actuator_lint-0.4.2/docs/example-reports/tiltrotor.md +81 -0
  43. actuator_lint-0.4.2/docs/example-reports/tiltrotor_tilt_servo_missing.md +81 -0
  44. actuator_lint-0.4.2/docs/example-reports/tricopter_tilt.md +36 -0
  45. actuator_lint-0.4.2/docs/getting-started.md +144 -0
  46. actuator_lint-0.4.2/docs/github-action.md +65 -0
  47. actuator_lint-0.4.2/docs/images/quad-x-axes.svg +61 -0
  48. actuator_lint-0.4.2/docs/images/terminal.svg +70 -0
  49. actuator_lint-0.4.2/docs/px4-airframes.md +76 -0
  50. actuator_lint-0.4.2/docs/pypi.md +52 -0
  51. actuator_lint-0.4.2/docs/reading-a-report.md +178 -0
  52. actuator_lint-0.4.2/docs/versioning.md +153 -0
  53. actuator_lint-0.4.2/engine/build.sh +50 -0
  54. actuator_lint-0.4.2/engine/build_sitl.sh +43 -0
  55. actuator_lint-0.4.2/engine/package.sh +90 -0
  56. actuator_lint-0.4.2/engine/src/CMakeLists.txt +70 -0
  57. actuator_lint-0.4.2/engine/src/main.cpp +397 -0
  58. actuator_lint-0.4.2/examples/fixed_wing.params +14 -0
  59. actuator_lint-0.4.2/examples/fixed_wing_thrust_offset.params +15 -0
  60. actuator_lint-0.4.2/examples/hexa_rotor_count_4.params +22 -0
  61. actuator_lint-0.4.2/examples/no_rotors.params +6 -0
  62. actuator_lint-0.4.2/examples/quad_no_positions.params +9 -0
  63. actuator_lint-0.4.2/examples/quad_qgc_export.params +18 -0
  64. actuator_lint-0.4.2/examples/quad_rotor_down.params +18 -0
  65. actuator_lint-0.4.2/examples/quad_same_spin.params +18 -0
  66. actuator_lint-0.4.2/examples/quad_wrong_spin.params +14 -0
  67. actuator_lint-0.4.2/examples/standard_vtol.params +25 -0
  68. actuator_lint-0.4.2/examples/standard_vtol_pusher_backwards.params +28 -0
  69. actuator_lint-0.4.2/examples/standard_vtol_pusher_offset.params +26 -0
  70. actuator_lint-0.4.2/examples/standard_vtol_typing_mistakes.params +30 -0
  71. actuator_lint-0.4.2/examples/tailsitter.params +15 -0
  72. actuator_lint-0.4.2/examples/tiltrotor.params +29 -0
  73. actuator_lint-0.4.2/examples/tiltrotor_tilt_servo_missing.params +28 -0
  74. actuator_lint-0.4.2/examples/tricopter_tilt.params +15 -0
  75. actuator_lint-0.4.2/pyproject.toml +46 -0
  76. actuator_lint-0.4.2/rules/CA001.md +25 -0
  77. actuator_lint-0.4.2/rules/CA002.md +33 -0
  78. actuator_lint-0.4.2/rules/CA003.md +19 -0
  79. actuator_lint-0.4.2/rules/CA004.md +23 -0
  80. actuator_lint-0.4.2/rules/CA005.md +49 -0
  81. actuator_lint-0.4.2/rules/CA006.md +60 -0
  82. actuator_lint-0.4.2/rules/CA010.md +28 -0
  83. actuator_lint-0.4.2/rules/CA011.md +24 -0
  84. actuator_lint-0.4.2/rules/CA012.md +57 -0
  85. actuator_lint-0.4.2/rules/CA020.md +27 -0
  86. actuator_lint-0.4.2/rules/CA021.md +40 -0
  87. actuator_lint-0.4.2/rules/CA022.md +47 -0
  88. actuator_lint-0.4.2/rules/CA030.md +33 -0
  89. actuator_lint-0.4.2/rules/CA031.md +25 -0
  90. actuator_lint-0.4.2/tests/__init__.py +1 -0
  91. actuator_lint-0.4.2/tests/golden/v1.17.0/index.json +518 -0
  92. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/1001_rc_quad_x.hil.json +127 -0
  93. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/1002_standard_vtol.hil.json +250 -0
  94. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/11001_hexa_cox.json +157 -0
  95. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/1100_rc_quad_x_sih.hil.json +127 -0
  96. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/1101_rc_plane_sih.hil.json +127 -0
  97. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/1102_tailsitter_duo_sih.hil.json +182 -0
  98. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/1103_standard_vtol_sih.hil.json +250 -0
  99. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/12001_octo_cox.json +187 -0
  100. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/13000_generic_vtol_standard.json +265 -0
  101. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/13030_generic_vtol_quad_tiltrotor.json +302 -0
  102. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/13100_generic_vtol_tiltrotor.json +278 -0
  103. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/13200_generic_vtol_tailsitter.json +182 -0
  104. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/14001_generic_mc_with_tilt.json +127 -0
  105. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/17002_TF-AutoG2.json +127 -0
  106. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/17003_TF-G2.json +127 -0
  107. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/2100_standard_plane.json +142 -0
  108. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/2106_albatross.json +187 -0
  109. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/24001_dodeca_cox.json +247 -0
  110. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/3000_generic_wing.json +112 -0
  111. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4001_quad_x.json +127 -0
  112. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4014_s500.json +127 -0
  113. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4015_holybro_s500.json +127 -0
  114. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4016_holybro_px4vision.json +127 -0
  115. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4017_nxp_hovergames.json +127 -0
  116. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4019_x500_v2.json +127 -0
  117. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4020_holybro_px4vision_v1_5.json +127 -0
  118. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4041_beta75x.json +127 -0
  119. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4050_generic_250.json +127 -0
  120. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4052_holybro_qav250.json +127 -0
  121. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4053_holybro_kopis2.json +127 -0
  122. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4061_atl_mantis_edu.json +127 -0
  123. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4071_ifo.json +127 -0
  124. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4073_ifo-s.json +127 -0
  125. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4500_clover4.json +127 -0
  126. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4601_droneblocks_dexi_5.json +127 -0
  127. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/4901_crazyflie21.json +77 -0
  128. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/5001_quad_+.json +127 -0
  129. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/6001_hexa_x.json +157 -0
  130. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/6002_draco_r.json +157 -0
  131. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/7001_hexa_+.json +157 -0
  132. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/8001_octo_x.json +187 -0
  133. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d/9001_octo_+.json +187 -0
  134. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/10015_gazebo-classic_iris.json +127 -0
  135. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/10016_none_iris.json +127 -0
  136. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/10017_jmavsim_iris.json +127 -0
  137. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/10018_gazebo-classic_iris_foggy_lidar.json +127 -0
  138. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/10019_gazebo-classic_omnicopter.json +187 -0
  139. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/10030_gazebo-classic_px4vision.json +127 -0
  140. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/10040_sihsim_quadx.json +127 -0
  141. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/10041_sihsim_airplane.json +127 -0
  142. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/10042_sihsim_xvert.json +182 -0
  143. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/10043_sihsim_standard_vtol.json +250 -0
  144. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/10044_sihsim_hex.json +157 -0
  145. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1010_gazebo-classic_iris_opt_flow.json +127 -0
  146. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1011_gazebo-classic_iris_irlock.json +127 -0
  147. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1012_gazebo-classic_iris_rplidar.json +127 -0
  148. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1013_gazebo-classic_iris_vision.json +127 -0
  149. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1017_gazebo-classic_iris_opt_flow_mockup.json +127 -0
  150. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1019_gazebo-classic_iris_dual_gps.json +127 -0
  151. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1030_gazebo-classic_plane.json +172 -0
  152. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1031_gazebo-classic_plane_cam.json +172 -0
  153. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1032_gazebo-classic_plane_catapult.json +172 -0
  154. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1033_jsbsim_rascal.json +172 -0
  155. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1034_flightgear_rascal-electric.json +172 -0
  156. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1035_gazebo-classic_techpod.json +172 -0
  157. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1036_jsbsim_malolo.json +172 -0
  158. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1037_gazebo-classic_believer.json +172 -0
  159. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1038_gazebo-classic_glider.json +172 -0
  160. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1039_flightgear_rascal.json +172 -0
  161. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1039_gazebo-classic_advanced_plane.json +172 -0
  162. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1040_gazebo-classic_standard_vtol.json +250 -0
  163. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1041_gazebo-classic_tailsitter.json +212 -0
  164. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1042_gazebo-classic_tiltrotor.json +263 -0
  165. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1043_gazebo-classic_standard_vtol_drop.json +250 -0
  166. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1044_gazebo-classic_plane_lidar.json +172 -0
  167. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/1045_gazebo-classic_quadtailsitter.json +174 -0
  168. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/17001_flightgear_tf-g1.json +127 -0
  169. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/17002_flightgear_tf-g2.json +127 -0
  170. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/3010_jsbsim_quadrotor_x.json +127 -0
  171. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/3011_jsbsim_hexarotor_x.json +79 -0
  172. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/4001_gz_x500.json +127 -0
  173. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/4003_gz_rc_cessna.json +172 -0
  174. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/4004_gz_standard_vtol.json +250 -0
  175. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/4006_gz_px4vision.json +127 -0
  176. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/4008_gz_advanced_plane.json +172 -0
  177. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/4018_gz_quadtailsitter.json +174 -0
  178. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/4019_gz_x500_gimbal.json +127 -0
  179. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/4020_gz_tiltrotor.json +263 -0
  180. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/4021_gz_x500_flow.json +127 -0
  181. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/6011_gazebo-classic_typhoon_h480.json +157 -0
  182. actuator_lint-0.4.2/tests/golden/v1.17.0/init.d-posix/8011_gz_omnicopter.json +187 -0
  183. actuator_lint-0.4.2/tests/test_action.py +108 -0
  184. actuator_lint-0.4.2/tests/test_cli.py +378 -0
  185. actuator_lint-0.4.2/tests/test_diff.py +106 -0
  186. actuator_lint-0.4.2/tests/test_engine.py +230 -0
  187. actuator_lint-0.4.2/tests/test_example_reports.py +74 -0
  188. actuator_lint-0.4.2/tests/test_golden.py +193 -0
  189. actuator_lint-0.4.2/tests/test_legal.py +123 -0
  190. actuator_lint-0.4.2/tests/test_params.py +149 -0
  191. actuator_lint-0.4.2/tests/test_release_notes.py +49 -0
  192. actuator_lint-0.4.2/tests/test_report.py +204 -0
  193. actuator_lint-0.4.2/tests/test_rules.py +439 -0
  194. actuator_lint-0.4.2/tests/test_sitl.py +328 -0
  195. actuator_lint-0.4.2/tests/test_terminal_image.py +97 -0
  196. actuator_lint-0.4.2/tools/example_reports.py +187 -0
  197. actuator_lint-0.4.2/tools/release_notes.py +58 -0
  198. actuator_lint-0.4.2/tools/terminal_image.py +216 -0
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: Wrong or missing finding
3
+ about: The tool reported something that is not a problem, or missed one
4
+ ---
5
+
6
+ **Parameter file**
7
+
8
+ Attach the file or paste the `CA_*` lines.
9
+
10
+ **Command and output**
11
+
12
+ ```
13
+ actuator-lint --version
14
+ actuator-lint <file>
15
+ ```
16
+
17
+ **What you expected**
18
+
19
+ **PX4 version of the vehicle** (the report shows the PX4 version of the engine)
@@ -0,0 +1,7 @@
1
+ version: 2
2
+ updates:
3
+ # keep the actions used by the workflows current
4
+ - package-ecosystem: github-actions
5
+ directory: /
6
+ schedule:
7
+ interval: weekly
@@ -0,0 +1,95 @@
1
+ name: action check
2
+
3
+ # Uses the GitHub Action of this repository the way another repository would:
4
+ # it installs a published release and checks files of examples/.
5
+ #
6
+ # The action installs the release named by the default of its version input,
7
+ # which is set to the next release before that release is tagged. Until the
8
+ # release is published, a push to main cannot check the action and says so;
9
+ # publishing the release runs the check in full.
10
+
11
+ on:
12
+ push:
13
+ branches: [main]
14
+ paths:
15
+ - action.yml
16
+ - action/**
17
+ - .github/workflows/action-check.yml
18
+ pull_request:
19
+ paths:
20
+ - action.yml
21
+ - action/**
22
+ - .github/workflows/action-check.yml
23
+ release:
24
+ types: [published]
25
+ workflow_dispatch:
26
+
27
+ permissions:
28
+ contents: read
29
+
30
+ jobs:
31
+ action:
32
+ name: ${{ matrix.runner }}
33
+ runs-on: ${{ matrix.runner }}
34
+ strategy:
35
+ fail-fast: false
36
+ matrix:
37
+ runner: [ubuntu-24.04, ubuntu-24.04-arm, macos-26]
38
+ steps:
39
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
40
+ - name: The release the action installs
41
+ id: release
42
+ env:
43
+ GH_TOKEN: ${{ github.token }}
44
+ EVENT: ${{ github.event_name }}
45
+ run: |
46
+ version="$(awk '/^ version:/ { input = 1 } input && /default:/ { gsub(/[" ]|default:/, ""); print; exit }' action.yml)"
47
+ echo "the action installs release ${version}"
48
+ test -n "${version}"
49
+
50
+ if [ "${EVENT}" = release ] \
51
+ || [ "$(gh release view "v${version}" -R "${GITHUB_REPOSITORY}" --json isDraft --jq .isDraft 2> /dev/null)" = false ]; then
52
+ echo "published=true" >> "${GITHUB_OUTPUT}"
53
+ else
54
+ echo "::notice::release ${version} is not published yet, so the action is not checked; publishing it runs this check"
55
+ echo "published=false" >> "${GITHUB_OUTPUT}"
56
+ fi
57
+ - name: Files without error findings
58
+ id: good
59
+ if: steps.release.outputs.published == 'true'
60
+ uses: ./
61
+ with:
62
+ files: |
63
+ examples/fixed_wing.params
64
+ examples/tilt*.params
65
+ - name: A file with an error finding
66
+ id: bad
67
+ if: steps.release.outputs.published == 'true'
68
+ continue-on-error: true
69
+ uses: ./
70
+ with:
71
+ files: examples/quad_rotor_down.params
72
+ summary: "false"
73
+ - name: The same file, findings allowed
74
+ id: allowed
75
+ if: steps.release.outputs.published == 'true'
76
+ uses: ./
77
+ with:
78
+ files: examples/quad_rotor_down.params
79
+ fail-on: never
80
+ summary: "false"
81
+ - name: Check the results
82
+ if: steps.release.outputs.published == 'true'
83
+ env:
84
+ GOOD_FILES: ${{ steps.good.outputs.files }}
85
+ GOOD_FAILED: ${{ steps.good.outputs.failed }}
86
+ BAD_OUTCOME: ${{ steps.bad.outcome }}
87
+ BAD_FAILED: ${{ steps.bad.outputs.failed }}
88
+ ALLOWED_FAILED: ${{ steps.allowed.outputs.failed }}
89
+ run: |
90
+ echo "good: $GOOD_FILES files, $GOOD_FAILED failed; bad: $BAD_OUTCOME, $BAD_FAILED failed; allowed: $ALLOWED_FAILED failed"
91
+ test "$GOOD_FILES" = 3
92
+ test "$GOOD_FAILED" = 0
93
+ test "$BAD_OUTCOME" = failure
94
+ test "$BAD_FAILED" = 1
95
+ test "$ALLOWED_FAILED" = 0
@@ -0,0 +1,91 @@
1
+ name: install check
2
+
3
+ # Follows the install steps of the README with the files of a published
4
+ # release, on clean runners, and runs the tool on an example.
5
+
6
+ on:
7
+ release:
8
+ types: [published]
9
+ workflow_dispatch:
10
+ inputs:
11
+ version:
12
+ description: Release to check, without the leading v
13
+ required: true
14
+ default: "0.4.2"
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ install:
21
+ name: ${{ matrix.platform }} on ${{ matrix.runner }}, ${{ matrix.installer }}
22
+ runs-on: ${{ matrix.runner }}
23
+ strategy:
24
+ fail-fast: false
25
+ matrix:
26
+ platform: [linux-x86_64, linux-arm64, macos-arm64]
27
+ installer: [uv, venv]
28
+ include:
29
+ - platform: linux-x86_64
30
+ runner: ubuntu-24.04
31
+ - platform: linux-arm64
32
+ runner: ubuntu-24.04-arm
33
+ - platform: macos-arm64
34
+ runner: macos-26
35
+ env:
36
+ VERSION: ${{ inputs.version || github.event.release.tag_name }}
37
+ PLATFORM: ${{ matrix.platform }}
38
+ GH_TOKEN: ${{ github.token }}
39
+ steps:
40
+ - name: Version without the leading v
41
+ run: echo "VERSION=${VERSION#v}" >> "$GITHUB_ENV"
42
+ # only the examples are taken from the repository
43
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
44
+ with:
45
+ ref: v${{ env.VERSION }}
46
+ sparse-checkout: examples
47
+ - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
48
+ if: matrix.installer == 'uv'
49
+ - name: Install the Python package with uv
50
+ if: matrix.installer == 'uv'
51
+ run: uv tool install "https://github.com/Abtektas/actuator-lint/releases/download/v${VERSION}/actuator_lint-${VERSION}-py3-none-any.whl"
52
+ - name: Install the Python package in a virtual environment
53
+ if: matrix.installer == 'venv'
54
+ run: |
55
+ python3 --version
56
+ python3 -m venv "$RUNNER_TEMP/venv"
57
+ "$RUNNER_TEMP/venv/bin/pip" install "https://github.com/Abtektas/actuator-lint/releases/download/v${VERSION}/actuator_lint-${VERSION}-py3-none-any.whl"
58
+ echo "$RUNNER_TEMP/venv/bin" >> "$GITHUB_PATH"
59
+ - name: Install the engine
60
+ working-directory: ${{ runner.temp }}
61
+ run: |
62
+ BASE="https://github.com/Abtektas/actuator-lint/releases/download/v${VERSION}"
63
+ curl -fLO "$BASE/SHA256SUMS"
64
+ NAME="$(grep -o "actuator_lint_engine-.*-${PLATFORM}" SHA256SUMS)"
65
+ curl -fLO "$BASE/$NAME.tar.gz"
66
+ shasum -a 256 --ignore-missing -c SHA256SUMS
67
+ gh attestation verify "$NAME.tar.gz" -R Abtektas/actuator-lint
68
+ tar -xzf "$NAME.tar.gz"
69
+ mkdir -p ~/.local/share/actuator-lint
70
+ cp "$NAME/actuator_lint_engine" ~/.local/share/actuator-lint/
71
+ - name: Run the tool
72
+ run: |
73
+ actuator-lint --version
74
+ actuator-lint examples/standard_vtol.params
75
+ actuator-lint examples/standard_vtol_pusher_offset.params
76
+ - name: Check the result
77
+ run: |
78
+ actuator-lint --format json examples/standard_vtol_pusher_offset.params > report.json
79
+ python3 - <<'EOF'
80
+ import json
81
+ report = json.load(open("report.json"))
82
+ rules = sorted(finding["rule"] for finding in report["findings"])
83
+ gain = report["matrices"][0]["mix"][4]["thrust_x"]
84
+ print(report["px4"]["version"], rules, gain)
85
+ assert rules == ["CA010", "CA011"], rules
86
+ assert abs(gain - 4.0) < 1e-3, gain
87
+ EOF
88
+ status=0
89
+ actuator-lint --fail-on warning examples/standard_vtol_pusher_offset.params > /dev/null || status=$?
90
+ test "$status" -eq 1
91
+ actuator-lint diff examples/standard_vtol.params examples/standard_vtol_pusher_offset.params
@@ -0,0 +1,48 @@
1
+ name: pypi
2
+
3
+ # Uploads the Python package of a published release to the Python Package
4
+ # Index, with the files of that release. An upload cannot be undone, so the
5
+ # workflow does nothing until the repository variable PYPI_PUBLISH is set to
6
+ # "true"; docs/versioning.md says what has to be set up on pypi.org before.
7
+
8
+ on:
9
+ release:
10
+ types: [published]
11
+ workflow_dispatch:
12
+ inputs:
13
+ version:
14
+ description: Release to upload, without the leading v
15
+ required: true
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+ upload:
22
+ name: Upload to PyPI
23
+ if: vars.PYPI_PUBLISH == 'true'
24
+ runs-on: ubuntu-24.04
25
+ environment:
26
+ name: pypi
27
+ url: https://pypi.org/project/actuator-lint/
28
+ permissions:
29
+ contents: read
30
+ # the package index trusts this workflow by its identity; there is no stored password or token
31
+ id-token: write
32
+ env:
33
+ VERSION: ${{ inputs.version || github.event.release.tag_name }}
34
+ GH_TOKEN: ${{ github.token }}
35
+ steps:
36
+ - name: Download the Python package of the release
37
+ run: |
38
+ VERSION="${VERSION#v}"
39
+ mkdir dist
40
+ gh release download "v${VERSION}" -R "${GITHUB_REPOSITORY}" -D . \
41
+ -p "actuator_lint-${VERSION}-py3-none-any.whl" -p "actuator_lint-${VERSION}.tar.gz" -p SHA256SUMS
42
+ sha256sum --ignore-missing -c SHA256SUMS
43
+ # the files were built by the release workflow of this repository
44
+ gh attestation verify "actuator_lint-${VERSION}-py3-none-any.whl" -R "${GITHUB_REPOSITORY}"
45
+ gh attestation verify "actuator_lint-${VERSION}.tar.gz" -R "${GITHUB_REPOSITORY}"
46
+ mv "actuator_lint-${VERSION}-py3-none-any.whl" "actuator_lint-${VERSION}.tar.gz" dist/
47
+ ls -l dist
48
+ - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
@@ -0,0 +1,85 @@
1
+ name: release
2
+
3
+ # A tag vX.Y.Z runs every test, then creates a draft GitHub Release with the
4
+ # Python package, the engine archives, checksums and build provenance.
5
+ # The draft is published by hand after it has been looked at.
6
+
7
+ on:
8
+ push:
9
+ tags:
10
+ - "v[0-9]+.[0-9]+.[0-9]+"
11
+ # a manual run is a rehearsal: it builds everything and uploads the files as
12
+ # a workflow artifact, but makes no release
13
+ workflow_dispatch:
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ tests:
20
+ uses: ./.github/workflows/tests.yml
21
+
22
+ release:
23
+ name: Draft release
24
+ needs: tests
25
+ runs-on: ubuntu-24.04
26
+ permissions:
27
+ contents: write
28
+ id-token: write
29
+ attestations: write
30
+ steps:
31
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
32
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
33
+ with:
34
+ python-version: "3.13"
35
+ - name: Check that the tag matches the package version
36
+ if: github.event_name == 'push'
37
+ run: |
38
+ version="$(python -c 'import actuator_lint; print(actuator_lint.__version__)')"
39
+ if [ "v${version}" != "${GITHUB_REF_NAME}" ]; then
40
+ echo "tag ${GITHUB_REF_NAME} does not match package version ${version}" >&2
41
+ exit 1
42
+ fi
43
+ if ! grep -q "^## ${version} " CHANGELOG.md; then
44
+ echo "CHANGELOG.md has no section for ${version}" >&2
45
+ exit 1
46
+ fi
47
+ - name: Build the Python package
48
+ run: |
49
+ python -m pip install build==1.6.1 twine==7.0.0
50
+ python -m build --outdir dist
51
+ # what the Python Package Index checks at an upload: metadata and the rendering of its page
52
+ python -m twine check --strict dist/*
53
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
54
+ with:
55
+ pattern: actuator_lint_engine-*
56
+ path: dist
57
+ merge-multiple: true
58
+ - name: Checksums and release notes
59
+ run: |
60
+ cd dist
61
+ ls -l
62
+ # one file with every checksum; the per-archive files are not needed
63
+ rm -f ./*.sha256
64
+ sha256sum ./* | sed 's| \./| |' > SHA256SUMS
65
+ cat SHA256SUMS
66
+ cd ..
67
+ python tools/release_notes.py "$(python -c 'import actuator_lint; print(actuator_lint.__version__)')" > notes.md
68
+ cat notes.md
69
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
70
+ if: github.event_name != 'push'
71
+ with:
72
+ name: release-rehearsal
73
+ path: |
74
+ dist/
75
+ notes.md
76
+ if-no-files-found: error
77
+ - uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
78
+ if: github.event_name == 'push'
79
+ with:
80
+ subject-path: dist/*
81
+ - name: Create the draft release
82
+ if: github.event_name == 'push'
83
+ env:
84
+ GH_TOKEN: ${{ github.token }}
85
+ run: gh release create "${GITHUB_REF_NAME}" dist/* --draft --verify-tag --title "${GITHUB_REF_NAME}" --notes-file notes.md
@@ -0,0 +1,110 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches: ["**"]
6
+ pull_request:
7
+ # the release workflow runs these jobs before it makes a release
8
+ workflow_call:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ env:
18
+ # the PX4 release the engine is built against, see docs/versioning.md
19
+ PX4_REF: v1.17.0
20
+
21
+ jobs:
22
+ python:
23
+ name: Python ${{ matrix.python }}
24
+ runs-on: ubuntu-24.04
25
+ strategy:
26
+ fail-fast: false
27
+ matrix:
28
+ python: ["3.11", "3.12", "3.13", "3.14"]
29
+ steps:
30
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
31
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
32
+ with:
33
+ python-version: ${{ matrix.python }}
34
+ # tests that need the engine are skipped in this job
35
+ - run: python -m unittest discover -s tests -t .
36
+ - name: Install and run the command
37
+ run: |
38
+ python -m pip install .
39
+ actuator-lint --version
40
+
41
+ engine-linux:
42
+ name: Engine, Linux ${{ matrix.arch }}
43
+ runs-on: ${{ matrix.runner }}
44
+ container: px4io/px4-dev:v1.17.0
45
+ strategy:
46
+ fail-fast: false
47
+ matrix:
48
+ include:
49
+ - arch: x86_64
50
+ runner: ubuntu-24.04
51
+ - arch: arm64
52
+ runner: ubuntu-24.04-arm
53
+ steps:
54
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
55
+ - name: Get PX4
56
+ run: |
57
+ git config --global --add safe.directory '*'
58
+ git clone --depth 1 --branch "$PX4_REF" https://github.com/PX4/PX4-Autopilot.git "$RUNNER_TEMP/px4"
59
+ - name: Build the engine
60
+ run: engine/build.sh "$RUNNER_TEMP/px4"
61
+ - name: Tests with the engine and golden tests
62
+ env:
63
+ ACTUATOR_LINT_ENGINE: build/engine/actuator_lint_engine
64
+ run: ACTUATOR_LINT_PX4_DIR="$RUNNER_TEMP/px4" python3 -m unittest discover -s tests -t .
65
+ # the cross-check does not depend on the processor architecture
66
+ - name: Build PX4 SITL
67
+ if: matrix.arch == 'x86_64'
68
+ run: engine/build_sitl.sh "$RUNNER_TEMP/px4"
69
+ - name: SITL cross-check
70
+ if: matrix.arch == 'x86_64'
71
+ env:
72
+ ACTUATOR_LINT_ENGINE: build/engine/actuator_lint_engine
73
+ ACTUATOR_LINT_SITL_BUILD: build/sitl
74
+ run: python3 -m unittest -v tests.test_sitl
75
+ - name: Package the engine
76
+ run: engine/package.sh build/engine/actuator_lint_engine "$RUNNER_TEMP/px4" "linux-${{ matrix.arch }}" dist
77
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
78
+ with:
79
+ name: actuator_lint_engine-linux-${{ matrix.arch }}
80
+ path: dist/
81
+ if-no-files-found: error
82
+
83
+ engine-macos:
84
+ name: Engine, macOS arm64
85
+ runs-on: macos-26
86
+ steps:
87
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
88
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
89
+ with:
90
+ python-version: "3.13"
91
+ - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
92
+ - name: Get PX4 and its build requirements
93
+ run: |
94
+ git clone --depth 1 --branch "$PX4_REF" https://github.com/PX4/PX4-Autopilot.git "$RUNNER_TEMP/px4"
95
+ uv venv --python "$(command -v python)" "$RUNNER_TEMP/venv"
96
+ uv pip install --python "$RUNNER_TEMP/venv/bin/python" -r "$RUNNER_TEMP/px4/Tools/setup/requirements.txt"
97
+ command -v ninja || brew install ninja
98
+ - name: Build the engine
99
+ run: ACTUATOR_LINT_PYTHON="$RUNNER_TEMP/venv/bin/python" engine/build.sh "$RUNNER_TEMP/px4"
100
+ - name: Tests with the engine and golden tests
101
+ env:
102
+ ACTUATOR_LINT_ENGINE: build/engine/actuator_lint_engine
103
+ run: ACTUATOR_LINT_PX4_DIR="$RUNNER_TEMP/px4" python -m unittest discover -s tests -t .
104
+ - name: Package the engine
105
+ run: engine/package.sh build/engine/actuator_lint_engine "$RUNNER_TEMP/px4" macos-arm64 dist
106
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
107
+ with:
108
+ name: actuator_lint_engine-macos-arm64
109
+ path: dist/
110
+ if-no-files-found: error
@@ -0,0 +1,4 @@
1
+ build/
2
+ __pycache__/
3
+ *.pyc
4
+ .venv/