Metadata-Version: 2.1
Name: data2rdf
Version: 2.4.0.dev1
Summary: A generic pipeline that can be used to map raw data to RDF.
Home-page: https://github.com/MI-FraunhoferIWM/data2rdf
Author: Paul Zierep, Yoav Nahshon, Pablo de Andres, Deepu Krishnareddy, Matthias Büschelberger
Author-email: matthias.bueschelberger@iwm.fraunhofer.de, yoav.nahshon@iwm.fraunhofer.de, pablo.de.andres@iwm.fraunhofer.de, deepu.krishnareddy@iwm.fraunhofer.de, matthias.bueschelberger@iwm.fraunhofer.de
License: BSD-3-Clause
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jsonpath-ng~=1.6.1
Requires-Dist: lru-cache<1
Requires-Dist: openpyxl<4,>=3
Requires-Dist: pandas<3,>=2
Requires-Dist: pydantic<3,>=2
Requires-Dist: pydantic-settings
Requires-Dist: rdflib<7,>=6
Requires-Dist: requests
Requires-Dist: tables<4,>=3
Provides-Extra: dev
Requires-Dist: bumpver==2021.1114; extra == "dev"
Requires-Dist: dunamai==1.7.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: html5lib==1.1; extra == "docs"
Requires-Dist: ipython==8.12.3; extra == "docs"
Requires-Dist: jinja2==3.1.3; extra == "docs"
Requires-Dist: jupyter==1.0.0; extra == "docs"
Requires-Dist: myst-parser==2.0.0; extra == "docs"
Requires-Dist: nbsphinx==0.9.3; extra == "docs"
Requires-Dist: sphinx==6.2.1; extra == "docs"
Requires-Dist: sphinx-autobuild==2021.3.14; extra == "docs"
Requires-Dist: sphinx-book-theme==1.0.1; extra == "docs"
Requires-Dist: sphinx-copybutton==0.5.2; extra == "docs"
Requires-Dist: sphinx-design==0.5.0; extra == "docs"
Requires-Dist: sphinxcontrib-redoc==1.6.0; extra == "docs"
Provides-Extra: pre-commit
Requires-Dist: pre-commit==2.15.0; extra == "pre-commit"
Provides-Extra: tests
Requires-Dist: pytest==8.2.2; extra == "tests"
Requires-Dist: pytest-cov==5.0.0; extra == "tests"

# 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/

<!-- Pytest Coverage Comment:Begin -->
<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/README.md"><img alt="Coverage" src="https://img.shields.io/badge/Coverage-88%25-green.svg" /></a><details><summary>Coverage Report </summary><table><tr><th>File</th><th>Stmts</th><th>Miss</th><th>Cover</th><th>Missing</th></tr><tbody><tr><td colspan="5"><b>data2rdf</b></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/__init__.py">__init__.py</a></td><td>5</td><td>0</td><td>100%</td><td>&nbsp;</td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/config.py">config.py</a></td><td>26</td><td>1</td><td>1</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/config.py#L 96%"> 96%</a></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/utils.py">utils.py</a></td><td>8</td><td>1</td><td>1</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/utils.py#L 88%"> 88%</a></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/warnings.py">warnings.py</a></td><td>2</td><td>0</td><td>100%</td><td>&nbsp;</td></tr><tr><td colspan="5"><b>data2rdf/models</b></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/models/__init__.py">__init__.py</a></td><td>3</td><td>0</td><td>100%</td><td>&nbsp;</td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/models/base.py">base.py</a></td><td>54</td><td>5</td><td>5</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/models/base.py#L 91%"> 91%</a></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/models/graph.py">graph.py</a></td><td>119</td><td>7</td><td>7</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/models/graph.py#L 94%"> 94%</a></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/models/mapping.py">mapping.py</a></td><td>45</td><td>1</td><td>1</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/models/mapping.py#L 98%"> 98%</a></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/models/utils.py">utils.py</a></td><td>58</td><td>14</td><td>14</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/models/utils.py#L 76%"> 76%</a></td></tr><tr><td colspan="5"><b>data2rdf/modes</b></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/modes/__init__.py">__init__.py</a></td><td>4</td><td>0</td><td>100%</td><td>&nbsp;</td></tr><tr><td colspan="5"><b>data2rdf/parsers</b></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/parsers/__init__.py">__init__.py</a></td><td>6</td><td>0</td><td>100%</td><td>&nbsp;</td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/parsers/base.py">base.py</a></td><td>135</td><td>11</td><td>11</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/parsers/base.py#L 92%"> 92%</a></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/parsers/csv.py">csv.py</a></td><td>168</td><td>20</td><td>20</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/parsers/csv.py#L 88%"> 88%</a></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/parsers/excel.py">excel.py</a></td><td>183</td><td>17</td><td>17</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/parsers/excel.py#L 91%"> 91%</a></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/parsers/json.py">json.py</a></td><td>216</td><td>37</td><td>37</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/parsers/json.py#L 83%"> 83%</a></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/parsers/utils.py">utils.py</a></td><td>90</td><td>10</td><td>10</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/parsers/utils.py#L 89%"> 89%</a></td></tr><tr><td colspan="5"><b>data2rdf/pipelines</b></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/pipelines/__init__.py">__init__.py</a></td><td>2</td><td>0</td><td>100%</td><td>&nbsp;</td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/pipelines/main.py">main.py</a></td><td>82</td><td>9</td><td>9</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/pipelines/main.py#L 89%"> 89%</a></td></tr><tr><td colspan="5"><b>data2rdf/qudt</b></td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/qudt/__init__.py">__init__.py</a></td><td>0</td><td>0</td><td>100%</td><td>&nbsp;</td></tr><tr><td>&nbsp; &nbsp;<a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/qudt/utils.py">utils.py</a></td><td>42</td><td>12</td><td>12</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/qudt/utils.py#L 71%"> 71%</a></td></tr><tr><td><b>TOTAL</b></td><td><b>1248</b></td><td><b>145</b></td><td><b>88%</b></td><td>&nbsp;</td></tr></tbody></table></details>
<!-- Pytest Coverage Comment:End -->

# Installation

## Install for using the package

Either install the package from the pypi

```bash
pip install data2rdf
```


## Install for development
Install the package from the source code:
```bash
git clone git@github.com:MI-FraunhoferIWM/data2rdf.git
cd data2rdf
pip install -e .
```

# Unit tests

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

```{bash}
pip install data2rdf[tests]
```

Afterwards, run the unittest with:

```{bash}
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:

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

Then, start the program by running:

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

#### Linux

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

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

The python dependencies:

```shell
$ 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`](http://127.0.0.1:8000).

### PDF (LaTeX)

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

```sh
make -C docs latexpdf
```

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