diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000..0a70be7 --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,14 @@ +name: pre-commit + +on: + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..719bc88 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,30 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-symlinks + - id: destroyed-symlinks + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-toml + - id: check-ast + - id: check-added-large-files + args: ["--maxkb=2000"] + - id: check-merge-conflict + - id: check-executables-have-shebangs + - id: check-shebang-scripts-are-executable + - id: detect-private-key + - id: debug-statements + - repo: https://github.com/codespell-project/codespell + rev: v2.2.2 + hooks: + - id: codespell + args: + - --skip=*.ipynb + - repo: https://github.com/google/yamlfmt + rev: v0.21.0 + hooks: + - id: yamlfmt diff --git a/panda/armer/docker-compose-sim.yaml b/panda/armer/docker-compose-sim.yaml index e1dc411..2785ce5 100644 --- a/panda/armer/docker-compose-sim.yaml +++ b/panda/armer/docker-compose-sim.yaml @@ -13,4 +13,4 @@ services: - /tmp/.X11-unix:/tmp/.X11-unix:rw command: > bash -c "source /home/armer_ws/devel/setup.bash && - roslaunch armer_panda robot_bringup.launch sim:=true" \ No newline at end of file + roslaunch armer_panda robot_bringup.launch sim:=true" diff --git a/panda/armer/docker-compose.yaml b/panda/armer/docker-compose.yaml index 5b8385d..6cb960a 100644 --- a/panda/armer/docker-compose.yaml +++ b/panda/armer/docker-compose.yaml @@ -22,4 +22,4 @@ services: command: > bash -c "source /home/armer_ws/devel/setup.bash && - roslaunch armer_panda robot_bringup.launch rviz:=true" \ No newline at end of file + roslaunch armer_panda robot_bringup.launch rviz:=true" diff --git a/panda/moveit/.env b/panda/moveit/.env index 5f6d583..d87cbf7 100644 --- a/panda/moveit/.env +++ b/panda/moveit/.env @@ -1 +1 @@ -ROBOT_IP=172.16.0.2 \ No newline at end of file +ROBOT_IP=172.16.0.2 diff --git a/panda/moveit/docker-compose-sim.yaml b/panda/moveit/docker-compose-sim.yaml index 8b886fd..31e6639 100644 --- a/panda/moveit/docker-compose-sim.yaml +++ b/panda/moveit/docker-compose-sim.yaml @@ -11,4 +11,4 @@ services: volumes: - /tmp/.X11-unix:/tmp/.X11-unix:rw command: > - bash -c "source /home/moveit_ws/devel/setup.bash && roslaunch panda_moveit_config demo.launch" \ No newline at end of file + bash -c "source /home/moveit_ws/devel/setup.bash && roslaunch panda_moveit_config demo.launch" diff --git a/panda/moveit/docker-compose.yaml b/panda/moveit/docker-compose.yaml index c594993..e0e8a53 100644 --- a/panda/moveit/docker-compose.yaml +++ b/panda/moveit/docker-compose.yaml @@ -21,5 +21,5 @@ services: volumes: - /tmp/.X11-unix:/tmp/.X11-unix:rw command: > - bash -c "source /home/moveit_ws/devel/setup.bash && - roslaunch panda_moveit_config franka_control.launch robot_ip:=${ROBOT_IP}" \ No newline at end of file + bash -c "source /home/moveit_ws/devel/setup.bash && + roslaunch panda_moveit_config franka_control.launch robot_ip:=${ROBOT_IP}" diff --git a/realsense/.env b/realsense/.env index 48f9be1..fb5d9db 100644 --- a/realsense/.env +++ b/realsense/.env @@ -29,4 +29,4 @@ CAMERA1_MARKER_PREFIX=tr_ # TF_NUM_SAMPLES=100 # COMMENT THE CALIBRATION AND UNCOMMENT THE FOLLOWING TO HAVE FIXED TRANSFORAMTION -EXTERNAL_CALIBRATION_LAUNCH=/calib/external_camera_tf.launch \ No newline at end of file +EXTERNAL_CALIBRATION_LAUNCH=/calib/external_camera_tf.launch diff --git a/realsense/README.md b/realsense/README.md index 899fda4..a1e746e 100644 --- a/realsense/README.md +++ b/realsense/README.md @@ -1,2 +1,2 @@ -1. Toggling and updating the `.env` file to get desireable effect +1. Toggling and updating the `.env` file to get desirable effect 2. Run the container with `docker compose up` diff --git a/realsense/docker-compose.yaml b/realsense/docker-compose.yaml index e639c9e..468cd74 100644 --- a/realsense/docker-compose.yaml +++ b/realsense/docker-compose.yaml @@ -4,7 +4,7 @@ services: network_mode: "host" privileged: true container_name: realsense - + env_file: - .env @@ -16,7 +16,7 @@ services: - /run/udev:/run/udev:ro - /dev:/dev - ./calib:/calib - + command: > bash -c "source /home/realsense_ws/devel/setup.bash && - roslaunch rv_panda_realsense monash_realsense.launch" \ No newline at end of file + roslaunch rv_panda_realsense monash_realsense.launch" diff --git a/yamlfmt.yml b/yamlfmt.yml new file mode 100644 index 0000000..252d0ff --- /dev/null +++ b/yamlfmt.yml @@ -0,0 +1,5 @@ +formatter: + type: basic + force_quote_style: double + retain_line_breaks: true + trim_trailing_whitespace: false