Skip to content

About A generic pipeline that can be used to map raw data to RDF.

License

Notifications You must be signed in to change notification settings

MI-FraunhoferIWM/data2rdf

Repository files navigation

data2rdf

A pipeline for generating data representation in RDF out of raw data given in ASCII, CSV, JSON or EXCEL format.

https://data2rdf.readthedocs.io/en/latest/

Coverage

Coverage Report
FileStmtsMissCoverMissing
data2rdf
   init.py50100% 
   config.py190100% 
   utils.py811 88%
   warnings.py20100% 
data2rdf/models
   init.py30100% 
   base.py5455 91%
   graph.py10077 93%
   mapping.py3911 97%
   utils.py581414 76%
data2rdf/modes
   init.py40100% 
data2rdf/parsers
   init.py60100% 
   base.py1351111 92%
   csv.py1682020 88%
   excel.py1741717 90%
   json.py2053737 82%
   utils.py881010 89%
data2rdf/pipelines
   init.py20100% 
   main.py8299 89%
data2rdf/qudt
   init.py00100% 
   utils.py421212 71%
TOTAL119414488% 

Installation

Install for using the package

Either install the package from the pypi

pip install data2rdf

Install for development

Install the package from the source code:

git clone [email protected]:MI-FraunhoferIWM/data2rdf.git
cd data2rdf
pip install -e .

Unit tests

Before running the unit tests, please install the needed packages:

pip install data2rdf[tests]

Afterwards, run the unittest with:

pytest

Building the docs locally

HTML

A server will start, generate the docs and listen for changes in the source files. This can be done by using docker or installing the development environment directly on the you machine. Next are installation guides for Docker and Linux OS.

Docker

First, build the Docker image by running the following command:

$ docker build -f docs.Dockerfile -t data2rdf-docs .

Then, start the program by running:

$ docker run -it --rm -v $PWD:/app -p 8000:8000 data2rdf-docs

Linux

At an OS level (these commands work on Linux Debian):

$ sudo apt install pandoc graphviz default-jre
$ sudo apt-get install texlive-latex-recommended \
                       texlive-latex-extra \
                       texlive-fonts-recommended \
                       latexmk

The python dependencies:

$ pip install .[docs]

Now you can start the server and render the docs:

$ sphinx-autobuild docs/source docs/build/html

The documentation will be available on http://127.0.0.1:8000.

PDF (LaTeX)

To generate a PDF of the documentation, simply run (from the root project folder):

make -C docs latexpdf

The generated PDF can be found under docs/build/latex/data2rdf_docs.pdf