diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index a4e68bc..001b7ae 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -4,10 +4,9 @@ on: branches: - main pull_request: - branches: - - main + types: [ opened, synchronize, reopened, ready_for_review ] jobs: - call_reusable_workflow: + code-coverage: uses: vortexntnu/vortex-ci/.github/workflows/reusable-code-coverage.yml@main secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/industrial-ci.yml b/.github/workflows/industrial-ci.yml index 67a4efe..b9add24 100644 --- a/.github/workflows/industrial-ci.yml +++ b/.github/workflows/industrial-ci.yml @@ -2,11 +2,15 @@ name: Industrial CI on: push: + branches: + - main + pull_request: + types: [ opened, synchronize, reopened, ready_for_review ] workflow_dispatch: schedule: - cron: '0 1 * * *' # Runs daily to check for dependency issues or flaking tests jobs: - call_reusable_workflow: + industrial-ci: uses: vortexntnu/vortex-ci/.github/workflows/reusable-industrial-ci.yml@main with: ros_repo: '["testing", "main"]' diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index e25eb6e..115be34 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,11 +1,14 @@ name: pre-commit - on: + push: + branches: + - main pull_request: + types: [ opened, synchronize, reopened, ready_for_review ] workflow_dispatch: jobs: - call_reusable_workflow: + pre-commit: uses: vortexntnu/vortex-ci/.github/workflows/reusable-pre-commit.yml@main with: ros_distro: 'humble' - config_path: '.pre-commit-config-local.yaml' + config_path: '.pre-commit-config.yaml' diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index 70779d4..765aa2c 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -5,5 +5,5 @@ on: branches: - main jobs: - call_reusable_workflow: + semantic-release: uses: vortexntnu/vortex-ci/.github/workflows/reusable-semantic-release.yml@main diff --git a/.gitignore b/.gitignore index 5f73720..74a0a7a 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,6 @@ qtcreator-* # Catkin custom files CATKIN_IGNORE + +.vscode/ +log/ diff --git a/.pre-commit-config-local.yaml b/.pre-commit-config-local.yaml deleted file mode 100644 index 5fafb03..0000000 --- a/.pre-commit-config-local.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# To install: -# -# pip install pre-commit identify -# -# To use: -# -# pre-commit run --all-files -c .pre-commit-config-local.yaml -# -# Or to install it for automatic checks on commit: -# -# pre-commit install -c .pre-commit-config-local.yaml -# -# To update this file: -# -# pre-commit autoupdate -c .pre-commit-config-local.yaml -# -# See https://pre-commit.com/ for documentation -# -# NOTE: This configuration uses local hooks specific to ROS2 (ament_* linters) - -repos: - # C++ hooks - - repo: local - hooks: - - id: ament_cppcheck - name: ament_cppcheck - description: Static code analysis of C/C++ files. - entry: env AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS=1 ament_cppcheck - language: system - files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$ - - repo: local - hooks: - - id: ament_cpplint - name: ament_cpplint - description: Static code analysis of C/C++ files. - entry: ament_cpplint - language: system - files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$ - args: [ - "--linelength=100", - "--filter=-whitespace/newline,-legal/copyright,-build/include_order" - ] - # CMake hooks - - repo: local - hooks: - - id: ament_lint_cmake - name: ament_lint_cmake - description: Check format of CMakeLists.txt files. - entry: ament_lint_cmake - language: system - files: CMakeLists\.txt$ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fad3b6d..2c81fd1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -78,6 +78,35 @@ repos: hooks: - id: clang-format args: [--style=file] + - repo: local + hooks: + - id: ament_cppcheck + name: ament_cppcheck + description: Static code analysis of C/C++ files. + entry: env AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS=1 ament_cppcheck + language: system + files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$ + - repo: local + hooks: + - id: ament_cpplint + name: ament_cpplint + description: Static code analysis of C/C++ files. + entry: ament_cpplint + language: system + files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$ + args: [ + "--linelength=100", + "--filter=-whitespace/newline,-legal/copyright,-build/include_order" + ] + # CMake hooks + - repo: local + hooks: + - id: ament_lint_cmake + name: ament_lint_cmake + description: Check format of CMakeLists.txt files. + entry: ament_lint_cmake + language: system + files: CMakeLists\.txt$ # Spellcheck in comments and docs - repo: https://github.com/codespell-project/codespell rev: v2.4.1 diff --git a/README.md b/README.md index dca01c0..2d79e52 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # Image Filtering Node [![Industrial CI](https://github.com/vortexntnu/vortex-image-filtering/actions/workflows/industrial-ci.yml/badge.svg)](https://github.com/vortexntnu/vortex-image-filtering/actions/workflows/industrial-ci.yml) -[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/vortexntnu/vortex-image-filtering/main.svg)](https://results.pre-commit.ci/latest/github/vortexntnu/vortex-image-filtering/main) [![codecov](https://codecov.io/github/vortexntnu/vortex-image-filtering/graph/badge.svg?token=6XHprkpUsR)](https://codecov.io/github/vortexntnu/vortex-image-filtering) The `image_filtering_node` is a ROS 2 node developed in the `vortex::image_filters` namespace. It is designed to subscribe to image topics, apply various image filters using OpenCV, and publish the filtered images back to ROS.