data2rdf 2.4.0.dev0__tar.gz → 2.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/PKG-INFO +3 -3
  2. data2rdf-2.4.1/README.md +98 -0
  3. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/config.py +1 -6
  4. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/models/base.py +4 -4
  5. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/models/graph.py +24 -24
  6. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/models/mapping.py +13 -4
  7. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/parsers/base.py +59 -49
  8. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/parsers/csv.py +52 -46
  9. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/parsers/excel.py +42 -44
  10. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/parsers/json.py +87 -54
  11. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/parsers/utils.py +0 -23
  12. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/pipelines/main.py +54 -35
  13. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/qudt/utils.py +2 -2
  14. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf.egg-info/PKG-INFO +3 -3
  15. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/setup.cfg +1 -1
  16. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_empty_rows/test_parser.py +10 -8
  17. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_empty_rows/test_pipeline.py +11 -9
  18. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_pipeline_test/test_parser.py +86 -26
  19. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_pipeline_test/test_pipeline.py +127 -17
  20. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_without_header/test_parser.py +10 -8
  21. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_without_header/test_pipeline.py +11 -9
  22. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/json_custom_relations/test_json_custom_relations.py +84 -2
  23. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/json_pipeline_test/test_parser.py +19 -13
  24. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/json_pipeline_test/test_pipeline.py +19 -13
  25. data2rdf-2.4.1/tests/abox/utils.py +101 -0
  26. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/xls_pipeline_test/test_parser.py +61 -25
  27. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/xls_pipeline_test/test_pipeline.py +148 -17
  28. data2rdf-2.4.0.dev0/README.md +0 -98
  29. data2rdf-2.4.0.dev0/tests/abox/utils.py +0 -49
  30. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/LICENSE +0 -0
  31. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/__init__.py +0 -0
  32. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/models/__init__.py +0 -0
  33. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/models/utils.py +0 -0
  34. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/modes/__init__.py +0 -0
  35. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/parsers/__init__.py +0 -0
  36. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/pipelines/__init__.py +0 -0
  37. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/qudt/__init__.py +0 -0
  38. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/utils.py +0 -0
  39. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf/warnings.py +0 -0
  40. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf.egg-info/SOURCES.txt +0 -0
  41. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf.egg-info/dependency_links.txt +0 -0
  42. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf.egg-info/requires.txt +0 -0
  43. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/data2rdf.egg-info/top_level.txt +0 -0
  44. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/setup.py +0 -0
  45. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/__init__.py +0 -0
  46. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/__init__.py +0 -0
  47. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_empty_rows/__init__.py +0 -0
  48. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_empty_rows/output/__init__.py +0 -0
  49. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_pipeline_test/__init__.py +0 -0
  50. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_pipeline_test/input/__init__.py +0 -0
  51. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_without_header/__init__.py +0 -0
  52. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_without_header/input/__init__.py +0 -0
  53. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_without_header/input/data/__init__.py +0 -0
  54. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_without_header/input/data/test.csv +0 -0
  55. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_without_header/input/mapping/__init__.py +0 -0
  56. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/csv_without_header/output/__init__.py +0 -0
  57. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/dict_custom_properties/__init__.py +0 -0
  58. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/dict_custom_properties/test_pipeline.py +0 -0
  59. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/json_custom_relations/__init__.py +0 -0
  60. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/json_multiple_iris/__init__.py +0 -0
  61. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/json_multiple_iris/test_multiple_iris.py +0 -0
  62. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/json_pipeline_test/__init__.py +0 -0
  63. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/test_models.py +0 -0
  64. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/xls_custom_relations/__init__.py +0 -0
  65. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/xls_custom_relations/test_xlsx_custom_relations.py +0 -0
  66. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/abox/xls_pipeline_test/__init__.py +0 -0
  67. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/tbox/__init__.py +0 -0
  68. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/tbox/csv_pipeline_test/__init__.py +0 -0
  69. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/tbox/csv_pipeline_test/test_parser.py +0 -0
  70. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/tbox/csv_pipeline_test/test_pipeline.py +0 -0
  71. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/tbox/explicit_datatypes/__init__.py +0 -0
  72. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/tbox/explicit_datatypes/test_explicit_datatypes.py +0 -0
  73. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/tbox/json_pipeline_test/__init__.py +0 -0
  74. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/tbox/json_pipeline_test/test_parser.py +0 -0
  75. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/tbox/json_pipeline_test/test_pipeline.py +0 -0
  76. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/tbox/json_pipeline_test/test_title_exclusion.py +0 -0
  77. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/tbox/xls_pipeline_test/__init__.py +0 -0
  78. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/tbox/xls_pipeline_test/test_parser.py +0 -0
  79. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/tbox/xls_pipeline_test/test_pipeline.py +0 -0
  80. {data2rdf-2.4.0.dev0 → data2rdf-2.4.1}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: data2rdf
