Skip to content

Commit 0514d71

Browse files
authored
Merge pull request #74 from Gepetto/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents a757b0f + 7b69b7e commit 0514d71

File tree

443 files changed

+747
-625
lines changed

Some content is hidden

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

443 files changed

+747
-625
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 4 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: "/"
5-
schedule:
6-
interval: "weekly"
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
11
name: update-flake-lock
2-
32
on:
43
workflow_dispatch:
54
schedule:
65
- cron: '0 23 16 * *'
7-
86
jobs:
9-
lockfile:
10-
runs-on: ubuntu-latest
7+
update-flake-inputs:
8+
runs-on: ubuntu-slim
9+
permissions:
10+
contents: write
11+
pull-requests: write
1112
steps:
13+
- name: Generate GitHub App Token
14+
id: app-token
15+
uses: actions/create-github-app-token@v3
16+
with:
17+
app-id: ${{ secrets.GEPETTO_NIX_APP_ID }}
18+
private-key: ${{ secrets.GEPETTO_NIX_APP_PRIVATE_KEY }}
1219
- name: Checkout repository
1320
uses: actions/checkout@v6
14-
- name: Install Nix
15-
uses: DeterminateSystems/nix-installer-action@main
16-
- name: Update flake.lock
17-
uses: DeterminateSystems/update-flake-lock@main
1821
with:
19-
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
22+
token: ${{ steps.app-token.outputs.token }}
23+
- name: Setup Nix
24+
uses: cachix/install-nix-action@v31
25+
- name: Update flake inputs
26+
uses: mic92/update-flake-inputs@v1
27+
with:
28+
github-token: ${{ steps.app-token.outputs.token }}
29+
pr-labels: 'no-changelog'
30+
git-author-name: 'hrp2-14'
31+
git-author-email: '40568249+hrp2-14@users.noreply.github.com'

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ __pycache__
33
*.pyd
44
*.pyo
55
build*
6-
*~
6+
*~

.mergify.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ pull_request_rules:
77
- check-success = "pre-commit.ci - pr"
88
- or:
99
- author = dependabot[bot]
10+
- author = gepetto-flake-updater[bot]
1011
- author = github-actions[bot]
1112
- author = hrp2-14
1213
- author = pre-commit-ci[bot]

.pre-commit-config.yaml

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,40 @@
1+
ci:
2+
autoupdate_schedule: quarterly
13
repos:
2-
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.15.8
4-
hooks:
5-
- id: ruff
6-
args:
7-
- --fix
8-
- --exit-non-zero-on-fix
9-
- id: ruff-format
10-
- repo: https://github.com/cheshirekow/cmake-format-precommit
11-
rev: v0.6.13
12-
hooks:
13-
- id: cmake-format
14-
- repo: https://github.com/pappasam/toml-sort
15-
rev: v0.24.4
16-
hooks:
17-
- id: toml-sort-fix
18-
- repo: https://github.com/pre-commit/mirrors-clang-format
19-
rev: v22.1.2
20-
hooks:
21-
- id: clang-format
22-
args:
23-
- '--style=Google'
24-
- repo: https://github.com/pre-commit/pre-commit-hooks
25-
rev: v6.0.0
26-
hooks:
27-
- 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

CMakeLists.txt

