# 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> <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> </td></tr><tr><td> <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> <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> <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> </td></tr><tr><td colspan="5"><b>data2rdf/models</b></td></tr><tr><td> <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> </td></tr><tr><td> <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> <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> <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> <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> <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> </td></tr><tr><td colspan="5"><b>data2rdf/parsers</b></td></tr><tr><td> <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> </td></tr><tr><td> <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> <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> <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> <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> <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> <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> </td></tr><tr><td> <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> <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> </td></tr><tr><td> <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> </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
Raw data
{
"_id": null,
"home_page": "https://github.com/MI-FraunhoferIWM/data2rdf",
"name": "data2rdf",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Paul Zierep, Yoav Nahshon, Pablo de Andres, Deepu Krishnareddy, Matthias B\u00fcschelberger",
"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",
"download_url": "https://files.pythonhosted.org/packages/e4/da/6c78e1c6e7500029c1b4a7a46bfae11af69e9c1ce0d0ba3ff38dc9f0242c/data2rdf-2.3.0.tar.gz",
"platform": null,
"description": "# data2rdf\n\nA pipeline for generating data representation in RDF out of raw data given in ASCII, CSV, JSON or EXCEL format.\n\nhttps://data2rdf.readthedocs.io/en/latest/\n\n<!-- Pytest Coverage Comment:Begin -->\n<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> <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> </td></tr><tr><td> <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> <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> <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> </td></tr><tr><td colspan=\"5\"><b>data2rdf/models</b></td></tr><tr><td> <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> </td></tr><tr><td> <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> <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> <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> <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> <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> </td></tr><tr><td colspan=\"5\"><b>data2rdf/parsers</b></td></tr><tr><td> <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> </td></tr><tr><td> <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> <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> <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> <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> <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> <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> </td></tr><tr><td> <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> <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> </td></tr><tr><td> <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> </td></tr></tbody></table></details>\n<!-- Pytest Coverage Comment:End -->\n\n# Installation\n\n## Install for using the package\n\nEither install the package from the pypi\n\n```bash\npip install data2rdf\n```\n\n\n## Install for development\nInstall the package from the source code:\n```bash\ngit clone git@github.com:MI-FraunhoferIWM/data2rdf.git\ncd data2rdf\npip install -e .\n```\n\n# Unit tests\n\nBefore running the unit tests, please install the needed packages:\n\n```{bash}\npip install data2rdf[tests]\n```\n\nAfterwards, run the unittest with:\n\n```{bash}\npytest\n```\n\n# Building the docs locally\n### HTML\n\nA server will start, generate the docs and listen for changes in the source files.\nThis 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.\n\n#### Docker\n\nFirst, build the Docker image by running the following command:\n\n```shell\n$ docker build -f docs.Dockerfile -t data2rdf-docs .\n```\n\nThen, start the program by running:\n\n```shell\n$ docker run -it --rm -v $PWD:/app -p 8000:8000 data2rdf-docs\n```\n\n#### Linux\n\nAt an OS level (these commands work on Linux Debian):\n\n```shell\n$ sudo apt install pandoc graphviz default-jre\n$ sudo apt-get install texlive-latex-recommended \\\n texlive-latex-extra \\\n texlive-fonts-recommended \\\n latexmk\n```\n\nThe python dependencies:\n\n```shell\n$ pip install .[docs]\n```\n\nNow you can start the server and render the docs:\n\n```\n$ sphinx-autobuild docs/source docs/build/html\n```\n\nThe documentation will be available on [`http://127.0.0.1:8000`](http://127.0.0.1:8000).\n\n### PDF (LaTeX)\n\nTo generate a PDF of the documentation, simply run (from the root project folder):\n\n```sh\nmake -C docs latexpdf\n```\n\nThe generated PDF can be found under docs/build/latex/data2rdf_docs.pdf\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "A generic pipeline that can be used to map raw data to RDF.",
"version": "2.3.0",
"project_urls": {
"Homepage": "https://github.com/MI-FraunhoferIWM/data2rdf"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aa62bb1a249b9602915511c176e39ee0318c3dffc51c0387ccad154aa82dae8a",
"md5": "4497d7c3844c43704f863d7865ced81f",
"sha256": "20e2737c386b818be89316eb6db58bfa7ad52173060b0b0de6d4cd4eaa221bcd"
},
"downloads": -1,
"filename": "data2rdf-2.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4497d7c3844c43704f863d7865ced81f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 68632,
"upload_time": "2024-12-03T22:15:42",
"upload_time_iso_8601": "2024-12-03T22:15:42.622089Z",
"url": "https://files.pythonhosted.org/packages/aa/62/bb1a249b9602915511c176e39ee0318c3dffc51c0387ccad154aa82dae8a/data2rdf-2.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e4da6c78e1c6e7500029c1b4a7a46bfae11af69e9c1ce0d0ba3ff38dc9f0242c",
"md5": "44617aead27212b06b5cf1c4e85609f9",
"sha256": "9a9670aa30c0d9fc81ac6c49023dccb53af3d8a7d6f07c96e9939bc9dfca9dc0"
},
"downloads": -1,
"filename": "data2rdf-2.3.0.tar.gz",
"has_sig": false,
"md5_digest": "44617aead27212b06b5cf1c4e85609f9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 41348,
"upload_time": "2024-12-03T22:15:43",
"upload_time_iso_8601": "2024-12-03T22:15:43.948485Z",
"url": "https://files.pythonhosted.org/packages/e4/da/6c78e1c6e7500029c1b4a7a46bfae11af69e9c1ce0d0ba3ff38dc9f0242c/data2rdf-2.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-03 22:15:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MI-FraunhoferIWM",
"github_project": "data2rdf",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "data2rdf"
}