Skip to content

Commit cdd6a3f

Browse files
authored
Merge pull request #371 from Gepetto/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 8201b3e + 9a7328b commit cdd6a3f

132 files changed

Lines changed: 181 additions & 219 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2
22
updates:
3-
- package-ecosystem: github-actions
4-
directory: /
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
55
schedule:
6-
interval: monthly
6+
interval: "monthly"

.github/workflows/update-flake-lock.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: update-flake-lock
2-
32
on:
43
workflow_dispatch:
54
schedule:
65
- cron: '0 18 23 * *'
7-
86
jobs:
97
update-flake-inputs:
108
runs-on: ubuntu-slim
File renamed without changes.

.pre-commit-config.yaml

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,41 @@
11
ci:
22
autoupdate_schedule: quarterly
33
repos:
4-
- repo: https://github.com/astral-sh/ruff-pre-commit
5-
rev: v0.15.6
6-
hooks:
7-
- id: ruff
8-
args:
9-
- --fix
10-
- --exit-non-zero-on-fix
11-
- --ignore
12-
- UP036
13-
- id: ruff-format
14-
- repo: https://github.com/cheshirekow/cmake-format-precommit
15-
rev: v0.6.13
16-
hooks:
17-
- id: cmake-format
18-
- repo: https://github.com/pappasam/toml-sort
19-
rev: v0.24.3
20-
hooks:
21-
- id: toml-sort-fix
22-
- repo: https://github.com/pre-commit/mirrors-clang-format
23-
rev: v22.1.1
24-
hooks:
25-
- id: clang-format
26-
args:
27-
- -i
28-
- --style=Google
29-
- repo: https://github.com/pre-commit/pre-commit-hooks
30-
rev: v6.0.0
31-
hooks:
32-
- id: check-added-large-files
33-
- id: check-ast
34-
- id: check-merge-conflict
35-
- id: check-symlinks
36-
- id: check-toml
37-
- id: check-yaml
38-
- id: debug-statements
39-
- id: detect-private-key
40-
- id: end-of-file-fixer
41-
- id: mixed-line-ending
42-
- id: trailing-whitespace
4+
- repo: https://github.com/BlankSpruce/gersemi
5+
rev: 0.26.1
6+
hooks:
7+
- id: gersemi
8+
- repo: https://github.com/astral-sh/ruff-pre-commit
9+
rev: v0.15.9
10+
hooks:
11+
- id: ruff-check
12+
- id: ruff-format
13+
- repo: https://github.com/pappasam/toml-sort
14+
rev: v0.24.4
15+
hooks:
16+
- id: toml-sort-fix
17+
- repo: https://github.com/pre-commit/mirrors-clang-format
18+
rev: v22.1.2
19+
hooks:
20+
- id: clang-format
21+
args:
22+
- --style=Google
23+
- repo: https://github.com/pre-commit/pre-commit-hooks
24+
rev: v6.0.0
25+
hooks:
26+
- id: check-added-large-files
27+
- id: check-ast
28+
- id: check-executables-have-shebangs
29+
- id: check-json
30+
- id: check-merge-conflict
31+
- id: check-symlinks
32+
- id: check-toml
33+
- id: check-yaml
34+
- id: debug-statements
35+
- id: destroyed-symlinks
36+
- id: detect-private-key
37+
- id: end-of-file-fixer
38+
- id: fix-byte-order-marker
39+
- id: mixed-line-ending
40+
- id: trailing-whitespace
4341
exclude: tests/test_python-syntax_error.py

CMakeLists.txt

Lines changed: 66 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,57 @@ cmake_minimum_required(VERSION 3.22)
44
set(PROJECT_ORG gepetto)
55
set(PROJECT_NAME example-robot-data)
66
set(PROJECT_DESCRIPTION
7-
"Set of robot URDFs for benchmarking and developed examples")
7+
"Set of robot URDFs for benchmarking and developed examples"
8+
)
89
set(PROJECT_URL https://github.com/${PROJECT_ORG}/${PROJECT_NAME})
910
# To enable jrl-cmakemodules compatibility with workspace we must define the two
1011
# following lines
1112
set(PROJECT_AUTO_RUN_FINALIZE FALSE)
1213
set(PROJECT_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR})
1314

1415
if(DEFINED INSTALL_PYTHON_INTERFACE_ONLY)
15-
message(
16-
FATAL_ERROR
17-
"CMake option INSTALL_PYTHON_INTERFACE_ONLY has been renamed BUILD_STANDALONE_PYTHON_INTERFACE"
18-
)
16+
message(
17+
FATAL_ERROR
18+
"CMake option INSTALL_PYTHON_INTERFACE_ONLY has been renamed BUILD_STANDALONE_PYTHON_INTERFACE"
19+
)
1920
endif()
2021

2122
# Project configuration
2223
if(NOT BUILD_STANDALONE_PYTHON_INTERFACE)
23-
set(PROJECT_USE_CMAKE_EXPORT TRUE)
24+
set(PROJECT_USE_CMAKE_EXPORT TRUE)
2425
endif()
2526
set(CUSTOM_HEADER_DIR ${PROJECT_NAME})
2627
set(PROJECT_COMPATIBILITY_VERSION AnyNewerVersion)
2728

