Giter VIP home page Giter VIP logo

neem-validator's Introduction

NEEM validator

Running the NEEM validator on a local machine

The NEEM validator is a ROS package to validate NEEMs that have been recorded by following the specifications in the NEEM-Handbook (https://ease-crc.github.io/soma/owl/current/NEEM-Handbook.pdf) by the project EASE (https://ease-crc.org).

Prerequisites

Python 2.7 libraries:

  • pymongo
  • rdflib
  • ansi2html

Installation on a local machine

Pull this repository into the src directory of KnowRob's catkin workspace (e.g ~/catkin_ws/src) and source the workspace:

cd ~/catkin_ws
catkin_make
source ~/catkin_ws/devel/setup.bash

To start the NEEM validator, you can run roslaunch with the following arguments:

  • path_to_neem (required): absolute path to the NEEM that has to be validated
  • terminate (default: False): whether KnowRob should continue running after this validator has died
  • workflow_file (default: settings/pipeline_workflow.yaml): relative path to the workflow definition
  • logging (default: False): whether timestamps for tthe different checks should be recorded and displayed

To start the default configurations for a NEEM, located at /home/me/neems/mynewneem, you can run

roslaunch neem_validator validator.launch path_to_neem:=/home/me/neems/mynewneem

Careful: The default configuration of the NEEM validator removes all contents from the Mongo database linked in your KnowRob instance and your environment variables (normally, this is the roslog database). It then uploads the NEEM data to this Mongo database. If you want to validate the NEEM data that are already stored in your MongoDB without removing them, just remove the following two lines from the Stages list in the settings/pipeline_workflow.yaml:

  - clear_mongo_collections
  - mongorestore

Results

  • The validation results are printed to rosout and stored in logs/validation_results.
  • In case logging was activated, the timestamps are stored in logs/time.
  • The OWLReasonerCheck runs SOMA's "uglify" script on the OWL files. The result is stored in logs/uglify.owl.

Customizing the workflow

The default workflow file can be found in settings/pipeline_workflow.yaml.

The workflow file defines the checks that are called aswell as their configuration. The python docstring in the checks located at src/checks/ tells the user, which attributes are available and which ones are required per check.

Every check can be called multiple times with different configurations.

The Stages entry may occur only once and determines the order in which the checks are called.

Running the NEEM validator in a local Docker image

  1. Clone this repository.
  2. Navigate to the docker directory
  3. Create a neem folder and copy the NEEM you want to validate there.
  4. Run docker-compose up
  5. The logs directory contains your validation results

Running the NEEM validator as a GitLab CI/CD pipeline

  1. A GitLab instance with a GitLab runner that runs Docker container has to be installed.
  2. Create a customized version of the gitlab-ci.yml (or use the default, located at ci-pipeline/gitlab-ci.yml).
  3. If you use a customized version of the NEEM validator, you should also adjust the docker/Dockerfile, build it, upload it, and link the uploaded docker image in your gitlab-ci.yml.
  4. Open the GitLab admin area and navigate to settings -> CI/CD: https://YURGITLAB.org/admin/application_settings/ci_cd. Under "Continuous Integration and Deployment" navigate to "Default CI/CD configuration file" and insert a link to your version of the gitlab-ci.yml.

neem-validator's People

Contributors

jeremiasthun avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

sasjonge

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.