robot-dam 0.6.0__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 (421) hide show
  1. robot_dam-0.6.0/.claude/launch.json +13 -0
  2. robot_dam-0.6.0/.dockerignore +37 -0
  3. robot_dam-0.6.0/.github/ISSUE_TEMPLATE/bug_report.yml +45 -0
  4. robot_dam-0.6.0/.github/ISSUE_TEMPLATE/feature_request.yml +35 -0
  5. robot_dam-0.6.0/.github/PULL_REQUEST_TEMPLATE.md +15 -0
  6. robot_dam-0.6.0/.github/workflows/ci.yml +55 -0
  7. robot_dam-0.6.0/.github/workflows/docs.yml +31 -0
  8. robot_dam-0.6.0/.github/workflows/release.yml +132 -0
  9. robot_dam-0.6.0/.gitignore +66 -0
  10. robot_dam-0.6.0/.pre-commit-config.yaml +47 -0
  11. robot_dam-0.6.0/CLAUDE.md +359 -0
  12. robot_dam-0.6.0/CONTRIBUTING.md +216 -0
  13. robot_dam-0.6.0/LICENSE +368 -0
  14. robot_dam-0.6.0/Makefile +139 -0
  15. robot_dam-0.6.0/PKG-INFO +261 -0
  16. robot_dam-0.6.0/README.md +196 -0
  17. robot_dam-0.6.0/SECURITY.md +15 -0
  18. robot_dam-0.6.0/assets/presets.yaml +52 -0
  19. robot_dam-0.6.0/assets/so101_new_calib.urdf +453 -0
  20. robot_dam-0.6.0/claude-progress.md +608 -0
  21. robot_dam-0.6.0/clean-state-checklist.md +14 -0
  22. robot_dam-0.6.0/dam/__init__.py +69 -0
  23. robot_dam-0.6.0/dam/adapter/__init__.py +11 -0
  24. robot_dam-0.6.0/dam/adapter/base.py +182 -0
  25. robot_dam-0.6.0/dam/adapter/dataset/__init__.py +3 -0
  26. robot_dam-0.6.0/dam/adapter/dataset/source.py +279 -0
  27. robot_dam-0.6.0/dam/adapter/isaac/__init__.py +21 -0
  28. robot_dam-0.6.0/dam/adapter/isaac/filter.py +143 -0
  29. robot_dam-0.6.0/dam/adapter/lerobot/__init__.py +4 -0
  30. robot_dam-0.6.0/dam/adapter/lerobot/adapter.py +611 -0
  31. robot_dam-0.6.0/dam/adapter/lerobot/builder.py +411 -0
  32. robot_dam-0.6.0/dam/adapter/lerobot/policy.py +254 -0
  33. robot_dam-0.6.0/dam/adapter/opencv/source.py +253 -0
  34. robot_dam-0.6.0/dam/adapter/ros2/__init__.py +0 -0
  35. robot_dam-0.6.0/dam/adapter/ros2/_noop_policy.py +41 -0
  36. robot_dam-0.6.0/dam/adapter/ros2/sink.py +204 -0
  37. robot_dam-0.6.0/dam/adapter/ros2/source.py +287 -0
  38. robot_dam-0.6.0/dam/adapter/transforms.py +50 -0
  39. robot_dam-0.6.0/dam/api.py +482 -0
  40. robot_dam-0.6.0/dam/boundary/__init__.py +16 -0
  41. robot_dam-0.6.0/dam/boundary/builtin.py +45 -0
  42. robot_dam-0.6.0/dam/boundary/builtin_callbacks.py +55 -0
  43. robot_dam-0.6.0/dam/boundary/callbacks/__init__.py +70 -0
  44. robot_dam-0.6.0/dam/boundary/callbacks/_helpers.py +123 -0
  45. robot_dam-0.6.0/dam/boundary/callbacks/_registry.py +182 -0
  46. robot_dam-0.6.0/dam/boundary/callbacks/execution.py +309 -0
  47. robot_dam-0.6.0/dam/boundary/callbacks/hardware.py +466 -0
  48. robot_dam-0.6.0/dam/boundary/callbacks/kinematics.py +1002 -0
  49. robot_dam-0.6.0/dam/boundary/callbacks/ood.py +231 -0
  50. robot_dam-0.6.0/dam/boundary/constraint.py +23 -0
  51. robot_dam-0.6.0/dam/boundary/container.py +92 -0
  52. robot_dam-0.6.0/dam/boundary/graph.py +86 -0
  53. robot_dam-0.6.0/dam/boundary/list_container.py +66 -0
  54. robot_dam-0.6.0/dam/boundary/node.py +14 -0
  55. robot_dam-0.6.0/dam/boundary/single.py +52 -0
  56. robot_dam-0.6.0/dam/boundary/templates.py +75 -0
  57. robot_dam-0.6.0/dam/bus/__init__.py +148 -0
  58. robot_dam-0.6.0/dam/camera/__init__.py +3 -0
  59. robot_dam-0.6.0/dam/camera/frame_hub.py +171 -0
  60. robot_dam-0.6.0/dam/cli.py +704 -0
  61. robot_dam-0.6.0/dam/config/__init__.py +4 -0
  62. robot_dam-0.6.0/dam/config/hot_reload.py +164 -0
  63. robot_dam-0.6.0/dam/config/loader.py +27 -0
  64. robot_dam-0.6.0/dam/config/schema.py +304 -0
  65. robot_dam-0.6.0/dam/decorators.py +93 -0
  66. robot_dam-0.6.0/dam/experiments/__init__.py +15 -0
  67. robot_dam-0.6.0/dam/experiments/registry.py +576 -0
  68. robot_dam-0.6.0/dam/guard/__init__.py +5 -0
  69. robot_dam-0.6.0/dam/guard/aggregator.py +50 -0
  70. robot_dam-0.6.0/dam/guard/aggregators/__init__.py +16 -0
  71. robot_dam-0.6.0/dam/guard/aggregators/motion_qp.py +253 -0
  72. robot_dam-0.6.0/dam/guard/base.py +132 -0
  73. robot_dam-0.6.0/dam/guard/builtin/__init__.py +16 -0
  74. robot_dam-0.6.0/dam/guard/builtin/execution.py +152 -0
  75. robot_dam-0.6.0/dam/guard/builtin/hardware.py +188 -0
  76. robot_dam-0.6.0/dam/guard/builtin/motion.py +72 -0
  77. robot_dam-0.6.0/dam/guard/builtin/ood.py +1151 -0
  78. robot_dam-0.6.0/dam/guard/layer.py +33 -0
  79. robot_dam-0.6.0/dam/guard/lerobot_video_loader.py +173 -0
  80. robot_dam-0.6.0/dam/guard/ood_backend.py +423 -0
  81. robot_dam-0.6.0/dam/guard/ood_context.py +358 -0
  82. robot_dam-0.6.0/dam/guard/pipeline.py +424 -0
  83. robot_dam-0.6.0/dam/guard/stage.py +57 -0
  84. robot_dam-0.6.0/dam/guard/vision_feature_extractor.py +159 -0
  85. robot_dam-0.6.0/dam/injection/__init__.py +11 -0
  86. robot_dam-0.6.0/dam/injection/pool.py +28 -0
  87. robot_dam-0.6.0/dam/injection/resolver.py +23 -0
  88. robot_dam-0.6.0/dam/injection/static.py +30 -0
  89. robot_dam-0.6.0/dam/kinematics/resolver.py +181 -0
  90. robot_dam-0.6.0/dam/logging/__init__.py +5 -0
  91. robot_dam-0.6.0/dam/logging/console.py +45 -0
  92. robot_dam-0.6.0/dam/logging/cycle_record.py +112 -0
  93. robot_dam-0.6.0/dam/logging/loopback_writer.py +971 -0
  94. robot_dam-0.6.0/dam/preset/__init__.py +27 -0
  95. robot_dam-0.6.0/dam/preset/registry.py +232 -0
  96. robot_dam-0.6.0/dam/processor.py +300 -0
  97. robot_dam-0.6.0/dam/py.typed +0 -0
  98. robot_dam-0.6.0/dam/registry/__init__.py +3 -0
  99. robot_dam-0.6.0/dam/registry/callback.py +49 -0
  100. robot_dam-0.6.0/dam/registry/guard.py +57 -0
  101. robot_dam-0.6.0/dam/runner/__init__.py +3 -0
  102. robot_dam-0.6.0/dam/runner/base.py +469 -0
  103. robot_dam-0.6.0/dam/runner/lerobot.py +139 -0
  104. robot_dam-0.6.0/dam/runner/ros2.py +158 -0
  105. robot_dam-0.6.0/dam/runtime/__init__.py +3 -0
  106. robot_dam-0.6.0/dam/runtime/_context_state_machine.py +221 -0
  107. robot_dam-0.6.0/dam/runtime/_cycle_telemetry.py +284 -0
  108. robot_dam-0.6.0/dam/runtime/_hot_reload.py +160 -0
  109. robot_dam-0.6.0/dam/runtime/_stackfile_builder.py +304 -0
  110. robot_dam-0.6.0/dam/runtime/builtin_contexts.py +415 -0
  111. robot_dam-0.6.0/dam/runtime/context.py +216 -0
  112. robot_dam-0.6.0/dam/runtime/execution_engine.py +759 -0
  113. robot_dam-0.6.0/dam/runtime/factory.py +667 -0
  114. robot_dam-0.6.0/dam/runtime/failure_classify.py +67 -0
  115. robot_dam-0.6.0/dam/runtime/guard_runtime.py +1290 -0
  116. robot_dam-0.6.0/dam/runtime/merge_policy.py +122 -0
  117. robot_dam-0.6.0/dam/runtime/qp_solver.py +355 -0
  118. robot_dam-0.6.0/dam/runtime/slow_lane.py +177 -0
  119. robot_dam-0.6.0/dam/services/__init__.py +32 -0
  120. robot_dam-0.6.0/dam/services/api.py +156 -0
  121. robot_dam-0.6.0/dam/services/boundary_config.py +137 -0
  122. robot_dam-0.6.0/dam/services/mcap_sessions.py +1017 -0
  123. robot_dam-0.6.0/dam/services/ood_trainer.py +172 -0
  124. robot_dam-0.6.0/dam/services/replay.py +479 -0
  125. robot_dam-0.6.0/dam/services/risk_log.py +314 -0
  126. robot_dam-0.6.0/dam/services/routers/__init__.py +25 -0
  127. robot_dam-0.6.0/dam/services/routers/boundaries.py +100 -0
  128. robot_dam-0.6.0/dam/services/routers/control.py +166 -0
  129. robot_dam-0.6.0/dam/services/routers/experiments.py +74 -0
  130. robot_dam-0.6.0/dam/services/routers/mcap.py +225 -0
  131. robot_dam-0.6.0/dam/services/routers/ood.py +333 -0
  132. robot_dam-0.6.0/dam/services/routers/replay.py +125 -0
  133. robot_dam-0.6.0/dam/services/routers/risk_log.py +242 -0
  134. robot_dam-0.6.0/dam/services/routers/stackfiles.py +107 -0
  135. robot_dam-0.6.0/dam/services/routers/system.py +200 -0
  136. robot_dam-0.6.0/dam/services/routers/telemetry.py +146 -0
  137. robot_dam-0.6.0/dam/services/runtime_control.py +591 -0
  138. robot_dam-0.6.0/dam/services/serialization.py +113 -0
  139. robot_dam-0.6.0/dam/services/service_container.py +27 -0
  140. robot_dam-0.6.0/dam/services/telemetry.py +284 -0
  141. robot_dam-0.6.0/dam/services/ui/live_test.html +134 -0
  142. robot_dam-0.6.0/dam/testing/__init__.py +17 -0
  143. robot_dam-0.6.0/dam/testing/dataset_source.py +5 -0
  144. robot_dam-0.6.0/dam/testing/helpers.py +40 -0
  145. robot_dam-0.6.0/dam/testing/mocks.py +47 -0
  146. robot_dam-0.6.0/dam/testing/pipeline.py +31 -0
  147. robot_dam-0.6.0/dam/testing/safety.py +37 -0
  148. robot_dam-0.6.0/dam/testing/sim_adapters.py +83 -0
  149. robot_dam-0.6.0/dam/testing/test_loopback_writer.py +409 -0
  150. robot_dam-0.6.0/dam/types/__init__.py +18 -0
  151. robot_dam-0.6.0/dam/types/action.py +148 -0
  152. robot_dam-0.6.0/dam/types/dynamics.py +219 -0
  153. robot_dam-0.6.0/dam/types/enforcement.py +17 -0
  154. robot_dam-0.6.0/dam/types/joint_layout.py +304 -0
  155. robot_dam-0.6.0/dam/types/observation.py +130 -0
  156. robot_dam-0.6.0/dam/types/result.py +81 -0
  157. robot_dam-0.6.0/dam/types/risk.py +36 -0
  158. robot_dam-0.6.0/dam-console/.env.local.example +2 -0
  159. robot_dam-0.6.0/dam-console/Dockerfile +37 -0
  160. robot_dam-0.6.0/dam-console/Dockerfile.dev +6 -0
  161. robot_dam-0.6.0/dam-console/jest.config.js +10 -0
  162. robot_dam-0.6.0/dam-console/jest.setup.ts +17 -0
  163. robot_dam-0.6.0/dam-console/next-env.d.ts +6 -0
  164. robot_dam-0.6.0/dam-console/next.config.mjs +12 -0
  165. robot_dam-0.6.0/dam-console/package-lock.json +7491 -0
  166. robot_dam-0.6.0/dam-console/package.json +37 -0
  167. robot_dam-0.6.0/dam-console/postcss.config.js +6 -0
  168. robot_dam-0.6.0/dam-console/src/__tests__/components/ControlPanel.test.tsx +67 -0
  169. robot_dam-0.6.0/dam-console/src/__tests__/components/CycleSafetyInspector.test.tsx +26 -0
  170. robot_dam-0.6.0/dam-console/src/__tests__/components/EventLog.test.tsx +52 -0
  171. robot_dam-0.6.0/dam-console/src/__tests__/components/GuardTable.test.tsx +45 -0
  172. robot_dam-0.6.0/dam-console/src/__tests__/components/RiskBadge.test.tsx +34 -0
  173. robot_dam-0.6.0/dam-console/src/__tests__/components/RiskGauge.test.tsx +26 -0
  174. robot_dam-0.6.0/dam-console/src/__tests__/components/TemplateGallery.test.tsx +40 -0
  175. robot_dam-0.6.0/dam-console/src/__tests__/hooks/useTelemetry.test.ts +178 -0
  176. robot_dam-0.6.0/dam-console/src/__tests__/lib/api.test.ts +114 -0
  177. robot_dam-0.6.0/dam-console/src/__tests__/lib/templates.test.ts +606 -0
  178. robot_dam-0.6.0/dam-console/src/app/api/system/compose-up/route.ts +61 -0
  179. robot_dam-0.6.0/dam-console/src/app/api/system/launch/route.ts +56 -0
  180. robot_dam-0.6.0/dam-console/src/app/api/system/restart/route.ts +122 -0
  181. robot_dam-0.6.0/dam-console/src/app/api/system/save-config/route.ts +25 -0
  182. robot_dam-0.6.0/dam-console/src/app/api/system/upload-asset/route.ts +62 -0
  183. robot_dam-0.6.0/dam-console/src/app/boundaries/page.tsx +14 -0
  184. robot_dam-0.6.0/dam-console/src/app/config/page.tsx +968 -0
  185. robot_dam-0.6.0/dam-console/src/app/experiments/page.tsx +807 -0
  186. robot_dam-0.6.0/dam-console/src/app/globals.css +112 -0
  187. robot_dam-0.6.0/dam-console/src/app/guard/page.tsx +1779 -0
  188. robot_dam-0.6.0/dam-console/src/app/layout.tsx +24 -0
  189. robot_dam-0.6.0/dam-console/src/app/mcap-viewer/page.tsx +935 -0
  190. robot_dam-0.6.0/dam-console/src/app/page.tsx +418 -0
  191. robot_dam-0.6.0/dam-console/src/app/replay/page.tsx +650 -0
  192. robot_dam-0.6.0/dam-console/src/app/risk-log/page.tsx +17 -0
  193. robot_dam-0.6.0/dam-console/src/components/ActionShell.tsx +158 -0
  194. robot_dam-0.6.0/dam-console/src/components/AdapterPicker.tsx +96 -0
  195. robot_dam-0.6.0/dam-console/src/components/BoundaryList.tsx +345 -0
  196. robot_dam-0.6.0/dam-console/src/components/ConnectionBadge.tsx +26 -0
  197. robot_dam-0.6.0/dam-console/src/components/ControlBar.tsx +120 -0
  198. robot_dam-0.6.0/dam-console/src/components/ControlPanel.tsx +150 -0
  199. robot_dam-0.6.0/dam-console/src/components/CycleSafetyInspector.tsx +787 -0
  200. robot_dam-0.6.0/dam-console/src/components/EventLog.tsx +85 -0
  201. robot_dam-0.6.0/dam-console/src/components/GuardTable.tsx +252 -0
  202. robot_dam-0.6.0/dam-console/src/components/HardwarePanel.tsx +230 -0
  203. robot_dam-0.6.0/dam-console/src/components/JointLimitsTable.tsx +77 -0
  204. robot_dam-0.6.0/dam-console/src/components/LatencyChart.tsx +245 -0
  205. robot_dam-0.6.0/dam-console/src/components/McapCameraPlayer.tsx +581 -0
  206. robot_dam-0.6.0/dam-console/src/components/McapCycleInspector.tsx +388 -0
  207. robot_dam-0.6.0/dam-console/src/components/McapImageGallery.tsx +163 -0
  208. robot_dam-0.6.0/dam-console/src/components/McapSessionList.tsx +340 -0
  209. robot_dam-0.6.0/dam-console/src/components/McapTimelineView.tsx +200 -0
  210. robot_dam-0.6.0/dam-console/src/components/OODTrainer.tsx +355 -0
  211. robot_dam-0.6.0/dam-console/src/components/PageShell.tsx +81 -0
  212. robot_dam-0.6.0/dam-console/src/components/PresetManager.tsx +280 -0
  213. robot_dam-0.6.0/dam-console/src/components/RiskBadge.tsx +19 -0
  214. robot_dam-0.6.0/dam-console/src/components/RiskGauge.tsx +73 -0
  215. robot_dam-0.6.0/dam-console/src/components/RiskLogTable.tsx +1278 -0
  216. robot_dam-0.6.0/dam-console/src/components/Sidebar.tsx +162 -0
  217. robot_dam-0.6.0/dam-console/src/components/StackfileLibraryBar.tsx +95 -0
  218. robot_dam-0.6.0/dam-console/src/components/StatsCard.tsx +30 -0
  219. robot_dam-0.6.0/dam-console/src/components/TemplateGallery.tsx +47 -0
  220. robot_dam-0.6.0/dam-console/src/components/UsbDeviceManager.tsx +210 -0
  221. robot_dam-0.6.0/dam-console/src/hooks/useDemoMode.ts +95 -0
  222. robot_dam-0.6.0/dam-console/src/hooks/useDisplayUnit.tsx +79 -0
  223. robot_dam-0.6.0/dam-console/src/hooks/useLiveMode.ts +46 -0
  224. robot_dam-0.6.0/dam-console/src/hooks/useRuntimeControl.ts +169 -0
  225. robot_dam-0.6.0/dam-console/src/hooks/useStackfileLibrary.ts +187 -0
  226. robot_dam-0.6.0/dam-console/src/hooks/useTelemetry.ts +495 -0
  227. robot_dam-0.6.0/dam-console/src/lib/api.ts +417 -0
  228. robot_dam-0.6.0/dam-console/src/lib/templates.ts +862 -0
  229. robot_dam-0.6.0/dam-console/src/lib/types.ts +348 -0
  230. robot_dam-0.6.0/dam-console/tailwind.config.ts +45 -0
  231. robot_dam-0.6.0/dam-console/tsconfig.json +43 -0
  232. robot_dam-0.6.0/dam-rust/Cargo.lock +887 -0
  233. robot_dam-0.6.0/dam-rust/Cargo.toml +22 -0
  234. robot_dam-0.6.0/dam-rust/crates/action-bus/Cargo.toml +7 -0
  235. robot_dam-0.6.0/dam-rust/crates/action-bus/src/lib.rs +102 -0
  236. robot_dam-0.6.0/dam-rust/crates/decision-aggregator/Cargo.toml +9 -0
  237. robot_dam-0.6.0/dam-rust/crates/decision-aggregator/src/lib.rs +221 -0
  238. robot_dam-0.6.0/dam-rust/crates/image-writer/Cargo.toml +8 -0
  239. robot_dam-0.6.0/dam-rust/crates/image-writer/src/lib.rs +155 -0
  240. robot_dam-0.6.0/dam-rust/crates/loopback/Cargo.toml +9 -0
  241. robot_dam-0.6.0/dam-rust/crates/loopback/src/lib.rs +213 -0
  242. robot_dam-0.6.0/dam-rust/crates/mcap-writer/Cargo.toml +14 -0
  243. robot_dam-0.6.0/dam-rust/crates/mcap-writer/src/lib.rs +572 -0
  244. robot_dam-0.6.0/dam-rust/crates/metric-bus/Cargo.toml +7 -0
  245. robot_dam-0.6.0/dam-rust/crates/metric-bus/src/lib.rs +385 -0
  246. robot_dam-0.6.0/dam-rust/crates/observation-bus/Cargo.toml +7 -0
  247. robot_dam-0.6.0/dam-rust/crates/observation-bus/src/lib.rs +126 -0
  248. robot_dam-0.6.0/dam-rust/crates/risk-controller/Cargo.toml +7 -0
  249. robot_dam-0.6.0/dam-rust/crates/risk-controller/src/lib.rs +205 -0
  250. robot_dam-0.6.0/dam-rust/crates/serializer-bus/Cargo.toml +9 -0
  251. robot_dam-0.6.0/dam-rust/crates/serializer-bus/src/lib.rs +438 -0
  252. robot_dam-0.6.0/dam-rust/crates/watchdog/Cargo.toml +7 -0
  253. robot_dam-0.6.0/dam-rust/crates/watchdog/src/lib.rs +157 -0
  254. robot_dam-0.6.0/dam-rust/dam-py/Cargo.toml +23 -0
  255. robot_dam-0.6.0/dam-rust/dam-py/build.rs +7 -0
  256. robot_dam-0.6.0/dam-rust/dam-py/pyproject.toml +11 -0
  257. robot_dam-0.6.0/dam-rust/dam-py/src/lib.rs +787 -0
  258. robot_dam-0.6.0/docker/Dockerfile +126 -0
  259. robot_dam-0.6.0/docker/compose.test.yml +64 -0
  260. robot_dam-0.6.0/docker-compose.yml +179 -0
  261. robot_dam-0.6.0/docs/DAM_Development_Plan.md +968 -0
  262. robot_dam-0.6.0/docs/DAM_LLM_System_Prompt.md +266 -0
  263. robot_dam-0.6.0/docs/DAM_Specification.md +1678 -0
  264. robot_dam-0.6.0/docs/DAM_Specification_zh.md +1304 -0
  265. robot_dam-0.6.0/docs/adversarial-testing.md +49 -0
  266. robot_dam-0.6.0/docs/assets/extra.css +27 -0
  267. robot_dam-0.6.0/docs/assets/logo.svg +3 -0
  268. robot_dam-0.6.0/docs/boundary-callbacks.md +335 -0
  269. robot_dam-0.6.0/docs/cli.md +150 -0
  270. robot_dam-0.6.0/docs/concepts/architecture.md +299 -0
  271. robot_dam-0.6.0/docs/concepts/boundaries.md +283 -0
  272. robot_dam-0.6.0/docs/concepts/guards-explained.md +429 -0
  273. robot_dam-0.6.0/docs/concepts/safety.md +167 -0
  274. robot_dam-0.6.0/docs/concepts/use-cases.md +156 -0
  275. robot_dam-0.6.0/docs/console.md +206 -0
  276. robot_dam-0.6.0/docs/contributing.md +250 -0
  277. robot_dam-0.6.0/docs/diagrams/diagram1_system_architecture.png +0 -0
  278. robot_dam-0.6.0/docs/diagrams/diagram2_runtime_workflow.png +0 -0
  279. robot_dam-0.6.0/docs/documentation-workplan.md +48 -0
  280. robot_dam-0.6.0/docs/experiments.md +235 -0
  281. robot_dam-0.6.0/docs/failure-tuple-schema.md +76 -0
  282. robot_dam-0.6.0/docs/getting-started/commands.md +44 -0
  283. robot_dam-0.6.0/docs/getting-started/common-stackfile-edits.md +104 -0
  284. robot_dam-0.6.0/docs/getting-started/console-walkthrough.md +69 -0
  285. robot_dam-0.6.0/docs/getting-started/hardware-readiness.md +60 -0
  286. robot_dam-0.6.0/docs/getting-started/quickstart.md +149 -0
  287. robot_dam-0.6.0/docs/getting-started/safe-recording.md +149 -0
  288. robot_dam-0.6.0/docs/getting-started/stackfile-walkthrough.md +119 -0
  289. robot_dam-0.6.0/docs/getting-started/troubleshooting.md +67 -0
  290. robot_dam-0.6.0/docs/guards-reference.md +172 -0
  291. robot_dam-0.6.0/docs/index.md +64 -0
  292. robot_dam-0.6.0/docs/installation.md +108 -0
  293. robot_dam-0.6.0/docs/learn/glossary.md +305 -0
  294. robot_dam-0.6.0/docs/learn/index.md +31 -0
  295. robot_dam-0.6.0/docs/learn/tutorial.md +191 -0
  296. robot_dam-0.6.0/docs/library-api.md +181 -0
  297. robot_dam-0.6.0/docs/linkedin-0.5.0.md +25 -0
  298. robot_dam-0.6.0/docs/loopback-logging.md +424 -0
  299. robot_dam-0.6.0/docs/project-defense-qa-zh.md +562 -0
  300. robot_dam-0.6.0/docs/quick-stack.md +570 -0
  301. robot_dam-0.6.0/docs/refactor-guard-pipeline.md +326 -0
  302. robot_dam-0.6.0/docs/release-notes-0.4.0.md +46 -0
  303. robot_dam-0.6.0/docs/release-notes-0.5.0.md +139 -0
  304. robot_dam-0.6.0/docs/release-notes-0.6.0.md +101 -0
  305. robot_dam-0.6.0/docs/services-api.md +305 -0
  306. robot_dam-0.6.0/examples/custom_callback.py +63 -0
  307. robot_dam-0.6.0/examples/hello_guard.py +56 -0
  308. robot_dam-0.6.0/examples/isaac_franka_demo.py +149 -0
  309. robot_dam-0.6.0/examples/safe_record.py +176 -0
  310. robot_dam-0.6.0/examples/stackfiles/dataset_replay_check.yaml +205 -0
  311. robot_dam-0.6.0/examples/stackfiles/demo.yaml +194 -0
  312. robot_dam-0.6.0/examples/stackfiles/franka_safety.yaml +115 -0
  313. robot_dam-0.6.0/examples/stackfiles/minimal.yaml +32 -0
  314. robot_dam-0.6.0/examples/stackfiles/ros2.yaml +176 -0
  315. robot_dam-0.6.0/examples/stackfiles/safety.yaml +144 -0
  316. robot_dam-0.6.0/examples/stackfiles/so101.yaml +239 -0
  317. robot_dam-0.6.0/init.sh +40 -0
  318. robot_dam-0.6.0/mkdocs.yml +135 -0
  319. robot_dam-0.6.0/pyproject.toml +200 -0
  320. robot_dam-0.6.0/scripts/_bench_stackfiles.py +209 -0
  321. robot_dam-0.6.0/scripts/_experiment_logging.py +16 -0
  322. robot_dam-0.6.0/scripts/bench_live_preview.py +406 -0
  323. robot_dam-0.6.0/scripts/bench_ws_e2e.py +229 -0
  324. robot_dam-0.6.0/scripts/check_docs.py +131 -0
  325. robot_dam-0.6.0/scripts/dam-compose.sh +153 -0
  326. robot_dam-0.6.0/scripts/dam_host.py +266 -0
  327. robot_dam-0.6.0/scripts/joint_diagnostics.py +342 -0
  328. robot_dam-0.6.0/scripts/log_writer.py +68 -0
  329. robot_dam-0.6.0/scripts/mcap_to_lerobot.py +399 -0
  330. robot_dam-0.6.0/scripts/mcap_triage.py +479 -0
  331. robot_dam-0.6.0/scripts/record.py +354 -0
  332. robot_dam-0.6.0/scripts/run.sh +133 -0
  333. robot_dam-0.6.0/scripts/run_boundary_scan.py +428 -0
  334. robot_dam-0.6.0/scripts/run_l0_calibration.py +1510 -0
  335. robot_dam-0.6.0/scripts/run_l0_vision_pilot.py +223 -0
  336. robot_dam-0.6.0/scripts/run_latency_bench.py +381 -0
  337. robot_dam-0.6.0/scripts/run_prod.sh +139 -0
  338. robot_dam-0.6.0/scripts/run_record_quality.py +313 -0
  339. robot_dam-0.6.0/scripts/run_usability_study.py +199 -0
  340. robot_dam-0.6.0/scripts/setup.sh +269 -0
  341. robot_dam-0.6.0/scripts/sync_version.py +97 -0
  342. robot_dam-0.6.0/scripts/test.sh +136 -0
  343. robot_dam-0.6.0/session-handoff.md +78 -0
  344. robot_dam-0.6.0/tests/__init__.py +0 -0
  345. robot_dam-0.6.0/tests/bench_loopback_writer.py +374 -0
  346. robot_dam-0.6.0/tests/bench_serializer_bus.py +307 -0
  347. robot_dam-0.6.0/tests/conftest.py +23 -0
  348. robot_dam-0.6.0/tests/integration/__init__.py +0 -0
  349. robot_dam-0.6.0/tests/integration/test_guard_runtime.py +271 -0
  350. robot_dam-0.6.0/tests/integration/test_monitor_mode.py +280 -0
  351. robot_dam-0.6.0/tests/integration/test_phase1_exit.py +82 -0
  352. robot_dam-0.6.0/tests/integration/test_phase2_pipeline.py +96 -0
  353. robot_dam-0.6.0/tests/integration/test_phase3_pipeline.py +185 -0
  354. robot_dam-0.6.0/tests/integration/test_rust_image_hub_mcap.py +358 -0
  355. robot_dam-0.6.0/tests/property/__init__.py +0 -0
  356. robot_dam-0.6.0/tests/property/test_boundary_properties.py +67 -0
  357. robot_dam-0.6.0/tests/safety/__init__.py +0 -0
  358. robot_dam-0.6.0/tests/safety/test_adversarial_regression.py +150 -0
  359. robot_dam-0.6.0/tests/safety/test_collaborative_safety_regression.py +64 -0
  360. robot_dam-0.6.0/tests/safety/test_execution_regression.py +100 -0
  361. robot_dam-0.6.0/tests/safety/test_hardware_regression.py +88 -0
  362. robot_dam-0.6.0/tests/safety/test_kinematic_regression.py +237 -0
  363. robot_dam-0.6.0/tests/safety/test_ood_regression.py +270 -0
  364. robot_dam-0.6.0/tests/unit/__init__.py +0 -0
  365. robot_dam-0.6.0/tests/unit/test_action_bus.py +58 -0
  366. robot_dam-0.6.0/tests/unit/test_api.py +47 -0
  367. robot_dam-0.6.0/tests/unit/test_boundary.py +136 -0
  368. robot_dam-0.6.0/tests/unit/test_boundary_templates.py +21 -0
  369. robot_dam-0.6.0/tests/unit/test_builtin_callbacks.py +1076 -0
  370. robot_dam-0.6.0/tests/unit/test_bus_rust.py +330 -0
  371. robot_dam-0.6.0/tests/unit/test_callback_registry.py +39 -0
  372. robot_dam-0.6.0/tests/unit/test_cli.py +173 -0
  373. robot_dam-0.6.0/tests/unit/test_cli_replay.py +99 -0
  374. robot_dam-0.6.0/tests/unit/test_config.py +135 -0
  375. robot_dam-0.6.0/tests/unit/test_context_state_machine.py +341 -0
  376. robot_dam-0.6.0/tests/unit/test_dataset_hardware_replay.py +250 -0
  377. robot_dam-0.6.0/tests/unit/test_dynamics_context.py +102 -0
  378. robot_dam-0.6.0/tests/unit/test_execution_guard.py +550 -0
  379. robot_dam-0.6.0/tests/unit/test_experiments.py +134 -0
  380. robot_dam-0.6.0/tests/unit/test_factory_policy_fallback.py +75 -0
  381. robot_dam-0.6.0/tests/unit/test_failure_harvesting.py +96 -0
  382. robot_dam-0.6.0/tests/unit/test_guard_auto_timing.py +300 -0
  383. robot_dam-0.6.0/tests/unit/test_guard_decision_contract.py +70 -0
  384. robot_dam-0.6.0/tests/unit/test_guard_pipeline.py +307 -0
  385. robot_dam-0.6.0/tests/unit/test_guards.py +36 -0
  386. robot_dam-0.6.0/tests/unit/test_hardware_guard.py +214 -0
  387. robot_dam-0.6.0/tests/unit/test_hot_reload.py +328 -0
  388. robot_dam-0.6.0/tests/unit/test_injection.py +62 -0
  389. robot_dam-0.6.0/tests/unit/test_joint_layout.py +285 -0
  390. robot_dam-0.6.0/tests/unit/test_kinematics_resolver.py +139 -0
  391. robot_dam-0.6.0/tests/unit/test_l0_calibration_features.py +259 -0
  392. robot_dam-0.6.0/tests/unit/test_lerobot_adapters.py +295 -0
  393. robot_dam-0.6.0/tests/unit/test_lerobot_builder.py +319 -0
  394. robot_dam-0.6.0/tests/unit/test_lerobot_runner.py +295 -0
  395. robot_dam-0.6.0/tests/unit/test_live_preview.py +382 -0
  396. robot_dam-0.6.0/tests/unit/test_mcap_session_parsing.py +69 -0
  397. robot_dam-0.6.0/tests/unit/test_mcap_triage.py +211 -0
  398. robot_dam-0.6.0/tests/unit/test_merge_policy.py +160 -0
  399. robot_dam-0.6.0/tests/unit/test_motion_qp_aggregator.py +109 -0
  400. robot_dam-0.6.0/tests/unit/test_ood_backend.py +152 -0
  401. robot_dam-0.6.0/tests/unit/test_ood_callbacks.py +305 -0
  402. robot_dam-0.6.0/tests/unit/test_ood_guard.py +80 -0
  403. robot_dam-0.6.0/tests/unit/test_ood_memory_bank.py +225 -0
  404. robot_dam-0.6.0/tests/unit/test_ood_normalizing_flow.py +281 -0
  405. robot_dam-0.6.0/tests/unit/test_ood_trainer.py +54 -0
  406. robot_dam-0.6.0/tests/unit/test_opencv_source.py +43 -0
  407. robot_dam-0.6.0/tests/unit/test_pinocchio_fk_sanity.py +174 -0
  408. robot_dam-0.6.0/tests/unit/test_preset_registry.py +160 -0
  409. robot_dam-0.6.0/tests/unit/test_preset_router.py +177 -0
  410. robot_dam-0.6.0/tests/unit/test_qp_solver.py +349 -0
  411. robot_dam-0.6.0/tests/unit/test_replay_fidelity.py +424 -0
  412. robot_dam-0.6.0/tests/unit/test_ros2_adapters.py +402 -0
  413. robot_dam-0.6.0/tests/unit/test_runtime_injection.py +311 -0
  414. robot_dam-0.6.0/tests/unit/test_safety_guard.py +715 -0
  415. robot_dam-0.6.0/tests/unit/test_serialization.py +74 -0
  416. robot_dam-0.6.0/tests/unit/test_services.py +993 -0
  417. robot_dam-0.6.0/tests/unit/test_slow_lane.py +456 -0
  418. robot_dam-0.6.0/tests/unit/test_stage_dag.py +168 -0
  419. robot_dam-0.6.0/tests/unit/test_types.py +81 -0
  420. robot_dam-0.6.0/tests/unit/test_vision_feature_extractor.py +155 -0
  421. robot_dam-0.6.0/uv.lock +4582 -0
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "0.0.1",
3
+ "configurations": [
4
+ {
5
+ "name": "frontend",
6
+ "runtimeExecutable": "npm",
7
+ "runtimeArgs": ["run", "dev"],
8
+ "port": 3000,
9
+ "autoPort": false,
10
+ "cwd": "dam-console"
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,37 @@
1
+ # Python cache and compiled files
2
+ __pycache__/
3
+ *.pyc
4
+ .mypy_cache/
5
+ .pytest_cache/
6
+
7
+ # Git repository
8
+ .git/
9
+
10
+ # Build artifacts
11
+ build/
12
+ dist/
13
+
14
+ # Node.js and frontend build artifacts
15
+ node_modules/
16
+ dam-console/.next/
17
+ dam-console/.swc/
18
+ dam-rust/target/
19
+ .hypothesis/
20
+
21
+ venv/
22
+ .venv/
23
+ site/
24
+
25
+ # IDE and editor files
26
+ .vscode/
27
+ .idea/
28
+
29
+ # OS generated files
30
+ .DS_Store
31
+
32
+ # Environment files
33
+ .env
34
+ .env.*
35
+
36
+ *.log
37
+ *.whl
@@ -0,0 +1,45 @@
1
+ name: Bug Report
2
+ description: Report a bug to help us improve
3
+ title: "[BUG]: "
4
+ labels: ["bug"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Please check or start a [Discussion](https://github.com/ez945y/DAM/discussions) before opening an issue.
10
+ - type: textarea
11
+ id: description
12
+ attributes:
13
+ label: Description
14
+ description: What happened?
15
+ validations:
16
+ required: true
17
+ - type: textarea
18
+ id: reproduction
19
+ attributes:
20
+ label: Reproduction
21
+ description: Steps to reproduce.
22
+ placeholder: |
23
+ 1.
24
+ 2.
25
+ 3.
26
+ validations:
27
+ required: true
28
+ - type: input
29
+ id: environment
30
+ attributes:
31
+ label: Environment
32
+ description: OS, Python version, DAM version.
33
+ placeholder: e.g. Ubuntu 22.04, Python 3.12, DAM v0.2.0
34
+ validations:
35
+ required: true
36
+ - type: textarea
37
+ id: screenshots
38
+ attributes:
39
+ label: Screenshots
40
+ description: Visual evidence (Drag and drop images here).
41
+ - type: textarea
42
+ id: context
43
+ attributes:
44
+ label: Additional Context
45
+ description: Any other info?
@@ -0,0 +1,35 @@
1
+ name: Feature Request
2
+ description: Suggest an idea for DAM
3
+ title: "[FEATURE]: "
4
+ labels: ["enhancement"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Please check or start a [Discussion](https://github.com/ez945y/DAM/discussions) before opening an issue.
10
+ - type: textarea
11
+ id: summary
12
+ attributes:
13
+ label: Summary
14
+ description: What is your idea?
15
+ validations:
16
+ required: true
17
+ - type: textarea
18
+ id: motivation
19
+ attributes:
20
+ label: Motivation
21
+ description: Why do we need this?
22
+ validations:
23
+ required: true
24
+ - type: textarea
25
+ id: solution
26
+ attributes:
27
+ label: Proposed Solution
28
+ description: How should it work?
29
+ validations:
30
+ required: true
31
+ - type: textarea
32
+ id: context
33
+ attributes:
34
+ label: Additional Context
35
+ description: Any other info or screenshots? (Drag and drop images here)
@@ -0,0 +1,15 @@
1
+ ## Summary
2
+ Briefly describe the changes and the problem they solve.
3
+
4
+ ## Linked Issues
5
+ Fixes # (issue number)
6
+
7
+ ## Testing
8
+ - [ ] Unit tests
9
+ - [ ] Simulation/Hardware tests
10
+ - [ ] Other:
11
+
12
+ ## Checklist
13
+ - [ ] I have self-reviewed my changes
14
+ - [ ] I have updated the documentation
15
+ - [ ] I have added tests for my changes
@@ -0,0 +1,55 @@
1
+ name: DAM CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, dev]
6
+ pull_request:
7
+ branches: [main, dev]
8
+
9
+ jobs:
10
+ build-and-test:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - uses: actions/setup-python@v5
16
+ with:
17
+ python-version: '3.12'
18
+
19
+ - uses: actions/cache@v4
20
+ with:
21
+ path: ~/.cargo/bin
22
+ key: ${{ runner.os }}_cargo_rust_${{ hashFiles('dam-rust/**/Cargo.lock') }}
23
+
24
+ - name: Install uv + maturin
25
+ run: pip install uv maturin
26
+
27
+ - name: Build Rust Extension
28
+ run: |
29
+ cd dam-rust/dam-py
30
+ maturin build --release --out dist
31
+ uv pip install --system dist/*.whl
32
+
33
+ - name: Install Python package
34
+ run: uv pip install --system -e '.[dev]'
35
+
36
+ - name: Check Format
37
+ run: ruff format --check dam/ tests/
38
+
39
+ - name: Check Linting
40
+ run: ruff check dam/
41
+
42
+ - name: Check Syntax
43
+ run: |
44
+ cat << 'EOF' > check.py
45
+ import ast, glob
46
+ for f in glob.glob('dam/**/*.py', recursive=True):
47
+ ast.parse(open(f).read())
48
+ EOF
49
+ python check.py
50
+
51
+ - name: Test Import
52
+ run: python -c 'import dam; import dam_rs; print(f"dam {dam.__version__}")'
53
+
54
+ - name: Validate Stackfiles
55
+ run: dam validate examples/stackfiles/*.yaml
@@ -0,0 +1,31 @@
1
+ name: Deploy MkDocs to GitHub Pages
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - 'docs/**'
9
+ - 'mkdocs.yml'
10
+ permissions:
11
+ contents: write
12
+
13
+ jobs:
14
+ deploy:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: '3.10'
24
+
25
+ - name: Install dependencies
26
+ run: |
27
+ python -m pip install --upgrade pip
28
+ pip install mkdocs mkdocs-material mkdocs-minify-plugin
29
+
30
+ - name: Deploy to GitHub Pages
31
+ run: mkdocs gh-deploy --force
@@ -0,0 +1,132 @@
1
+ name: Release to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
12
+ jobs:
13
+ # ─── Stage 1: Build dam-rs wheels (Rust extension) ─────────────────────────
14
+ build-rust-wheels:
15
+ name: Build dam-rs (${{ matrix.target }} / ${{ matrix.os }})
16
+ runs-on: ${{ matrix.os }}
17
+ strategy:
18
+ fail-fast: false
19
+ matrix:
20
+ include:
21
+ # Linux x86_64
22
+ - os: ubuntu-latest
23
+ target: x86_64-unknown-linux-gnu
24
+ # Linux aarch64
25
+ - os: ubuntu-latest
26
+ target: aarch64-unknown-linux-gnu
27
+ # macOS Apple Silicon
28
+ - os: macos-14
29
+ target: aarch64-apple-darwin
30
+ # Windows x86_64
31
+ - os: windows-latest
32
+ target: x86_64-pc-windows-msvc
33
+
34
+ steps:
35
+ - uses: actions/checkout@v4
36
+
37
+ - uses: actions/setup-python@v5
38
+ with:
39
+ python-version: "3.11"
40
+
41
+ - name: Build wheels (maturin)
42
+ uses: PyO3/maturin-action@v1
43
+ with:
44
+ working-directory: dam-rust/dam-py
45
+ target: ${{ matrix.target }}
46
+ args: --release --out dist -i python3.11
47
+ manylinux: auto
48
+
49
+ - uses: actions/upload-artifact@v4
50
+ with:
51
+ name: wheels-dam-rs-${{ matrix.target }}
52
+ path: dam-rust/dam-py/dist/*.whl
53
+
54
+ # ─── Stage 1b: Build dam-rs sdist ─────────────────────────────────────────
55
+ build-rust-sdist:
56
+ name: Build dam-rs sdist
57
+ runs-on: ubuntu-latest
58
+ steps:
59
+ - uses: actions/checkout@v4
60
+
61
+ - name: Build sdist
62
+ uses: PyO3/maturin-action@v1
63
+ with:
64
+ working-directory: dam-rust/dam-py
65
+ command: sdist
66
+ args: --out dist
67
+
68
+ - uses: actions/upload-artifact@v4
69
+ with:
70
+ name: wheels-dam-rs-sdist
71
+ path: dam-rust/dam-py/dist/*.tar.gz
72
+
73
+ # ─── Stage 2: Build robot-dam (pure Python) ────────────────────────────────
74
+ build-python:
75
+ name: Build robot-dam
76
+ runs-on: ubuntu-latest
77
+ steps:
78
+ - uses: actions/checkout@v4
79
+
80
+ - uses: actions/setup-python@v5
81
+ with:
82
+ python-version: "3.12"
83
+
84
+ - name: Install build tools
85
+ run: pip install hatchling build
86
+
87
+ - name: Build sdist + wheel
88
+ run: python -m build
89
+
90
+ - uses: actions/upload-artifact@v4
91
+ with:
92
+ name: wheels-robot-dam
93
+ path: dist/*
94
+
95
+ # ─── Stage 3: Publish dam-rs to PyPI ───────────────────────────────────────
96
+ publish-rust:
97
+ name: Publish dam-rs to PyPI
98
+ needs: [build-rust-wheels, build-rust-sdist]
99
+ runs-on: ubuntu-latest
100
+ environment: pypi
101
+
102
+ steps:
103
+ - uses: actions/download-artifact@v4
104
+ with:
105
+ pattern: wheels-dam-rs-*
106
+ merge-multiple: true
107
+ path: dist/
108
+
109
+ - name: Publish to PyPI
110
+ uses: pypa/gh-action-pypi-publish@release/v1
111
+ with:
112
+ packages-dir: dist/
113
+ skip-existing: true
114
+
115
+ # ─── Stage 4: Publish robot-dam to PyPI ────────────────────────────────────
116
+ publish-python:
117
+ name: Publish robot-dam to PyPI
118
+ needs: [build-python, publish-rust]
119
+ runs-on: ubuntu-latest
120
+ environment: pypi
121
+
122
+ steps:
123
+ - uses: actions/download-artifact@v4
124
+ with:
125
+ name: wheels-robot-dam
126
+ path: dist/
127
+
128
+ - name: Publish to PyPI
129
+ uses: pypa/gh-action-pypi-publish@release/v1
130
+ with:
131
+ packages-dir: dist/
132
+ skip-existing: true
@@ -0,0 +1,66 @@
1
+ # Python
2
+ __pycache__/
3
+ *.pyc
4
+ *.pyo
5
+ *.pyd
6
+ .mypy_cache/
7
+ .ruff_cache/
8
+ .pytest_cache/
9
+ *.egg-info/
10
+ dist/
11
+ build/
12
+ .venv/
13
+ .env
14
+
15
+ # Hypothesis property-based testing database
16
+ # Stores generated examples and shrunk failures — local only, never commit
17
+ .hypothesis/
18
+
19
+ # macOS
20
+ .DS_Store
21
+ .AppleDouble
22
+ .LSOverride
23
+ Icon
24
+ ._*
25
+ .Spotlight-V100
26
+ .Trashes
27
+
28
+ # Editors
29
+ .vscode/
30
+ .idea/
31
+ .swc/
32
+ *.swp
33
+ *.swo
34
+
35
+ # Docker
36
+ .dockerenv
37
+ # Generated by scripts/dam-compose.sh from Stackfile — contains host device paths
38
+ docker-compose.override.yml
39
+
40
+ # Rust
41
+ dam-rust/target/
42
+ # Compiled PyO3 extension (maturin develop output — platform-specific .so)
43
+ dam-rust/dam-py/dam_rs*.so
44
+ dam-rust/dam-py/dam_rs*.pyd
45
+
46
+ # Web / Next.js
47
+ node_modules/
48
+ .next/
49
+ out/
50
+ coverage/
51
+ .env*.local
52
+ *.tsbuildinfo
53
+
54
+ # MkDocs
55
+ site/
56
+
57
+ # PM logs (local-only, never commit)
58
+ logs/
59
+
60
+ # Project specific
61
+ data/
62
+ **.drawio.*
63
+ **.png.bkp
64
+ .dam_stackfile.yaml
65
+ docs/DAM_Paper.md
66
+ docs/DAM_入門學習指南.docx
@@ -0,0 +1,47 @@
1
+ # Pre-commit configuration for DAM
2
+ # See https://pre-commit.com for more information
3
+ # See https://pre-commit.com/hooks.html for more hooks
4
+
5
+ repos:
6
+ - repo: https://github.com/pre-commit/pre-commit-hooks
7
+ rev: v4.5.0
8
+ hooks:
9
+ - id: trailing-whitespace
10
+ - id: end-of-file-fixer
11
+ - id: check-yaml
12
+ args: [--unsafe]
13
+ - id: check-added-large-files
14
+
15
+ - repo: https://github.com/astral-sh/ruff-pre-commit
16
+ rev: v0.15.10
17
+ hooks:
18
+ - id: ruff
19
+ args: [--fix]
20
+ - id: ruff-format
21
+ args: [--check]
22
+
23
+ - repo: local
24
+ hooks:
25
+ - id: mypy
26
+ name: mypy
27
+ entry: .venv/bin/mypy
28
+ language: system
29
+ types: [python]
30
+ args: [--config-file, pyproject.toml, dam, tests]
31
+ pass_filenames: false
32
+
33
+ - id: cargo-fmt
34
+ name: cargo fmt
35
+ description: format rust code
36
+ entry: cargo fmt --all --manifest-path dam-rust/Cargo.toml --
37
+ language: system
38
+ types: [rust]
39
+ pass_filenames: false
40
+
41
+ - id: cargo-clippy
42
+ name: cargo clippy
43
+ description: lint rust code
44
+ entry: cargo clippy --manifest-path dam-rust/Cargo.toml -- -D warnings
45
+ language: system
46
+ types: [rust]
47
+ pass_filenames: false