Skip to content

Commit baa122e

Browse files
[CI] Coverage + pre-commit (#49)
1 parent cf9b44b commit baa122e

13 files changed

+132
-134
lines changed

.github/workflows/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
ROS2 Distro | Branch | Build status | Documentation | Released packages
33
:---------: | :----: | :----------: | :-----------: | :---------------:
4-
**Rolling** | [`rolling`](https://github.com/ros-controls/kinematics_interface/tree/rolling) | [![Rolling Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build-main.yml?branch=master) <br /> [![Rolling Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build-testing.yml?branch=master) <br /> [![Rolling Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build-main.yml?branch=master) <br /> [![Rolling Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build-testing.yml?branch=master) <br /> [![Rolling Source Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-source-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-source-build.yml?branch=master) | | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#rolling)
5-
**Humble** | [`humble`](https://github.com/ros-controls/kinematics_interface/tree/humble) | [![Humble Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build-main.yml?branch=master) <br /> [![Humble Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build-testing.yml?branch=master) <br /> [![Humble Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build-main.yml?branch=master) <br /> [![Humble Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build-testing.yml?branch=master) <br /> [![Humble Source Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-source-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-source-build.yml?branch=master) | | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#humble)
4+
**Rolling** | [`rolling`](https://github.com/ros-controls/kinematics_interface/tree/rolling) | [![Rolling Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build.yml?branch=master) <br /> [![Rolling Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build.yml?branch=master) <br /> [![Rolling Source Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-source-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-source-build.yml?branch=master) | [API](http://docs.ros.org/en/rolling/p/kinematics_interface/) | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#rolling)
5+
**Humble** | [`humble`](https://github.com/ros-controls/kinematics_interface/tree/humble) | [![Humble Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build.yml?branch=master) <br /> [![Humble Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build.yml?branch=master) <br /> [![Humble Source Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-source-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-source-build.yml?branch=master) | [API](http://docs.ros.org/en/humble/p/kinematics_interface/) | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#humble)
66

77
### Explanation of different build types
88

.github/workflows/ci-coverage-build.yml

-47
This file was deleted.

.github/workflows/ci-format.yml

-23
This file was deleted.

.github/workflows/ci-ros-lint.yml

-44
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Coverage Build - Humble
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- humble
7+
pull_request:
8+
branches:
9+
- humble
10+
11+
jobs:
12+
coverage_humble:
13+
name: coverage build - humble
14+
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-build-coverage.yml@master
15+
secrets: inherit
16+
with:
17+
ros_distro: humble
18+
os_name: ubuntu-22.04
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Humble Pre-Commit
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- humble
8+
9+
jobs:
10+
pre-commit:
11+
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-pre-commit.yml@master
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
ROS_DISTRO: [humble]
16+
with:
17+
ros_distro: ${{ matrix.ROS_DISTRO }}
18+
os_name: ubuntu-22.04
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Coverage Build - Rolling
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
coverage_rolling:
13+
name: coverage build - rolling
14+
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-build-coverage.yml@master
15+
secrets: inherit
16+
with:
17+
ros_distro: rolling
18+
os_name: ubuntu-22.04
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Pre-Commit
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- master
8+
9+
jobs:
10+
pre-commit:
11+
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-pre-commit.yml@master
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
ROS_DISTRO: [rolling, iron]
16+
with:
17+
ros_distro: ${{ matrix.ROS_DISTRO }}
18+
os_name: ubuntu-22.04
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Auto Update pre-commit
2+
# Update pre-commit config and create PR if changes are detected
3+
# author: Christoph Fröhlich <[email protected]>
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: '0 0 * * 0' # Run every Sunday at midnight
9+
10+
jobs:
11+
auto_update_and_create_pr:
12+
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-update-pre-commit.yml@master

.pre-commit-config.yaml

+23-16
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
repos:
1717
# Standard hooks
1818
- repo: https://github.com/pre-commit/pre-commit-hooks
19-
rev: v4.4.0
19+
rev: v4.5.0
2020
hooks:
2121
- id: check-added-large-files
2222
- id: check-ast
@@ -36,7 +36,7 @@ repos:
3636

3737
# Python hooks
3838
- repo: https://github.com/asottile/pyupgrade
39-
rev: v3.4.0
39+
rev: v3.15.1
4040
hooks:
4141
- id: pyupgrade
4242
args: [--py36-plus]
@@ -48,40 +48,39 @@ repos:
4848
- id: pydocstyle
4949
args: ["--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404"]
5050

51+
- repo: https://github.com/psf/black
52+
rev: 24.2.0
53+
hooks:
54+
- id: black
55+
args: ["--line-length=99"]
56+
5157
- repo: https://github.com/pycqa/flake8
52-
rev: 6.0.0
58+
rev: 7.0.0
5359
hooks:
5460
- id: flake8
5561
args: ["--extend-ignore=E501"]
5662

5763
# CPP hooks
58-
- repo: local
64+
- repo: https://github.com/pre-commit/mirrors-clang-format
65+
rev: v17.0.6
5966
hooks:
6067
- id: clang-format
61-
name: clang-format
62-
description: Format files with ClangFormat.
63-
entry: clang-format-14
64-
language: system
65-
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
6668
args: ['-fallback-style=none', '-i']
6769

6870
- repo: local
6971
hooks:
7072
- id: ament_cppcheck
7173
name: ament_cppcheck
7274
description: Static code analysis of C/C++ files.
73-
stages: [commit]
74-
entry: ament_cppcheck
75+
entry: env AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS=1 ament_cppcheck
7576
language: system
7677
files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$
7778

78-
# Maybe use https://github.com/cpplint/cpplint instead
7979
- repo: local
8080
hooks:
8181
- id: ament_cpplint
8282
name: ament_cpplint
8383
description: Static code analysis of C/C++ files.
84-
stages: [commit]
8584
entry: ament_cpplint
8685
language: system
8786
files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$
@@ -93,7 +92,6 @@ repos:
9392
- id: ament_lint_cmake
9493
name: ament_lint_cmake
9594
description: Check format of CMakeLists.txt files.
96-
stages: [commit]
9795
entry: ament_lint_cmake
9896
language: system
9997
files: CMakeLists\.txt$
@@ -104,7 +102,6 @@ repos:
104102
- id: ament_copyright
105103
name: ament_copyright
106104
description: Check if copyright notice is available in all files.
107-
stages: [commit]
108105
entry: ament_copyright
109106
language: system
110107

@@ -127,8 +124,18 @@ repos:
127124
# Spellcheck in comments and docs
128125
# skipping of *.svg files is not working...
129126
- repo: https://github.com/codespell-project/codespell
130-
rev: v2.2.4
127+
rev: v2.2.6
131128
hooks:
132129
- id: codespell
133130
args: ['--write-changes']
134131
exclude: CHANGELOG\.rst|\.(svg|pyc)$
132+
133+
- repo: https://github.com/python-jsonschema/check-jsonschema
134+
rev: 0.28.0
135+
hooks:
136+
- id: check-github-workflows
137+
args: ["--verbose"]
138+
- id: check-github-actions
139+
args: ["--verbose"]
140+
- id: check-dependabot
141+
args: ["--verbose"]

CONTRIBUTING.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ As this project, by default, uses the default GitHub issue labels
5454

5555

5656
## Licensing
57-
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that [license]:
57+
Any contribution that you make to this repository will
58+
be under the Apache 2 License, as dictated by that
59+
[license](http://www.apache.org/licenses/LICENSE-2.0.html):
5860

5961
~~~
6062
5. Submission of Contributions. Unless You explicitly state otherwise,
@@ -69,4 +71,3 @@ Any contribution that you make to this repository will be under the Apache 2 Lic
6971
[issues]: https://github.com/ros-controls/kinematics_interface/issues
7072
[closed-issues]: https://github.com/ros-controls/kinematics_interface/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20
7173
[help-wanted]: https://github.com/ros-controls/kinematics_interface/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22
72-
[license]: http://www.apache.org/licenses/LICENSE-2.0.html

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# kinematics_interface
2+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
3+
[![codecov](https://codecov.io/gh/ros-controls/kinematics_interface/branch/humble/graph/badge.svg?token=NS73VKPG9V)](https://codecov.io/gh/ros-controls/kinematics_interface)
4+
25
This is a ROS 2 package for using C++ kinematics frameworks in the context of ROS 2 control. A kinematics interface is designed to allow ROS 2 controllers to control robots in Cartesian space. This package also contains a basic implementation of the interface using KDL.
36

47
## Build status

codecov.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
coverage:
2+
precision: 2
3+
round: down
4+
range: "35...100"
5+
status:
6+
project:
7+
default:
8+
informational: true
9+
patch: off
10+
fixes:
11+
- "ros_ws/src/*/kinematics_interface/::"
12+
ignore:
13+
- "**/test"
14+
- "test"
15+
comment:
16+
layout: "diff, flags, files"
17+
behavior: default

0 commit comments

Comments
 (0)