Lines changed: 76 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ cmake_minimum_required(VERSION 3.22)
44
set(PROJECT_ORG gepetto)
55
set(PROJECT_NAME example-parallel-robots)
66
set(PROJECT_DESCRIPTION
7-
"Set of parallel robot models for general use in benchmarks and examples")
7+
"Set of parallel robot models for general use in benchmarks and examples"
8+
)
89
set(PROJECT_URL "https://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
910

1011
# Project configuration
@@ -14,24 +15,32 @@ set(PROJECT_COMPATIBILITY_VERSION AnyNewerVersion)
1415
# Check if the submodule cmake have been initialized
1516
set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake")
1617
if(EXISTS "${JRL_CMAKE_MODULES}/base.cmake")
17-
message(STATUS "JRL cmakemodules found in 'cmake/' git submodule")
18+
message(STATUS "JRL cmakemodules found in 'cmake/' git submodule")
1819
else()
19-
find_package(jrl-cmakemodules QUIET CONFIG)
20-
if(jrl-cmakemodules_FOUND)
21-
get_property(
22-
JRL_CMAKE_MODULES
23-
TARGET jrl-cmakemodules::jrl-cmakemodules
24-
PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
25-
message(STATUS "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}")
26-
else()
27-
message(STATUS "JRL cmakemodules not found. Let's fetch it.")
28-
include(FetchContent)
29-
FetchContent_Declare(
30-
"jrl-cmakemodules"
31-
GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git")
32-
FetchContent_MakeAvailable("jrl-cmakemodules")
33-
FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES)
34-
endif()
20+
find_package(jrl-cmakemodules QUIET CONFIG)
21+
if(jrl-cmakemodules_FOUND)
22+
get_property(
23+
JRL_CMAKE_MODULES
24+
TARGET jrl-cmakemodules::jrl-cmakemodules
25+
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
26+
)
27+
message(
28+
STATUS
29+
"JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}"
30+
)
31+
else()
32+
message(STATUS "JRL cmakemodules not found. Let's fetch it.")
33+
include(FetchContent)
34+
FetchContent_Declare(
35+
"jrl-cmakemodules"
36+
GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git"
37+
)
38+
FetchContent_MakeAvailable("jrl-cmakemodules")
39+
FetchContent_GetProperties(
40+
"jrl-cmakemodules"
41+
SOURCE_DIR JRL_CMAKE_MODULES
42+
)
43+
endif()
3544
endif()
3645

3746
# JRL-cmakemodule setup
@@ -48,51 +57,61 @@ compute_project_args(PROJECT_ARGS LANGUAGES CXX)
4857
project(${PROJECT_NAME} ${PROJECT_ARGS})
4958

5059
if(BUILD_PYTHON_INTERFACE)
51-
# add_project_dependency(numpy REQUIRED)
52-
# add_project_dependency(toolbox-parallel-robots REQUIRED)
53-
include("${JRL_CMAKE_MODULES}/python.cmake")
54-
add_project_dependency(pinocchio REQUIRED)
55-
string(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
60+
# add_project_dependency(numpy REQUIRED)
61+
# add_project_dependency(toolbox-parallel-robots REQUIRED)
62+
include("${JRL_CMAKE_MODULES}/python.cmake")
63+
add_project_dependency(pinocchio REQUIRED)
64+
string(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
5665

57-
set(${PROJECT_NAME}_PYTHON_FILES
58-
__init__.py __main__.py loader_tools.py robot_options.py talos_closed.py
59-
talos_closed_6d.py)
66+
set(${PROJECT_NAME}_PYTHON_FILES
67+
__init__.py
68+
__main__.py
69+
loader_tools.py
70+
robot_options.py
71+
talos_closed.py
72+
talos_closed_6d.py
73+
)
6074

61-
foreach(python ${${PROJECT_NAME}_PYTHON_FILES})
62-
python_install_on_site(${PY_NAME} ${python})
63-
endforeach(python ${${PROJECT_NAME}_PYTHON_FILES})
75+
foreach(python ${${PROJECT_NAME}_PYTHON_FILES})
76+
python_install_on_site(${PY_NAME} ${python})
77+
endforeach(python ${${PROJECT_NAME}_PYTHON_FILES})
6478

65-
configure_file(${PY_NAME}/path.py.in ${PY_NAME}/path.py)
66-
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PY_NAME}/path.py
67-
DESTINATION "${PYTHON_SITELIB}/${PY_NAME}")
79+
configure_file(${PY_NAME}/path.py.in ${PY_NAME}/path.py)
80+
install(
81+
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PY_NAME}/path.py
82+
DESTINATION "${PYTHON_SITELIB}/${PY_NAME}"
83+
)
6884

69-
if(BUILD_TESTING)
70-
find_package(toolbox-parallel-robots QUIET) # tpr installed from source /
71-
# system
72-
if(NOT TARGET toolbox-parallel-robots::toolbox-parallel-robots)
73-
# TODO: allow use of pinocchio.casadi from PyPI execute_process( COMMAND
74-
# ${PYTHON_EXECUTABLE} "-c" "import toolbox_parallel_robots"
75-
# RESULT_VARIABLE _tpr OUTPUT_QUIET ERROR_QUIET) if(NOT _tpr EQUAL 0)
76-
# message( FATAL_ERROR "toolbox-parallel-robots not found. Please install
77-
# it and ensure it is available." ) endif()
78-
endif()
79-
add_subdirectory(unittest)
80-
endif(BUILD_TESTING)
85+
if(BUILD_TESTING)
86+
find_package(toolbox-parallel-robots QUIET) # tpr installed from source /
87+
# system
88+
if(NOT TARGET toolbox-parallel-robots::toolbox-parallel-robots)
89+
# TODO: allow use of pinocchio.casadi from PyPI execute_process( COMMAND
90+
# ${PYTHON_EXECUTABLE} "-c" "import toolbox_parallel_robots"
91+
# RESULT_VARIABLE _tpr OUTPUT_QUIET ERROR_QUIET) if(NOT _tpr EQUAL 0)
92+
# message( FATAL_ERROR "toolbox-parallel-robots not found. Please install
93+
# it and ensure it is available." ) endif()
94+
endif()
95+
add_subdirectory(unittest)
96+
endif(BUILD_TESTING)
8197
endif(BUILD_PYTHON_INTERFACE)
8298

8399
if(NOT BUILD_STANDALONE_PYTHON_INTERFACE)
84-
add_library(${PROJECT_NAME} INTERFACE)
85-
target_include_directories(${PROJECT_NAME}
86-
INTERFACE $<INSTALL_INTERFACE:include>)
87-
target_compile_definitions(
88-
${PROJECT_NAME}
89-
INTERFACE
90-
EXAMPLE_PARALLEL_ROBOTS_MODEL_DIR="$<INSTALL_PREFIX>/share/${PROJECT_NAME}/robots"
91-
)
92-
install(
93-
TARGETS ${PROJECT_NAME}
94-
EXPORT ${TARGETS_EXPORT_NAME}
95-
DESTINATION lib)
100+
add_library(${PROJECT_NAME} INTERFACE)
101+
target_include_directories(
102+
${PROJECT_NAME}
103+
INTERFACE $<INSTALL_INTERFACE:include>
104+
)
105+
target_compile_definitions(
106+
${PROJECT_NAME}
107+
INTERFACE
108+
EXAMPLE_PARALLEL_ROBOTS_MODEL_DIR="$<INSTALL_PREFIX>/share/${PROJECT_NAME}/robots"
109+
)
110+
install(
111+
TARGETS ${PROJECT_NAME}
112+
EXPORT ${TARGETS_EXPORT_NAME}
113+
DESTINATION lib
114+
)
96115

97-
install(DIRECTORY robots DESTINATION share/${PROJECT_NAME})
116+
install(DIRECTORY robots DESTINATION share/${PROJECT_NAME})
98117
endif()

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2626
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2727
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2828
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ To Be explicited - contact [Ludovic De Matteis](https://github.com/LudovicDeMatt
1919

2020
## Contributions
2121
- [Virgile Batto](https://github.com/Virgileboat), LAAS-CNRS :fr:
22-
- [Ludovic De Matteis](https://github.com/LudovicDeMatteis), LAAS-CNRS :fr:
22+
- [Ludovic De Matteis](https://github.com/LudovicDeMatteis), LAAS-CNRS :fr:

0 commit comments

Comments
 (0)