Skip to content

Commit

Permalink
Humble - General code maintenance (#126)
Browse files Browse the repository at this point in the history
* Cleaner logs from flash script (#108)

* Clean up output of flash script

* Pre commit

* Cleaner

* Specify concrete commands

* Simplify

* pre-commit fix

* Clean up usb firmware

* Clean up unused arguments (#118)

* Add scan filter

* Clean up

* undo

* added docker setup for local build

* broken ros2 controller - previous worked fine

* Clean up unused arguments

* Fix workflow: Remove spellcheck (redundant), fix integration check

* Fix multiple robot spawn

* fixes

* Delete tools folder

* Pre-commit update and remove redundant flake8

* Fix some tests and set hash in vcs

* Clean up

* Move controller test to bringup and reduce test time

* Fix lidar in simulation

* Rename test files

* Fix tests

* Add scan_filtered test and improve workpace tree

---------

Co-authored-by: Dominik Nowak <[email protected]>

* Applied xml schemas for xmllint (#101)

* applied package.xml template

Signed-off-by: Jakub Delicat <[email protected]>

* chronology

Signed-off-by: Jakub Delicat <[email protected]>

* Support

Signed-off-by: Jakub Delicat <[email protected]>

* Removed unnecessary dep

Signed-off-by: Jakub Delicat <[email protected]>

* DDS xml lint

---------

Signed-off-by: Jakub Delicat <[email protected]>
Co-authored-by: rafal-gorecki <[email protected]>

* Pre-commit

* Humble docker (#124)

* Add hardware and sim Docker

* Fix hardware docker

* Fixes

* Use packages-up-to

* Add description to compose

* Add healthcheck + clean up

* Add healthcheck + clean up

* Remove combined.launch.py

* Add User env to docker

* Change healthcheck

* Clean up

* Update docs

* Add launch arguments info

* Add status info

* add unsaved

* fix

* Simplify

---------

Signed-off-by: Jakub Delicat <[email protected]>
Co-authored-by: Dominik Nowak <[email protected]>
Co-authored-by: Jakub Delicat <[email protected]>
  • Loading branch information
3 people authored Dec 5, 2024
1 parent 353eebf commit 03073e6
Show file tree
Hide file tree
Showing 69 changed files with 1,039 additions and 2,021 deletions.
40 changes: 10 additions & 30 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,11 @@ on:
workflow_dispatch:

jobs:
black:
name: Black
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Black
uses: psf/[email protected]
with:
options: --line-length=99

spellcheck:
name: Spellcheck
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Spellcheck
uses: rojopolis/[email protected]
pre-commit:
name: Pre-commit
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-pre-commit.yml@master
with:
ros_distro: humble

industrial_ci:
name: Industrial CI
Expand All @@ -36,20 +22,15 @@ jobs:
ROS_DISTRO: [humble]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Act + Docker fix
run: |
sudo chown runner:docker /var/run/docker.sock
uses: actions/checkout@v4

- name: Setup ROS2 Workspace and Clone Repositories
run: |
mkdir -p src
find . -maxdepth 1 -not -name src -not -name . -exec mv {} src/ \;
mkdir -p src/rosbot_ros
find . -maxdepth 1 -not -name src -not -name . -exec mv {} src/rosbot_ros \;
python3 -m pip install -U vcstool
vcs import src < src/rosbot/rosbot_hardware.repos
vcs import src < src/rosbot/rosbot_simulation.repos
cp -r src/ros2_controllers/diff_drive_controller src/
vcs import src < src/rosbot_ros/rosbot/rosbot_hardware.repos
vcs import src < src/rosbot_ros/rosbot/rosbot_simulation.repos
cp -r src/ros2_controllers/imu_sensor_broadcaster src/
rm -rf src/ros2_controllers
Expand All @@ -58,7 +39,6 @@ jobs:
- name: Leave only ROSbot tests
shell: bash
run: |
sed '/if(BUILD_TESTING)/,/endif()/d' src/diff_drive_controller/CMakeLists.txt -i
sed '/if(BUILD_TESTING)/,/endif()/d' src/imu_sensor_broadcaster/CMakeLists.txt -i
sed '/if(BUILD_TESTING)/,/endif()/d' src/micro_ros_msgs/CMakeLists.txt -i
Expand Down
67 changes: 45 additions & 22 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,51 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-xml
- id: check-added-large-files
# mesh files has to be taken into account
args: [--maxkb=3000]
- id: check-ast
- id: check-json
exclude: ^.vscode/
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: name-tests-test
files: ^.*\/test\/.*$
args: [--pytest-test-first]
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: [--profile, black]

- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.4
hooks:
- id: clang-format

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
name: codespell
description: Checks for common misspellings in text files.
entry: codespell *
entry: codespell
exclude_types: [rst, svg]
language: python
types: [text]

Expand All @@ -33,23 +57,16 @@ repos:
args: [--mapping, '2', --sequence, '4', --offset, '2', --width, '100']

- repo: https://github.com/psf/black
rev: 24.4.0
rev: 24.10.0
hooks:
- id: black
args: [--line-length=99]

- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
rev: 7.1.1
hooks:
- id: flake8
args: ['--ignore=E501,W503'] # ignore too long line and line break before binary operator,
# black checks it

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: [--profile, black]
args: ['--ignore=E501,W503']

- repo: local
hooks:
Expand All @@ -68,11 +85,17 @@ repos:
stages: [commit]
entry: ament_copyright
language: system
exclude: ^.*\.md$

# Docs - RestructuredText hooks
- repo: https://github.com/PyCQA/doc8
rev: v1.1.1
rev: v1.1.2
hooks:
- id: doc8
args: [--max-line-length=100, --ignore=D001]
exclude: ^.*\/CHANGELOG\.rst/.*$

- repo: https://github.com/tier4/pre-commit-hooks-ros
rev: v0.10.0
hooks:
- id: prettier-package-xml
- id: sort-package-xml
54 changes: 0 additions & 54 deletions .pyspelling.yaml

This file was deleted.

161 changes: 0 additions & 161 deletions .wordlist.txt

This file was deleted.

Loading

0 comments on commit 03073e6

Please sign in to comment.