Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthou committed Dec 8, 2023
2 parents 2265b5a + ed02c8b commit 898d5e0
Show file tree
Hide file tree
Showing 145 changed files with 1,613 additions and 2,007 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
sudo apt update -qq
sudo apt install dpkg
sudo apt install -y ros-$ROS_DISTRO-desktop qtbase5-dev qtdeclarative5-dev
sudo apt install -y libcppunit-dev
sudo apt install -y libcppunit-dev libcurl4-openssl-dev
if [ $ROS_DISTRO != noetic ]
then
sudo apt-get install python-rosdep
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
/file_intern/*

*.pyc
catalog-v*

# VsCode files
settings.json
33 changes: 1 addition & 32 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@
- cd ..
- catkin_make -DCMAKE_BUILD_TYPE=Release

.test_script_template : &test_script_definition_py2
script:
- mkdir -p ~/ros_ws/src
- cd ~/ros_ws
- catkin_make -DCMAKE_BUILD_TYPE=Release
- cd src
- cp -r /builds/$GITLAB_USER_LOGIN/ontologenius .
- cd ..
- pip install requests --user
- source devel/setup.bash
- catkin_make -DCMAKE_BUILD_TYPE=Release
- source devel/setup.bash
- catkin_make run_tests_ontologenius_rostest -j1 -DCMAKE_BUILD_TYPE=Release && catkin_make test -j1 -DCMAKE_BUILD_TYPE=Release

.test_script_template : &test_script_definition_py3
script:
- mkdir -p ~/ros_ws/src
Expand All @@ -36,32 +22,15 @@
- source devel/setup.bash
- catkin_make run_tests_ontologenius_rostest -j1 -DCMAKE_BUILD_TYPE=Release && catkin_make test -j1 -DCMAKE_BUILD_TYPE=Release

.melodic_before_template : &melodic_before_definition
before_script:
- source /opt/ros/melodic/setup.bash
- apt-get update -qq && apt-get install -y libcppunit-1.14-0 libcppunit-dev libtinyxml-dev python-rosdep python-pip

.noetic_before_template : &noetic_before_definition
before_script:
- source /opt/ros/noetic/setup.bash
- apt-get update -qq && apt-get install -y libcppunit-1.15-0 libcppunit-dev libtinyxml-dev git-all python3-rosdep python3-pip
- apt-get update -qq && apt-get install -y libcppunit-1.15-0 libcppunit-dev libtinyxml-dev git-all python3-rosdep python3-pip libcurl4-openssl-dev

stages:
- build
- test

run-test-melodic:
stage: test
image: ros:melodic-perception-bionic
<<: *melodic_before_definition
<<: *test_script_definition_py2

run-build-melodic:
image: ros:melodic-perception-bionic
stage: build
<<: *melodic_before_definition
<<: *build_script_definition

run-test-noetic:
stage: test
image: ros:noetic-perception-focal
Expand Down
88 changes: 61 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ if(WITH_CLANG_TIDY)
endif()
include(cmake/Sanitizers.cmake)

function(add_onto_base_library TARGET)
if(NOT TARGET)
message(FATAL_ERROR "Expected the target name as first argument")
endif()
if(NOT ARGN)
message(FATAL_ERROR "Expected source file list after target name")
endif()
add_library(${TARGET} ${ARGN})
target_include_directories(${TARGET} PUBLIC include)
set_target_properties(${TARGET} PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON)
target_compile_options(${TARGET} PRIVATE -Wall -Wextra)
target_enable_sanitizers(${TARGET})
endfunction(add_onto_base_library)

function(add_onto_library TARGET)
if(NOT TARGET)
message(FATAL_ERROR "Expected the target name as first argument")
Expand All @@ -18,13 +32,27 @@ function(add_onto_library TARGET)
endif()
add_library(${TARGET} ${ARGN})
add_dependencies(${TARGET} ontologenius_gencpp ${catkin_EXPORTED_TARGETS})
target_include_directories(${TARGET} PUBLIC include PRIVATE ${catkin_INCLUDE_DIRS})
target_link_libraries(${TARGET} PRIVATE ${catkin_LIBRARIES})
target_include_directories(${TARGET} PUBLIC include ${catkin_INCLUDE_DIRS})
target_link_libraries(${TARGET} PUBLIC ${catkin_LIBRARIES}) # PRIVATE has been removed fot ontoloGUI
set_target_properties(${TARGET} PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON)
target_compile_options(${TARGET} PRIVATE -Wall -Wextra)
target_enable_sanitizers(${TARGET})
endfunction(add_onto_library)

function(add_onto_base_executable TARGET)
if(NOT TARGET)
message(FATAL_ERROR "Expected the target name as first argument")
endif()
if(NOT ARGN)
message(FATAL_ERROR "Expected source file list after target name")
endif()
add_executable(${TARGET} ${ARGN})
target_include_directories(${TARGET} PUBLIC include)
set_target_properties(${TARGET} PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON)
target_compile_options(${TARGET} PRIVATE -Wall -Wextra)
target_enable_sanitizers(${TARGET})
endfunction(add_onto_base_executable)

function(add_onto_executable TARGET)
if(NOT TARGET)
message(FATAL_ERROR "Expected the target name as first argument")
Expand All @@ -48,19 +76,21 @@ endfunction(add_onto_executable)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
roslib
std_msgs
genmsg
message_generation
pluginlib
)

## System dependencies are found with CMake's conventions
find_package(Boost REQUIRED COMPONENTS system)
find_package(cmake_modules REQUIRED)
find_package(TinyXML REQUIRED)
find_package(OpenCV REQUIRED)
find_package(pluginlib REQUIRED)
find_package(Qt5 COMPONENTS Core Gui Widgets PrintSupport)
find_package(PkgConfig REQUIRED)

pkg_search_module(CURL REQUIRED libcurl IMPORTED_TARGET GLOBAL)

# Install python scripts using distutils
catkin_python_setup()
Expand All @@ -82,7 +112,6 @@ catkin_python_setup()
## Generate services in the 'srv' folder
add_service_files(
FILES
REST.srv
OntologeniusConversion.srv
OntologeniusService.srv
OntologeniusIndexService.srv
Expand Down Expand Up @@ -124,7 +153,7 @@ catkin_package(
## CORE
##############################

add_onto_library(ontologenius_ontoGraphs_lib
add_onto_base_library(ontologenius_ontoGraphs_lib
src/core/ontoGraphs/Branchs/ClassBranch.cpp
src/core/ontoGraphs/Branchs/ObjectPropertyBranch.cpp
src/core/ontoGraphs/Branchs/DataPropertyBranch.cpp
Expand Down Expand Up @@ -158,10 +187,10 @@ target_include_directories(ontologenius_ontoGraphs_lib
)
target_link_libraries(ontologenius_ontoGraphs_lib
PUBLIC
${TinyXML_LIBRARIES}
${TinyXML_LIBRARIES} PkgConfig::CURL
)

add_onto_library(ontologenius_core_lib
add_onto_base_library(ontologenius_core_lib
src/core/feeder/Feeder.cpp
src/core/feeder/FeedStorage.cpp
src/core/feeder/Versionor.cpp
Expand All @@ -170,16 +199,19 @@ add_onto_library(ontologenius_core_lib
src/core/reasoner/Reasoners.cpp
src/core/reasoner/ConfigReader.cpp
)
target_include_directories(ontologenius_core_lib
PUBLIC ${pluginlib_INCLUDE_DIRS}
)
target_link_libraries(ontologenius_core_lib
PUBLIC
ontologenius_ontoGraphs_lib
ontologenius_ontoGraphs_lib ${pluginlib_LIBRARIES}
)

##############################
## DRAWER
##############################

add_onto_library(ontologenius_drawer_lib
add_onto_base_library(ontologenius_drawer_lib
src/graphical/versioning/TreeReader.cpp
src/graphical/versioning/TreeDrawer.cpp
)
Expand Down Expand Up @@ -221,6 +253,7 @@ add_onto_library(ontologenius_lib
src/API/ontologenius/OntologyManipulatorIndex.cpp
src/API/ontologenius/OntologiesManipulator.cpp
)
target_include_directories(ontologenius_lib PUBLIC include/ontologenius/API)
target_link_libraries(ontologenius_lib
PUBLIC
ontologenius_core_lib
Expand All @@ -229,7 +262,7 @@ target_link_libraries(ontologenius_lib
##############################
## PLUGINS
##############################
add_onto_library(ontologenius_reasoner_plugin
add_onto_base_library(ontologenius_reasoner_plugin
src/core/reasoner/plugins/ReasonerNone.cpp
src/core/reasoner/plugins/ReasonerInverseOf.cpp
src/core/reasoner/plugins/ReasonerSymetric.cpp
Expand All @@ -238,7 +271,21 @@ add_onto_library(ontologenius_reasoner_plugin
src/core/reasoner/plugins/ReasonerGeneralize.cpp
src/core/reasoner/plugins/ReasonerRangeDomain.cpp
)
target_include_directories(ontologenius_reasoner_plugin
PUBLIC ${pluginlib_INCLUDE_DIRS}
)
target_link_libraries(ontologenius_reasoner_plugin
PUBLIC
ontologenius_core_lib ${pluginlib_LIBRARIES}
)

add_onto_base_library(ontologenius_operators
src/core/ontologyOperators/differenceFinder.cpp
src/core/ontologyOperators/Sparql.cpp
src/core/ontologyOperators/SparqlSolver.cpp
src/core/ontologyOperators/SparqlUtils.cpp
)
target_link_libraries(ontologenius_operators
PUBLIC
ontologenius_core_lib
)
Expand All @@ -251,14 +298,10 @@ add_onto_library(ontologenius_interface
src/interface/RosInterface.cpp
src/interface/RosInterfaceStringHandlers.cpp
src/interface/RosInterfaceIndexHandlers.cpp
src/core/ontologyOperators/differenceFinder.cpp
src/core/ontologyOperators/Sparql.cpp
src/core/ontologyOperators/SparqlSolver.cpp
src/core/ontologyOperators/SparqlUtils.cpp
)
target_link_libraries(ontologenius_interface
PUBLIC
ontologenius_core_lib
ontologenius_core_lib ontologenius_operators
)

##############################
Expand All @@ -277,7 +320,7 @@ target_link_libraries(ontologenius PRIVATE ontologenius_interface)
add_onto_executable(ontologenius_multi src/nodes/ontologenius_multi.cpp)
target_link_libraries(ontologenius_multi PRIVATE ontologenius_interface)

add_onto_executable(ontologenius_draw src/graphical/versioning/main.cpp )
add_onto_base_executable(ontologenius_draw src/graphical/versioning/main.cpp )
target_link_libraries(ontologenius_draw PRIVATE ontologenius_drawer_lib ontologenius_core_lib)

##############################
Expand Down Expand Up @@ -362,16 +405,11 @@ set( QT_SOURCES
##############################################################################

add_executable(ontoloGUI ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP})
target_include_directories(ontoloGUI
PRIVATE
${catkin_INCLUDE_DIRS}
)
add_dependencies(ontoloGUI ontologenius_gencpp)
target_link_libraries(ontoloGUI
${catkin_LIBRARIES}
Qt5::Core
Qt5::Widgets
Qt5::PrintSupport
ontologenius_lib
)
install(TARGETS ontoloGUI RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

Expand All @@ -394,10 +432,6 @@ install(DIRECTORY include/${PROJECT_NAME}/
PATTERN ".svn" EXCLUDE
)

install(PROGRAMS scripts/REST.py
DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION}
)

install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ On this launcher file, you will find an argument indicating the path to the onto
You can add your own ontology files in the argument if you want them to be loaded at the beginning of the program.

[Release-Url]: https://sarthou.github.io/ontologenius/
[Release-image]: http://img.shields.io/badge/release-v0.3.1-1eb0fc.svg
[Release-image]: http://img.shields.io/badge/release-v0.3.2-1eb0fc.svg
29 changes: 27 additions & 2 deletions docs/Download.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html lang="en_US">

<head>
<title>Download | Ontologenius 0.3.1</title>
<title>Download | Ontologenius 0.3.2</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href="style/ontologenius_api.css" rel="stylesheet" type="text/css">
<link href="images/favicon.ico" rel="shortcut icon">
Expand Down Expand Up @@ -90,8 +90,33 @@ <h1 class="title">Download</h1>

<p>You have below the archives of the major versions of Ontologenius:</p>

<h2> V0.3.2 </h2>
<p>8 / 12 / 2023</p>

<ul>
<li>
<a href="https://github.com/sarthou/ontologenius/archive/v0.3.2.zip" rel="nofollow">
<svg class="octicon octicon-file-zip flex-shrink-0 text-gray" width="16" height="16" viewBox="0 0 12 16" version="1.1" aria-hidden="true">
<path fill-rule="evenodd" d="M8.5 1H1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V4.5L8.5 1zM11 14H1V2h3v1h1V2h3l3 3v9zM5 4V3h1v1H5zM4 4h1v1H4V4zm1 2V5h1v1H5zM4 6h1v1H4V6zm1 2V7h1v1H5zM4 9.28A2 2 0 0 0 3 11v1h4v-1a2 2 0 0 0-2-2V8H4v1.28zM6 10v1H4v-1h2z">
</path>
</svg>
<strong class="px-1">Source code</strong> (zip)
</a>
</li>

<li>
<a href="https://github.com/sarthou/ontologenius/archive/v0.3.2.tar.gz" rel="nofollow">
<svg class="octicon octicon-file-zip flex-shrink-0 text-gray" width="16" height="16" viewBox="0 0 12 16" version="1.1" aria-hidden="true">
<path fill-rule="evenodd" d="M8.5 1H1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V4.5L8.5 1zM11 14H1V2h3v1h1V2h3l3 3v9zM5 4V3h1v1H5zM4 4h1v1H4V4zm1 2V5h1v1H5zM4 6h1v1H4V6zm1 2V7h1v1H5zM4 9.28A2 2 0 0 0 3 11v1h4v-1a2 2 0 0 0-2-2V8H4v1.28zM6 10v1H4v-1h2z">
</path>
</svg>
<strong class="px-1">Source code</strong> (tar.gz)
</a>
</li>
</ul>

<h2> V0.3.1 </h2>
<p>XX / XX / 2023</p>
<p>12 / 09 / 2023</p>

<ul>
<li>
Expand Down
22 changes: 2 additions & 20 deletions docs/InstallOntologenius.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html lang="en_US">

<head>
<title>Install | Ontologenius 0.3.1</title>
<title>Install | Ontologenius 0.3.2</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href="style/ontologenius_api.css" rel="stylesheet" type="text/css">
<link href="images/favicon.ico" rel="shortcut icon">
Expand Down Expand Up @@ -94,31 +94,13 @@ <h3>

<div class="context">
<h1 class="title">Install Ontologenius</h1>
<p>Since Ontologenius is a ROS package, make sure that ROS is installed on your platform. Ontologenius is fully supported and maintained on <a class="type" href="http://wiki.ros.org/melodic/Installation">ROS Melodic Morenia</a> and <a class="type" href="http://wiki.ros.org/noetic/Installation">ROS Noetic Ninjemys</a>. Desktop ROS configuration is not required for use of ontologenius.</p>
<p>Since Ontologenius is a ROS package, make sure that ROS is installed on your platform. Ontologenius is fully supported and maintained on <a class="type" href="http://wiki.ros.org/noetic/Installation">ROS Noetic Ninjemys</a>. Desktop ROS configuration is not required for use of ontologenius.</p>

<p>Clone the package on your catkin workspace:</p>
<div class="code_block">
<p>cd ~/catkin_ws/src/</br></br>git clone https://github.com/sarthou/ontologenius.git</br></br>cd ..</br></br>catkin_make</p>
</div>

<p>If you want to load ontologies from the internet, you will need the requests package. Ontologenius uses it to make HTTP requests.</p>
<p class="tip">This installation is optional</p>

<p>You can install it through pip:</p>
<div class="code_block">
<p>pip install requests --user</p>
</div>

<p>You can also install it from the source in the catkin_ws:</p>
<div class="code_block">
<p>git clone https://github.com/kennethreitz/requests.git</br></br>export PYTHONPATH=~/catkin_ws/devel/lib/python2.7/site-packages:$PYTHONPATH</br></br>cd requests</br></br>python setup.py install --prefix=~/catkin_ws/devel</p>
</div>

<p class="tip">you might have to create ~/catkin_ws/devel/lib/python2.7/site-packages</p>
<div class="code_block">
<p>mkdir ~/catkin_ws/devel/lib/python2.7/site-packages</p>
</div>

<h2>Troubles</h2>
<p>If you have the following error :</p>
<div class="code_block">
Expand Down
2 changes: 1 addition & 1 deletion docs/Publications.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html lang="en_US">

<head>
<title>Publications | Ontologenius 0.3.1</title>
<title>Publications | Ontologenius 0.3.2</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href="style/ontologenius_api.css" rel="stylesheet" type="text/css">
<link href="images/favicon.ico" rel="shortcut icon">
Expand Down
Loading

0 comments on commit 898d5e0

Please sign in to comment.