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 Report
File | Stmts | Miss | Cover | Missing |
---|---|---|---|---|
data2rdf | ||||
init.py | 5 | 0 | 100% | |
config.py | 19 | 0 | 100% | |
utils.py | 8 | 1 | 1 | 88% |
warnings.py | 2 | 0 | 100% | |
data2rdf/models | ||||
init.py | 3 | 0 | 100% | |
base.py | 54 | 5 | 5 | 91% |
graph.py | 100 | 7 | 7 | 93% |
mapping.py | 39 | 1 | 1 | 97% |
utils.py | 58 | 14 | 14 | 76% |
data2rdf/modes | ||||
init.py | 4 | 0 | 100% | |
data2rdf/parsers | ||||
init.py | 6 | 0 | 100% | |
base.py | 135 | 11 | 11 | 92% |
csv.py | 168 | 20 | 20 | 88% |
excel.py | 174 | 17 | 17 | 90% |
json.py | 205 | 37 | 37 | 82% |
utils.py | 88 | 10 | 10 | 89% |
data2rdf/pipelines | ||||
init.py | 2 | 0 | 100% | |
main.py | 82 | 9 | 9 | 89% |
data2rdf/qudt | ||||
init.py | 0 | 0 | 100% | |
utils.py | 42 | 12 | 12 | 71% |
TOTAL | 1194 | 144 | 88% |
Either install the package from the pypi
pip install data2rdf
Install the package from the source code:
git clone [email protected]:MI-FraunhoferIWM/data2rdf.git
cd data2rdf
pip install -e .
Before running the unit tests, please install the needed packages:
pip install data2rdf[tests]
Afterwards, run the unittest with:
pytest
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.
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
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
.
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