Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ostasse/dynamic-graph-python
  • gsaurel/dynamic-graph-python
  • stack-of-tasks/dynamic-graph-python
3 results
Show changes
Commits on Source (535)
# pre-commit run -a (Guilhem Saurel, 2022-07-27)
db4d991c9d727b8454695ce8d88948b948c6b36f
*.pyc
build
*~
include: http://rainboard.laas.fr/project/dynamic-graph-python/.gitlab-ci.yml
[submodule "cmake"]
path = cmake
url = https://github.com/jrl-umi3218/jrl-cmakemodules.git
exclude: tests/test_python-syntax_error.py
ci:
autoupdate_branch: 'devel'
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.6
hooks:
- id: clang-format
args: [--style=Google]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
tests/test_python-syntax_error.py
Authors:
#
# Copyright
#
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(PROJECT_NAME dynamic-graph-python)
project(${PROJECT_NAME})
SET(PROJECT_VERSION 1.0)
SET(CMAKE_VERBOSE_MAKEFILE true)
IF(WIN32)
SET(LIBDIR_KW "/LIBPATH:")
SET(LIBINCL_KW "")
SET(LIB_EXT ".lib")
ENDIF(WIN32)
IF(UNIX)
SET(LIBDIR_KW "-L")
SET(LIBINCL_KW "-l")
SET(LIB_EXT "")
ENDIF(UNIX)
#
# Look for dependencies
#
# Load Pkgconfig macros
INCLUDE(FindPkgConfig)
SET(PACKAGE_REQUIREMENTS "")
#
# Dependency to package dynamic-graph
#
SET(DYNAMIC_GRAPH_FOUND 0)
SET(DYNAMIC_GRAPH_REQUIRED "dynamic-graph >= 1.0")
PKG_CHECK_MODULES(DYNAMIC_GRAPH REQUIRED ${DYNAMIC_GRAPH_REQUIRED})
EXEC_PROGRAM(${PKG_CONFIG_EXECUTABLE} ARGS --variable=docdir dynamic-graph
OUTPUT_VARIABLE DYNAMIC_GRAPH_DOCDIR)
MESSAGE(STATUS "pkg-config: ${PKG_CONFIG_EXECUTABLE}")
MESSAGE(STATUS "DYNAMIC_GRAPH_DOCDIR=${DYNAMIC_GRAPH_DOCDIR}")
SET(DYNAMIC_GRAPH_FOUND 1)
IF(NOT ${DYNAMIC_GRAPH_FOUND})
MESSAGE(FATAL_ERROR "Check that package dynamic-graph is installed in a directory pointed out by PKG_CONFIG_PATH.")
ENDIF(NOT ${DYNAMIC_GRAPH_FOUND})
IF(PACKAGE_REQUIREMENTS STREQUAL "")
SET(PACKAGE_REQUIREMENTS ${DYNAMIC_GRAPH_REQUIRED})
ELSE(PACKAGE_REQUIREMENTS STREQUAL "")
SET(PACKAGE_REQUIREMENTS "${PACKAGE_REQUIREMENTS}, ${DYNAMIC_GRAPH_REQUIRED}")
ENDIF(PACKAGE_REQUIREMENTS STREQUAL "")
#
# pkg-config file
#
SET(install_pkg_prefix "\${prefix}")
SET(install_pkg_exec_prefix "\${exec_prefix}")
SET(install_pkg_libdir "\${libdir}")
SET(install_pkg_datarootdir "\${datarootdir}")
SET(install_pkg_include_dir "\${includedir}")
# Install the file in the appropriate place.
SET(install_libdir_pkgconfig ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc
DESTINATION ${install_libdir_pkgconfig}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE)
ADD_SUBDIRECTORY(src)
#
# Documentation produced by doxygen
#
INCLUDE(FindDoxygen)
IF(DOXYGEN_FOUND)
add_subdirectory(doc)
ENDIF(DOXYGEN_FOUND)
# Copyright 2010-2020, Florent Lamiraux, Thomas Moulard, Olivier Stasse, Guilhem
# Saurel, JRL, CNRS/AIST, LAAS-CNRS
cmake_minimum_required(VERSION 3.1)
# Project properties
set(PROJECT_ORG stack-of-tasks)
set(PROJECT_NAME dynamic-graph-python)
set(PROJECT_DESCRIPTION "Dynamic graph library Python bindings")
set(PROJECT_URL "https://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
# Project options
option(SUFFIX_SO_VERSION "Suffix library name with its version" ON)
# Project configuration
set(PROJECT_USE_CMAKE_EXPORT TRUE)
set(CUSTOM_HEADER_DIR "dynamic-graph/python")
set(CXX_DISABLE_WERROR TRUE)
set(DOXYGEN_USE_MATHJAX YES)
# JRL-cmakemodule setup
include(cmake/base.cmake)
include(cmake/boost.cmake)
# Project definition
compute_project_args(PROJECT_ARGS LANGUAGES CXX)
project(${PROJECT_NAME} ${PROJECT_ARGS})
check_minimal_cxx_standard(14 ENFORCE)
# Project dependencies
set(PYTHON_COMPONENTS Interpreter Development NumPy)
add_project_dependency(dynamic-graph 4.4.0 REQUIRED)
add_project_dependency(eigenpy 2.7.10 REQUIRED)
set(PYTHON_EXPORT_DEPENDENCY_MACROS
"list(APPEND PYTHON_COMPONENTS ${PYTHON_COMPONENTS})\n${PYTHON_EXPORT_DEPENDENCY_MACROS}"
)
if(BUILD_TESTING)
find_package(Boost REQUIRED COMPONENTS unit_test_framework)
endif(BUILD_TESTING)
if(Boost_VERSION GREATER 107299 OR Boost_VERSION_MACRO GREATER 107299)
# Silence a warning about a deprecated use of boost bind by boost >= 1.73
# without dropping support for boost < 1.73
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
endif()
# Main Library
set(${PROJECT_NAME}_HEADERS
include/${CUSTOM_HEADER_DIR}/api.hh
include/${CUSTOM_HEADER_DIR}/convert-dg-to-py.hh
include/${CUSTOM_HEADER_DIR}/dynamic-graph-py.hh
include/${CUSTOM_HEADER_DIR}/fwd.hh
include/${CUSTOM_HEADER_DIR}/interpreter.hh
include/${CUSTOM_HEADER_DIR}/module.hh
include/${CUSTOM_HEADER_DIR}/python-compat.hh
include/${CUSTOM_HEADER_DIR}/signal.hh
include/${CUSTOM_HEADER_DIR}/signal-wrapper.hh)
set(${PROJECT_NAME}_SOURCES
src/interpreter.cc src/dynamic_graph/python-compat.cc
src/dynamic_graph/entity-py.cc src/dynamic_graph/convert-dg-to-py.cc)
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
target_link_libraries(${PROJECT_NAME} PUBLIC dynamic-graph::dynamic-graph)
modernize_target_link_libraries(
${PROJECT_NAME}
SCOPE
PUBLIC
TARGETS
Python${PYTHON_VERSION_MAJOR}::Python
LIBRARIES
${PYTHON_LIBRARIES}
INCLUDE_DIRS
${PYTHON_INCLUDE_DIRS})
target_link_boost_python(${PROJECT_NAME} PUBLIC)
if(SUFFIX_SO_VERSION)
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
endif(SUFFIX_SO_VERSION)
target_compile_definitions(${PROJECT_NAME}
PRIVATE PYTHON_LIBRARY="${PYTHON_LIBRARY}")
install(
TARGETS ${PROJECT_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION lib)
add_subdirectory(src)
if(BUILD_TESTING)
add_subdirectory(tests)
endif(BUILD_TESTING)
install(FILES package.xml DESTINATION share/${PROJECT_NAME})
#
# Copyright (c)
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
BSD 2-Clause License
Copyright (c) 2011-2019, CNRS
Author: Stack of Tasks Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Write in this file the modifications you commit.
#
# Copyright
#
Installation instructions for library dynamic-graph-python
----------------------------------------------
It is recommended to create a specific directory to install this package.
mkdir build
cd build
cmake [Options] ..
make
make install
Options:
-DCMAKE_INSTALL_PREFIX=...
specifies the directory where to install the package.
-DCMAKE_BUILD_TYPE=[none|debug|release|relwithdebinfo|MinSizeRel]
specifies to type of compilation (release, debug, ...)
Write in this file the news related to package dynamic-graph-python.
See INSTALL for installation instruction.
# dynamic-graph-python
[![Building Status](https://travis-ci.org/stack-of-tasks/dynamic-graph-python.svg?branch=master)](https://travis-ci.org/stack-of-tasks/dynamic-graph-python)
[![Pipeline status](https://gitlab.laas.fr/stack-of-tasks/dynamic-graph-python/badges/master/pipeline.svg)](https://gitlab.laas.fr/stack-of-tasks/dynamic-graph-python/commits/master)
[![Coverage report](https://gitlab.laas.fr/stack-of-tasks/dynamic-graph-python/badges/master/coverage.svg?job=doc-coverage)](http://projects.laas.fr/stack-of-tasks/doc/stack-of-tasks/dynamic-graph-python/master/coverage/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/stack-of-tasks/dynamic-graph-python/master.svg)](https://results.pre-commit.ci/latest/github/stack-of-tasks/dynamic-graph-python)
Python bindings for dynamic-graph.
**Warning:** this repository contains [Git
submodules][git-submodules]. Please clone this repository using the
`git clone --recursive` command. If you already have cloned the
repository, you can run `git submodule init && git submodule update`
to retrieve the submodules.
## Documentation
[Online](https://gepettoweb.laas.fr/doc/stack-of-tasks/dynamic-graph-python/master/doxygen-html/)
## Getting Help
Support is provided through:
* the [issue tracker](https://github.com/stack-of-tasks/dynamic-graph-python/issues)
* the matrix room [#stack-of-tasks:laas.fr](https://matrix.to/#/#stack-of-tasks:laas.fr)
## How can I install dynamic-graph?
### Compiling and installing the package
The manual compilation requires two steps:
1. configuration of the build and generation of the build files
2. compilation of the sources and installation of the package
dynamic-graph uses CMake to generate build files. It is
recommended to create a separate build directory:
```sh
mkdir build
cd build
cmake ..
```
```sh
make
make test
make install
```
### Options
Additional options can be set on the command line through the
following command: `-D<option>=<value>`.
For instance: `cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..` will set
the `CMAKE_BUILD_TYPE` option to the value `RelWithDebInfo`.
Available options are:
- `CMAKE_BUILD_TYPE` set the build profile that should be used (debug,
release, etc.). We recommend `RelWithDebInfo` as it will provide
performances while keeping debugging symbols enabled.
- `CMAKE_INSTALL_PREFIX` set the installation prefix (the directory
where the software will be copied to after it has been compiled).
### Running the test suite
The test suite can be run from your build directory by running:
```sh
make test
```
Please open a ticket if some tests are failing on your computer, it
should not be the case.
echo ""
echo "This package is installed through cmake. Please read INSTALL for instructions."
echo ""
Subproject commit 08c2c18b9033c2f0a86b885b589f4fa63a163caf
#
# Copyright
#
# Configure package.dox file
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/package.dox.cmake
${CMAKE_CURRENT_BINARY_DIR}/package.dox
)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html
COMMAND ${DOXYGEN_EXECUTABLE} \"${CMAKE_CURRENT_BINARY_DIR}/package.dox\"
)
ADD_CUSTOM_TARGET(documentation ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)
#
# Install html documentation
#
# html files
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME})
# doxytag
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.doxytag
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}/html)
# pictures
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pictures
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}/html)
......@@ -8,4 +8,3 @@
</center>
</body>
</head>
......@@ -4,4 +4,3 @@
<LINK HREF="package.css" REL="stylesheet" TYPE="text/css">
</HEAD>
<BODY>