3
- Version: 2.4.0.dev0
3
+ Version: 2.4.1
4
4
  Summary: A generic pipeline that can be used to map raw data to RDF.
5
5
  Home-page: https://github.com/MI-FraunhoferIWM/data2rdf
6
6
  Author: Paul Zierep, Yoav Nahshon, Pablo de Andres, Deepu Krishnareddy, Matthias Büschelberger
@@ -52,7 +52,7 @@ A pipeline for generating data representation in RDF out of raw data given in AS
52
52
  https://data2rdf.readthedocs.io/en/latest/
53
53
 
54
54
  <!-- Pytest Coverage Comment:Begin -->
55
- <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>
55
+ <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>27</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>12</td><td>2</td><td>2</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/utils.py#L 83%"> 83%</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>3</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>53</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>144</td><td>8</td><td>8</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>47</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>153</td><td>17</td><td>17</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/parsers/base.py#L 89%"> 89%</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>229</td><td>39</td><td>39</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>95</td><td>16</td><td>16</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/pipelines/main.py#L 83%"> 83%</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>55</td><td>16</td><td>16</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>1337</b></td><td><b>166</b></td><td><b>88%</b></td><td>&nbsp;</td></tr></tbody></table></details>
56
56
  <!-- Pytest Coverage Comment:End -->
57
57
 
58
58
  # Installation