2829
# Check if the submodule cmake have been initialized
2930
set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake")
3031
if(EXISTS "${JRL_CMAKE_MODULES}/base.cmake")
31-
message(STATUS "JRL cmakemodules found in 'cmake/' git submodule")
32+
message(STATUS "JRL cmakemodules found in 'cmake/' git submodule")
3233
else()
33-
find_package(jrl-cmakemodules QUIET CONFIG)
34-
if(jrl-cmakemodules_FOUND)
35-
get_property(
36-
JRL_CMAKE_MODULES
37-
TARGET jrl-cmakemodules::jrl-cmakemodules
38-
PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
39-
message(STATUS "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}")
40-
else()
41-
message(STATUS "JRL cmakemodules not found. Let's fetch it.")
42-
include(FetchContent)
43-
FetchContent_Declare(
44-
"jrl-cmakemodules"
45-
GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git")
46-
FetchContent_MakeAvailable("jrl-cmakemodules")
47-
FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES)
48-
endif()
34+
find_package(jrl-cmakemodules QUIET CONFIG)
35+
if(jrl-cmakemodules_FOUND)
36+
get_property(
37+
JRL_CMAKE_MODULES
38+
TARGET jrl-cmakemodules::jrl-cmakemodules
39+
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
40+
)
41+
message(
42+
STATUS
43+
"JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}"
44+
)
45+
else()
46+
message(STATUS "JRL cmakemodules not found. Let's fetch it.")
47+
include(FetchContent)
48+
FetchContent_Declare(
49+
"jrl-cmakemodules"
50+
GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git"
51+
)
52+
FetchContent_MakeAvailable("jrl-cmakemodules")
53+
FetchContent_GetProperties(
54+
"jrl-cmakemodules"
55+
SOURCE_DIR JRL_CMAKE_MODULES
56+
)
57+
endif()
4958
endif()
5059

5160
# JRL-cmakemodule setup
@@ -64,40 +73,45 @@ compute_project_args(PROJECT_ARGS LANGUAGES CXX)
6473
project(${PROJECT_NAME} ${PROJECT_ARGS})
6574

6675
if(BUILD_STANDALONE_PYTHON_INTERFACE)
67-
add_project_dependency(${PROJECT_NAME} REQUIRED CONFIG)
76+
add_project_dependency(${PROJECT_NAME} REQUIRED CONFIG)
6877
else()
69-
add_library(${PROJECT_NAME} INTERFACE)
70-
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
71-
target_include_directories(
72-
${PROJECT_NAME}
73-
INTERFACE $<INSTALL_INTERFACE:include>
74-
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
75-
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
76-
target_compile_definitions(
77-
${PROJECT_NAME}
78-
INTERFACE
79-
$<INSTALL_INTERFACE:EXAMPLE_ROBOT_DATA_MODEL_DIR="$<INSTALL_PREFIX>/share/${PROJECT_NAME}/robots">
80-
$<BUILD_INTERFACE:EXAMPLE_ROBOT_DATA_MODEL_DIR="${CMAKE_CURRENT_SOURCE_DIR}/robots">
81-
)
82-
install(
83-
TARGETS ${PROJECT_NAME}
84-
EXPORT ${TARGETS_EXPORT_NAME}
85-
DESTINATION lib)
78+
add_library(${PROJECT_NAME} INTERFACE)
79+
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
80+
target_include_directories(
81+
${PROJECT_NAME}
82+
INTERFACE
83+
$<INSTALL_INTERFACE:include>
84+
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
85+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
86+
)
87+
target_compile_definitions(
88+
${PROJECT_NAME}
89+
INTERFACE
90+
$<INSTALL_INTERFACE:EXAMPLE_ROBOT_DATA_MODEL_DIR="$<INSTALL_PREFIX>/share/${PROJECT_NAME}/robots">
91+
$<BUILD_INTERFACE:EXAMPLE_ROBOT_DATA_MODEL_DIR="${CMAKE_CURRENT_SOURCE_DIR}/robots">
92+
)
93+
install(
94+
TARGETS ${PROJECT_NAME}
95+
EXPORT ${TARGETS_EXPORT_NAME}
96+
DESTINATION lib
97+
)
8698

87-
install(FILES include/${CUSTOM_HEADER_DIR}/path.hpp
88-
DESTINATION include/${CUSTOM_HEADER_DIR})
89-
install(DIRECTORY robots DESTINATION share/${PROJECT_NAME})
99+
install(
100+
FILES include/${CUSTOM_HEADER_DIR}/path.hpp
101+
DESTINATION include/${CUSTOM_HEADER_DIR}
102+
)
103+
install(DIRECTORY robots DESTINATION share/${PROJECT_NAME})
90104
endif()
91105

92106
if(BUILD_PYTHON_INTERFACE)
93-
add_project_dependency(eigenpy 3.0.0 REQUIRED)
94-
add_project_dependency(pinocchio 2.7.0 REQUIRED)
95-
string(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
96-
findpython(REQUIRED)
97-
add_subdirectory(python)
98-
if(BUILD_TESTING)
99-
add_subdirectory(unittest)
100-
endif(BUILD_TESTING)
107+
add_project_dependency(eigenpy 3.0.0 REQUIRED)
108+
add_project_dependency(pinocchio 2.7.0 REQUIRED)
109+
string(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
110+
findpython(REQUIRED)
111+
add_subdirectory(python)
112+
if(BUILD_TESTING)
113+
add_subdirectory(unittest)
114+
endif(BUILD_TESTING)
101115
endif()
102116

103117
setup_project_finalize()

0 commit comments

Comments
 (0)