ATTX-project / graphframing-service

JSON-LD framing service.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graph Framing Service

Current directory contains:

  • indexing-service implementation in src/ldframe folder

VERSION: 0.2

Docker container

Using the Graph Framing Service Docker container:

  • docker pull attxproject/ldframe-service:dev in the current folder;
  • running the container docker run -d -p 4303:4303 attxproject/ldframe-service:dev runs the container in detached mode on the 4303 port (production version should have this port hidden);
  • using the endpoints http://localhost:4303/{versionNb}/{endpoint} or the other listed below.

The version number is specified in src/ldframe/app.py under version variable.

Overview

The Graph Framing service take as an input an RDF graph (in Turtle format) and applies a JSON-LD frame and prepares the output to be indexed in Elasticsearch by extracting the document type and attaching an document ID for each RDF graph generated by the JSON-LD frame.

Full information on how to run and work with the Indexing Service available at: https://attx-project.github.io/Service-Graph-Framing.html

API Endpoints

The Indexing REST API has the following endpoints:

  • health - checks if the application is running.

Develop

Requirements

  1. Python 2.7
  2. Gradle 3.0+ https://gradle.org/
  3. Pypi Ivy repository either a local one (see https://github.com/linkedin/pygradle/blob/master/docs/pivy-importer.md for more information) or you can deploy your own version using https://github.com/blankdots/ivy-pypi-repo

Building the Artifact with Gradle

Install gradle. The tasks available are listed below:

  • do clean build: gradle clean build
  • see tasks: gradle tasks --all and depenencies gradle depenencies
  • see test coverage gradle pytest coverage it will generate a html report in htmlcov

Run without Gradle

To run the server, please execute the following (preferably in a virtual environment):

pip install -r pinned.txt
python src/ldframe/frameservice.py server
python src/ldframe/frameservice.py rpc

For testing purposes the application requires a running Graph Manager Service, RabbitMQ. Also the health endpoint provides information on running services the service has detected: http://localhost:4303/health

About

JSON-LD framing service.


Languages

Language:Python 100.0%