@@ -0,0 +1,98 @@
1
+ # data2rdf
2
+
3
+ A pipeline for generating data representation in RDF out of raw data given in ASCII, CSV, JSON or EXCEL format.
4
+
5
+ https://data2rdf.readthedocs.io/en/latest/
6
+
7
+ <!-- Pytest Coverage Comment:Begin -->
8
+ <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>27</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>12</td><td>2</td><td>2</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/utils.py#L 83%"> 83%</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>3</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>53</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>144</td><td>8</td><td>8</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>47</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>153</td><td>17</td><td>17</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/parsers/base.py#L 89%"> 89%</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>229</td><td>39</td><td>39</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>95</td><td>16</td><td>16</td><td><a href="https://github.com/MI-FraunhoferIWM/data2rdf/blob/main/data2rdf/pipelines/main.py#L 83%"> 83%</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>55</td><td>16</td><td>16</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>1337</b></td><td><b>166</b></td><td><b>88%</b></td><td>&nbsp;</td></tr></tbody></table></details>
9
+ <!-- Pytest Coverage Comment:End -->
10
+
11
+ # Installation
12
+
13
+ ## Install for using the package
14
+
15
+ Either install the package from the pypi
16
+
17
+ ```bash
18
+ pip install data2rdf
19
+ ```
20
+
21
+
22
+ ## Install for development
23
+ Install the package from the source code:
24
+ ```bash
25
+ git clone git@github.com:MI-FraunhoferIWM/data2rdf.git
26
+ cd data2rdf
27
+ pip install -e .
28
+ ```
29
+
30
+ # Unit tests
31
+
32
+ Before running the unit tests, please install the needed packages:
33
+
34
+ ```{bash}
35
+ pip install data2rdf[tests]
36
+ ```
37
+
38
+ Afterwards, run the unittest with:
39
+
40
+ ```{bash}
41
+ pytest
42
+ ```
43
+
44
+ # Building the docs locally
45
+ ### HTML
46
+
47
+ A server will start, generate the docs and listen for changes in the source files.
48
+ 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.
49
+
50
+ #### Docker
51
+
52
+ First, build the Docker image by running the following command:
53
+
54
+ ```shell
55
+ $ docker build -f docs.Dockerfile -t data2rdf-docs .
56
+ ```
57
+
58
+ Then, start the program by running:
59
+
60
+ ```shell
61
+ $ docker run -it --rm -v $PWD:/app -p 8000:8000 data2rdf-docs
62
+ ```
63
+
64
+ #### Linux
65
+
66
+ At an OS level (these commands work on Linux Debian):
67
+
68
+ ```shell
69
+ $ sudo apt install pandoc graphviz default-jre
70
+ $ sudo apt-get install texlive-latex-recommended \
71
+ texlive-latex-extra \
72
+ texlive-fonts-recommended \
73
+ latexmk
74
+ ```
75
+
76
+ The python dependencies:
77
+
78
+ ```shell
79
+ $ pip install .[docs]
80
+ ```
81
+
82
+ Now you can start the server and render the docs:
83
+
84
+ ```
85
+ $ sphinx-autobuild docs/source docs/build/html
86
+ ```
87
+
88
+ The documentation will be available on [`http://127.0.0.1:8000`](http://127.0.0.1:8000).
89
+
90
+ ### PDF (LaTeX)
91
+
92
+ To generate a PDF of the documentation, simply run (from the root project folder):
93
+
94
+ ```sh
95
+ make -C docs latexpdf
96
+ ```
97
+
98
+ The generated PDF can be found under docs/build/latex/data2rdf_docs.pdf
@@ -39,7 +39,7 @@ class Config(BaseSettings):
39
39
 
40
40
  data_download_uri: Union[str, AnyUrl] = Field(
41
41
  "https://www.example.org/download",
42
- description="General base iri for downloading the time series after uploading",
42
+ description="General base iri for downloading the dataframe after uploading",
43
43
  )
44
44
 
45
45
  graph_identifier: Optional[Union[str, AnyUrl]] = Field(
@@ -79,11 +79,6 @@ class Config(BaseSettings):
79
79
  description="In TBox mode, exclude the title of the ontology in the graph.",
80
80
  )
81
81
 
82
- dsms_schema_default: bool = Field(
83
- True,
84
- description="""Default value for the `dsms_schema` parameter of the `to_dict` method.""",
85
- )
86
-
87
82
  model_config = ConfigDict(extra="ignore")
88
83
 
89
84
  @model_validator(mode="after")
@@ -71,14 +71,14 @@ class BasicGraphModel(BasicConceptMapping):
71
71
 
72
72
  @property
73
73
  @abstractmethod
74
- def json_ld(cls) -> Dict[str, Any]:
74
+ def json_ld(self) -> Dict[str, Any]:
75
75
  """Return dict for json-ld of graph"""
76
76
 
77
77
  @property
78
- def graph(cls) -> Graph:
78
+ def graph(self) -> Graph:
79
79
  """Return graph object based on json-ld"""
80
- graph = Graph(identifier=cls.config.graph_identifier)
81
- graph.parse(data=json.dumps(cls.json_ld), format="json-ld")
80
+ graph = Graph(identifier=self.config.graph_identifier)
81
+ graph.parse(data=json.dumps(self.json_ld), format="json-ld")
82
82
  return graph
83
83
 
84
84
 
@@ -146,7 +146,7 @@ class MeasurementUnit(BaseConfigModel):
146
146
  class QuantityGraph(BasicGraphModel, BasicSuffixModel):
147
147
  """Quantity with or without a discrete value and a unit
148
148
  E.g. a quantity with a single value and unit _or_
149
- a quantity describing a column of a time series or table with a unit."""
149
+ a quantity describing a column of a dataframe or table with a unit."""
150
150
 
151
151
  unit: Optional[Union[str, AnyUrl]] = Field(
152
152
  None, description="QUDT Symbol or any other IRI for the unit mapping"
@@ -226,23 +226,23 @@ class QuantityGraph(BasicGraphModel, BasicSuffixModel):
226
226
  return self
227
227
 
228
228
  @property
229
- def json_ld(cls) -> Dict[str, Any]:
229
+ def json_ld(self) -> Dict[str, Any]:
230
230
  """Return dict of json-ld for graph"""
231
231
  return {
232
232
  "@context": {
233
- f"{cls.config.prefix_name}": make_prefix(cls.config),
233
+ f"{self.config.prefix_name}": make_prefix(self.config),
234
234
  "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
235
235
  "xsd": "http://www.w3.org/2001/XMLSchema#",
236
236
  "qudt": "http://qudt.org/schema/qudt/",
237
237
  },
238
- "@id": f"{cls.config.prefix_name}:{cls.suffix}",
238
+ "@id": f"{self.config.prefix_name}:{self.suffix}",
239
239
  "@type": (
240
- [str(iri) for iri in cls.iri]
241
- if isinstance(cls.iri, list)
242
- else str(cls.iri)
240
+ [str(iri) for iri in self.iri]
241
+ if isinstance(self.iri, list)
242
+ else str(self.iri)
243
243
  ),
244
- **cls.unit_json,
245
- **cls.value_json,
244
+ **self.unit_json,
245
+ **self.value_json,
246
246
  }
247
247
 
248
248
  @property
@@ -273,7 +273,7 @@ class PropertyGraph(BasicGraphModel, BasicSuffixModel):
273
273
  """Mapping for an individual with arbitrary property. E.g. the
274
274
  name of a tester or a testing facility. The value must not have a
275
275
  discrete value but can also be a reference to a column in a table or
276
- time series."""
276
+ dataframe."""
277
277
 
278
278
  value: Optional[
279
279
  Union[str, int, float, bool, AnyUrl, "PropertyGraph", "QuantityGraph"]
@@ -340,17 +340,17 @@ class PropertyGraph(BasicGraphModel, BasicSuffixModel):
340
340
  return self
341
341
 
342
342
  @property
343
- def json_ld(cls) -> Dict[str, Any]:
343
+ def json_ld(self) -> Dict[str, Any]:
344
344
  """Return dict of json-ld for graph"""
345
345
  return {
346
346
  "@context": {
347
- f"{cls.config.prefix_name}": make_prefix(cls.config),
347
+ f"{self.config.prefix_name}": make_prefix(self.config),
348
348
  "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
349
349
  "xsd": "http://www.w3.org/2001/XMLSchema#",
350
350
  },
351
- "@id": f"{cls.config.prefix_name}:{cls.suffix}",
352
- **cls.value_json,
353
- **cls.types_json,
351
+ "@id": f"{self.config.prefix_name}:{self.suffix}",
352
+ **self.value_json,
353
+ **self.types_json,
354
354
  }
355
355
 
356
356
  @property
@@ -372,26 +372,26 @@ class PropertyGraph(BasicGraphModel, BasicSuffixModel):
372
372
  return response
373
373
 
374
374
  @property
375
- def types_json(cls) -> "Dict[str, Any]":
375
+ def types_json(self) -> "Dict[str, Any]":
376
376
  """Dict of json-ld for class types of the individual"""
377
- if cls.annotation:
377
+ if self.annotation:
378
378
  types = {
379
379
  "@type": [
380
380
  (
381
- [str(iri) for iri in cls.iri]
382
- if isinstance(cls.iri, list)
383
- else str(cls.iri)
381
+ [str(iri) for iri in self.iri]
382
+ if isinstance(self.iri, list)
383
+ else str(self.iri)
384
384
  ),
385
- cls.annotation,
385
+ self.annotation,
386
386
  ]
387
387
  }
388
388
  else:
389
389
  types = {
390
390
  "@type": [
391
391
  (
392
- [str(iri) for iri in cls.iri]
393
- if isinstance(cls.iri, list)
394
- else str(cls.iri)
392
+ [str(iri) for iri in self.iri]
393
+ if isinstance(self.iri, list)
394
+ else str(self.iri)
395
395
  )
396
396
  ]
397
397
  }
@@ -41,7 +41,15 @@ class TBoxBaseMapping(BasicConceptMapping):
41
41
  )
42
42
 
43
43
 
44
- class CustomRelationPropertySubgraph(BasicSuffixModel):
44
+ class PropertySubgraphBaseModel(BasicSuffixModel):
45
+ concatenate: Optional[bool] = Field(
46
+ False,
47
+ description="Concatenate the value and the iri",
48
+ alias=AliasChoices("concatenate", "concat"),
49
+ )
50
+
51
+
52
+ class CustomRelationPropertySubgraph(PropertySubgraphBaseModel):
45
53
  value_relation: Optional[str] = Field(
46
54
  "rdfs:label",
47
55
  description="""Object/Data/Annotation property for the value
@@ -49,7 +57,7 @@ class CustomRelationPropertySubgraph(BasicSuffixModel):
49
57
  )
50
58
 
51
59
 
52
- class CustomRelationQuantitySubgraph(BasicSuffixModel):
60
+ class CustomRelationQuantitySubgraph(PropertySubgraphBaseModel):
53
61
  unit_relation: Optional[Union[str, AnyUrl]] = Field(
54
62
  "qudt:hasUnit",
55
63
  description="""Object property for mapping the IRI
@@ -175,9 +183,10 @@ class ABoxBaseMapping(BasicConceptMapping, BasicSuffixModel):
175
183
  class ABoxExcelMapping(ABoxBaseMapping):
176
184
  """A special model for mapping from excel files to semantic concepts in the ABox"""
177
185
 
178
- time_series_start: Optional[str] = Field(
186
+ dataframe_start: Optional[str] = Field(
179
187
  None,
180
- description="Cell location for the start of the time series quantity",
188
+ description="Cell location for the start of the dataframe quantity",
189
+ alias=AliasChoices("dataframe_start", "time_series_start"),
181
190
  )
182
191
  worksheet: Optional[str] = Field(
183
192
  None,
@@ -3,14 +3,14 @@
3
3
  import json
4
4
  import warnings
5
5
  from abc import abstractmethod
6
- from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
6
+ from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
7
7
 
8
8
  from rdflib import Graph
9
9
 
10
10
  from data2rdf.config import Config
11
11
  from data2rdf.modes import PipelineMode
12
12
 
13
- from .utils import generate_id, load_mapping_file
13
+ from .utils import load_mapping_file
14
14
 
15
15
  from pydantic import ( # isort:skip
16
16
  BaseModel,
@@ -46,7 +46,7 @@ class BaseParser(BaseModel):
46
46
 
47
47
  dropna: bool = Field(
48
48
  False,
49
- description="Drop all rows where ONLY NaN and None occur in the time series.",
49
+ description="Drop all rows where ONLY NaN and None occur in the dataframe.",
50
50
  )
51
51
 
52
52
  config: Config = Field(
@@ -72,7 +72,7 @@ class AnyBoxBaseParser(BaseParser):
72
72
 
73
73
  @property
74
74
  @abstractmethod
75
- def mapping_model(cls) -> "BaseParser":
75
+ def mapping_model(self) -> "BaseParser":
76
76
  """Pydantic model for validating mapping.
77
77
  Must be a subclass of `ABoxBaseParser` or `TBoxBaseParser`.
78
78
  """
@@ -93,10 +93,10 @@ class AnyBoxBaseParser(BaseParser):
93
93
  """Class method for loading data file"""
94
94
 
95
95
  @property
96
- def graph(cls) -> "Graph":
96
+ def graph(self) -> "Graph":
97
97
  """Return RDF Graph from the parsed data."""
98
- graph = Graph(identifier=cls.config.graph_identifier)
99
- graph.parse(data=json.dumps(cls.json_ld), format="json-ld")
98
+ graph = Graph(identifier=self.config.graph_identifier)
99
+ graph.parse(data=json.dumps(self.json_ld), format="json-ld")
100
100
  return graph
101
101
 
102
102
  @model_validator(mode="after")
@@ -171,8 +171,8 @@ class ABoxBaseParser(AnyBoxBaseParser):
171
171
  """Basic Parser for ABox mode"""
172
172
 
173
173
  _general_metadata: Any = PrivateAttr()
174
- _time_series_metadata: Any = PrivateAttr()
175
- _time_series: Any = PrivateAttr()
174
+ _dataframe_metadata: Any = PrivateAttr()
175
+ _dataframe: Any = PrivateAttr()
176
176
 
177
177
  @property
178
178
  def general_metadata(self) -> "List[BasicConceptMapping]":
@@ -180,14 +180,14 @@ class ABoxBaseParser(AnyBoxBaseParser):
180
180
  return self._general_metadata
181
181
 
182
182
  @property
183
- def time_series_metadata(self) -> "List[BasicConceptMapping]":
183
+ def dataframe_metadata(self) -> "List[BasicConceptMapping]":
184
184
  """Return list object with general metadata"""
185
- return self._time_series_metadata
185
+ return self._dataframe_metadata
186
186
 
187
187
  @property
188
- def time_series(self) -> "pd.DataFrame":
188
+ def dataframe(self) -> "pd.DataFrame":
189
189
  """Return times series found in the data as pd.DataFrame"""
190
- return self._time_series
190
+ return self._dataframe
191
191
 
192
192
  @property
193
193
  def plain_metadata(self) -> List[Dict[str, Any]]:
@@ -195,38 +195,48 @@ class ABoxBaseParser(AnyBoxBaseParser):
195
195
  `plain_metadata` is deprecated and will be removed in a future version.
196
196
  Use the `to_dict()` instead."""
197
197
  warnings.warn(message, DeprecationWarning)
198
- return self.to_dict(dsms_schema=self.config.dsms_schema_default)
198
+ return self.to_dict()
199
199
 
200
200
  def to_dict(
201
- self, dsms_schema: bool = False
201
+ self, schema: Callable = None
202
202
  ) -> "Union[Dict[str, Any], List[Dict[str, Any]]]":
203
- """Return list of general metadata as DSMS custom properties"""
203
+ """
204
+ Return general metadata as a list of dictionaries.
205
+
206
+ The list contains dictionaries, where the key is the label of the metadata,
207
+ and the value is a dictionary with the keys 'label' and 'value'. If the
208
+ metadata has a measurement unit associated with it, the dictionary will
209
+ also contain the key 'measurement_unit' with the value of the measurement
210
+ unit.
211
+
212
+ If the schema parameter is provided, it will be used to transform the
213
+ metadata list. The schema should be a callable which takes the list of
214
+ metadata dictionaries and returns the transformed metadata.
215
+
216
+ If no schema is provided, the function will return a dictionary where the
217
+ keys are the labels of the metadata, and the values are the dictionaries
218
+ from the list.
219
+
220
+ :param schema: A callable which takes a list of dictionaries and returns
221
+ the transformed metadata.
222
+ :return: A dictionary or list of dictionaries with the metadata.
223
+ """
204
224
  metadata = []
205
225
  for metadatum in self.general_metadata:
206
226
  prop = {
207
227
  "label": metadatum.suffix,
208
228
  "value": metadatum.value,
229
+ "relation_mapping": {
230
+ "class_iri": str(metadatum.iri),
231
+ },
209
232
  }
210
233
  if hasattr(metadatum, "measurement_unit"):
211
234
  prop[
212
235
  "measurement_unit"
213
236
  ] = metadatum.measurement_unit.model_dump(exclude={"config"})
214
237
  metadata.append(prop)
215
- if dsms_schema:
216
- if metadata:
217
- for metadatum in metadata:
218
- metadatum["id"] = generate_id()
219
- metadata = {
220
- "sections": [
221
- {
222
- "id": generate_id(),
223
- "name": "General",
224
- "entries": metadata,
225
- }
226
- ]
227
- }
228
- else:
229
- metadata = {}
238
+ if not isinstance(schema, type(None)):
239
+ metadata = schema(metadata)
230
240
  else:
231
241
  metadata = {datum.get("label"): datum for datum in metadata}
232
242
  return metadata
@@ -303,53 +313,53 @@ class BaseFileParser(BaseParser):
303
313
  return self
304
314
 
305
315
  @property
306
- def plain_metadata(cls) -> Dict[str, Any]:
316
+ def plain_metadata(self) -> Dict[str, Any]:
307
317
  """Metadata as flat json - without units and iris.
308
318
  Useful e.g. for the custom properties of the DSMS."""
309
- if cls.mode == PipelineMode.ABOX:
310
- return cls.abox.plain_metadata
319
+ if self.mode == PipelineMode.ABOX:
320
+ return self.abox.plain_metadata
311
321
  else:
312
322
  raise NotImplementedError(
313
323
  "`plain_metadata` is not available in `tbox`-mode."
314
324
  )
315
325
 
316
- def to_dict(self, dsms_schema: bool = False) -> "List[Dict[str, Any]]":
326
+ def to_dict(self, schema: Callable = None) -> "List[Dict[str, Any]]":
317
327
  """Return list of general metadata as DSMS custom properties"""
318
328
  if self.mode == PipelineMode.ABOX:
319
- return self.abox.to_dict(dsms_schema=dsms_schema)
329
+ return self.abox.to_dict(schema=schema)
320
330
  else:
321
331
  raise NotImplementedError(
322
332
  "`to_dict()` is not available in `tbox`-mode."
323
333
  )
324
334
 
325
335
  @property
326
- def general_metadata(cls) -> "List[BasicConceptMapping]":
336
+ def general_metadata(self) -> "List[BasicConceptMapping]":
327
337
  """Return list object with general metadata"""
328
- if cls.mode == PipelineMode.ABOX:
329
- return cls.abox.general_metadata
338
+ if self.mode == PipelineMode.ABOX:
339
+ return self.abox.general_metadata
330
340
  else:
331
341
  raise NotImplementedError(
332
342
  "`general_metadata` is not available in `tbox`-mode."
333
343
  )
334
344
 
335
345
  @property
336
- def time_series_metadata(cls) -> "List[BasicConceptMapping]":
337
- """Return time series metadata"""
338
- if cls.mode == PipelineMode.ABOX:
339
- return cls.abox.time_series_metadata
346
+ def dataframe_metadata(self) -> "List[BasicConceptMapping]":
347
+ """Return dataframe metadata"""
348
+ if self.mode == PipelineMode.ABOX:
349
+ return self.abox.dataframe_metadata
340
350
  else:
341
351
  raise NotImplementedError(
342
- "`time_series_metadata` is not available in `tbox`-mode."
352
+ "`dataframe_metadata` is not available in `tbox`-mode."
343
353
  )
344
354
 
345
355
  @property
346
- def time_series(cls) -> "Dict[str, Any]":
347
- """Return time series"""
348
- if cls.mode == PipelineMode.ABOX:
349
- return cls.abox.time_series
356
+ def dataframe(self) -> "Dict[str, Any]":
357
+ """Return dataframe"""
358
+ if self.mode == PipelineMode.ABOX:
359
+ return self.abox.dataframe
350
360
  else:
351
361
  raise NotImplementedError(
352
- "`time_series` is not available in `tbox`-mode."
362
+ "`dataframe` is not available in `tbox`-mode."
353
363
  )
354
364
 
355
365
  @property