ddigraph 0.4.3__tar.gz → 0.5.0__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 (244) hide show
  1. {ddigraph-0.4.3 → ddigraph-0.5.0}/.gitignore +5 -0
  2. ddigraph-0.5.0/CONTRIBUTING.md +152 -0
  3. {ddigraph-0.4.3 → ddigraph-0.5.0}/LICENSE +1 -1
  4. {ddigraph-0.4.3 → ddigraph-0.5.0}/PKG-INFO +52 -39
  5. {ddigraph-0.4.3 → ddigraph-0.5.0}/README.md +42 -36
  6. {ddigraph-0.4.3 → ddigraph-0.5.0}/pyproject.toml +52 -3
  7. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/__init__.py +28 -7
  8. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/api.py +5 -8
  9. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/cli.py +412 -80
  10. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/config.py +14 -7
  11. ddigraph-0.5.0/src/ddigraph/exporter.py +284 -0
  12. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/graph/__init__.py +4 -1
  13. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/graph/bootstrap.py +18 -7
  14. ddigraph-0.5.0/src/ddigraph/graph/view.py +331 -0
  15. ddigraph-0.5.0/src/ddigraph/graph/writer.py +277 -0
  16. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/paths.py +18 -1
  17. ddigraph-0.5.0/src/ddigraph/previewer.py +327 -0
  18. ddigraph-0.5.0/src/ddigraph/rdf/__init__.py +29 -0
  19. ddigraph-0.5.0/src/ddigraph/rdf/reader.py +272 -0
  20. ddigraph-0.5.0/src/ddigraph/rdf/shacl.py +294 -0
  21. ddigraph-0.5.0/src/ddigraph/rdf/vocabulary.py +657 -0
  22. ddigraph-0.5.0/src/ddigraph/rdf/writer.py +203 -0
  23. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/resources.py +19 -1
  24. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/ddi_graph.py +19 -1
  25. ddigraph-0.5.0/src/ddigraph/validation.py +263 -0
  26. ddigraph-0.4.3/CONTRIBUTING.md +0 -65
  27. {ddigraph-0.4.3 → ddigraph-0.5.0}/NOTICE +0 -0
  28. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/README.md +0 -0
  29. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/__init__.py +0 -0
  30. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-attribs-1.xsd +0 -0
  31. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-bdo-1.xsd +0 -0
  32. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-blkphras-1.xsd +0 -0
  33. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-blkpres-1.xsd +0 -0
  34. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-blkstruct-1.xsd +0 -0
  35. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-charent-1.xsd +0 -0
  36. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-datatypes-1.xsd +0 -0
  37. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-framework-1.xsd +0 -0
  38. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-hypertext-1.xsd +0 -0
  39. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-inlphras-1.xsd +0 -0
  40. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-inlpres-1.xsd +0 -0
  41. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-inlstruct-1.xsd +0 -0
  42. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-inlstyle-1.xsd +0 -0
  43. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-lat1.ent +0 -0
  44. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-list-1.xsd +0 -0
  45. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-notations-1.xsd +0 -0
  46. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-pres-1.xsd +0 -0
  47. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-special.ent +0 -0
  48. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-symbol.ent +0 -0
  49. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-table-1.xsd +0 -0
  50. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/XHTML/xhtml-text-1.xsd +0 -0
  51. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/archive.xsd +0 -0
  52. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/comparative.xsd +0 -0
  53. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/conceptualcomponent.xsd +0 -0
  54. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/datacollection.xsd +0 -0
  55. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/dataset.xsd +0 -0
  56. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/dc.xsd +0 -0
  57. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/dcmitype.xsd +0 -0
  58. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/dcterms.xsd +0 -0
  59. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/ddi-xhtml11-model-1.xsd +0 -0
  60. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/ddi-xhtml11-modules-1.xsd +0 -0
  61. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/ddi-xhtml11.xsd +0 -0
  62. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/ddiprofile.xsd +0 -0
  63. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/group.xsd +0 -0
  64. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/instance_3_1.xsd +0 -0
  65. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/logicalproduct.xsd +0 -0
  66. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/physicaldataproduct.xsd +0 -0
  67. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/physicaldataproduct_ncube_inline.xsd +0 -0
  68. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/physicaldataproduct_ncube_normal.xsd +0 -0
  69. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/physicaldataproduct_ncube_tabular.xsd +0 -0
  70. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/physicaldataproduct_proprietary.xsd +0 -0
  71. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/physicalinstance.xsd +0 -0
  72. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/reusable.xsd +0 -0
  73. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/studyunit.xsd +0 -0
  74. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_1/xml.xsd +0 -0
  75. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-attribs-1.xsd +0 -0
  76. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-bdo-1.xsd +0 -0
  77. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-blkphras-1.xsd +0 -0
  78. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-blkpres-1.xsd +0 -0
  79. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-blkstruct-1.xsd +0 -0
  80. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-charent-1.xsd +0 -0
  81. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-datatypes-1.xsd +0 -0
  82. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-framework-1.xsd +0 -0
  83. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-hypertext-1.xsd +0 -0
  84. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-inlphras-1.xsd +0 -0
  85. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-inlpres-1.xsd +0 -0
  86. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-inlstruct-1.xsd +0 -0
  87. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-inlstyle-1.xsd +0 -0
  88. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-lat1.ent +0 -0
  89. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-list-1.xsd +0 -0
  90. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-notations-1.xsd +0 -0
  91. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-pres-1.xsd +0 -0
  92. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-special.ent +0 -0
  93. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-symbol.ent +0 -0
  94. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-table-1.xsd +0 -0
  95. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/XHTML/xhtml-text-1.xsd +0 -0
  96. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/archive.xsd +0 -0
  97. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/comparative.xsd +0 -0
  98. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/conceptualcomponent.xsd +0 -0
  99. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/datacollection.xsd +0 -0
  100. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/dataset.xsd +0 -0
  101. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/dc.xsd +0 -0
  102. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/dcmitype.xsd +0 -0
  103. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/dcterms.xsd +0 -0
  104. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/ddi-xhtml11-model-1.xsd +0 -0
  105. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/ddi-xhtml11-modules-1.xsd +0 -0
  106. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/ddi-xhtml11.xsd +0 -0
  107. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/ddiprofile.xsd +0 -0
  108. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/group.xsd +0 -0
  109. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/instance_3_2.xsd +0 -0
  110. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/logicalproduct.xsd +0 -0
  111. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/physicaldataproduct.xsd +0 -0
  112. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/physicaldataproduct_ncube_inline.xsd +0 -0
  113. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/physicaldataproduct_ncube_normal.xsd +0 -0
  114. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/physicaldataproduct_ncube_tabular.xsd +0 -0
  115. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/physicaldataproduct_proprietary.xsd +0 -0
  116. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/physicalinstance.xsd +0 -0
  117. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/reusable.xsd +0 -0
  118. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/studyunit.xsd +0 -0
  119. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_2/xml.xsd +0 -0
  120. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-attribs-1.xsd +0 -0
  121. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-bdo-1.xsd +0 -0
  122. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-blkphras-1.xsd +0 -0
  123. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-blkpres-1.xsd +0 -0
  124. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-blkstruct-1.xsd +0 -0
  125. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-charent-1.xsd +0 -0
  126. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-datatypes-1.xsd +0 -0
  127. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-framework-1.xsd +0 -0
  128. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-hypertext-1.xsd +0 -0
  129. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-inlphras-1.xsd +0 -0
  130. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-inlpres-1.xsd +0 -0
  131. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-inlstruct-1.xsd +0 -0
  132. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-inlstyle-1.xsd +0 -0
  133. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-lat1.ent +0 -0
  134. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-list-1.xsd +0 -0
  135. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-notations-1.xsd +0 -0
  136. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-pres-1.xsd +0 -0
  137. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-special.ent +0 -0
  138. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-symbol.ent +0 -0
  139. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-table-1.xsd +0 -0
  140. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/XHTML/xhtml-text-1.xsd +0 -0
  141. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/archive.xsd +0 -0
  142. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/comparative.xsd +0 -0
  143. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/conceptualcomponent.xsd +0 -0
  144. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/datacollection.xsd +0 -0
  145. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/dataset.xsd +0 -0
  146. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/dc.xsd +0 -0
  147. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/dcmitype.xsd +0 -0
  148. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/dcterms.xsd +0 -0
  149. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/ddi-xhtml11-model-1.xsd +0 -0
  150. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/ddi-xhtml11-modules-1.xsd +0 -0
  151. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/ddi-xhtml11.xsd +0 -0
  152. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/ddiprofile.xsd +0 -0
  153. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/group.xsd +0 -0
  154. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/instance_3_3.xsd +0 -0
  155. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/logicalproduct.xsd +0 -0
  156. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/physicaldataproduct.xsd +0 -0
  157. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/physicaldataproduct_ncube_inline.xsd +0 -0
  158. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/physicaldataproduct_ncube_normal.xsd +0 -0
  159. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/physicaldataproduct_ncube_tabular.xsd +0 -0
  160. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/physicaldataproduct_proprietary.xsd +0 -0
  161. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/physicalinstance.xsd +0 -0
  162. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/reusable.xsd +0 -0
  163. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/studyunit.xsd +0 -0
  164. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi/v3_3/xml.xsd +0 -0
  165. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-attribs-1.xsd +0 -0
  166. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-bdo-1.xsd +0 -0
  167. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-blkphras-1.xsd +0 -0
  168. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-blkpres-1.xsd +0 -0
  169. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-blkstruct-1.xsd +0 -0
  170. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-charent-1.xsd +0 -0
  171. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-datatypes-1.xsd +0 -0
  172. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-framework-1.xsd +0 -0
  173. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-hypertext-1.xsd +0 -0
  174. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-inlphras-1.xsd +0 -0
  175. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-inlpres-1.xsd +0 -0
  176. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-inlstruct-1.xsd +0 -0
  177. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-inlstyle-1.xsd +0 -0
  178. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-lat1.ent +0 -0
  179. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-list-1.xsd +0 -0
  180. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-notations-1.xsd +0 -0
  181. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-pres-1.xsd +0 -0
  182. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-special.ent +0 -0
  183. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-symbol.ent +0 -0
  184. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-table-1.xsd +0 -0
  185. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/XHTML/xhtml-text-1.xsd +0 -0
  186. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/codebook.xsd +0 -0
  187. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/dc.xsd +0 -0
  188. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/dcmitype.xsd +0 -0
  189. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/dcterms.xsd +0 -0
  190. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/ddi-xhtml11-model-1.xsd +0 -0
  191. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/ddi-xhtml11-modules-1.xsd +0 -0
  192. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/ddi-xhtml11.xsd +0 -0
  193. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-c/xml.xsd +0 -0
  194. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/Agents.onto.ttl +0 -0
  195. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/Classes.onto.ttl +0 -0
  196. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/Components.onto.ttl +0 -0
  197. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/Conceptual.onto.ttl +0 -0
  198. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/DDICDILibrary.onto.ttl +0 -0
  199. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/DataDescription.onto.ttl +0 -0
  200. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/DataTypes.onto.ttl +0 -0
  201. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/Dimensional.onto.ttl +0 -0
  202. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/Enumerations.onto.ttl +0 -0
  203. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/FormatDescription.onto.ttl +0 -0
  204. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/KeyValue.onto.ttl +0 -0
  205. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/Long.onto.ttl +0 -0
  206. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/Process.onto.ttl +0 -0
  207. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/Representations.onto.ttl +0 -0
  208. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/StructuredDataTypes.onto.ttl +0 -0
  209. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/Wide.onto.ttl +0 -0
  210. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/ontology/ddi-cdi.onto.ttl +0 -0
  211. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/xml-schema/ddi-cdi.xsd +0 -0
  212. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/ddi-cdi/xml-schema/xml.xsd +0 -0
  213. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/license.txt +0 -0
  214. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/manifest.json +0 -0
  215. {ddigraph-0.4.3 → ddigraph-0.5.0}/schemas/readme.txt +0 -0
  216. {ddigraph-0.4.3 → ddigraph-0.5.0}/scripts/update_schemas.py +0 -0
  217. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/ingest/__init__.py +0 -0
  218. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/ingest/_compose.py +0 -0
  219. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/ingest/_composition_specs.py +0 -0
  220. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/ingest/cdi_loader.py +0 -0
  221. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/ingest/fragment_loader.py +0 -0
  222. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/ingest/loader.py +0 -0
  223. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/logging.py +0 -0
  224. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/metrics.py +0 -0
  225. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/py.typed +0 -0
  226. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/__init__.py +0 -0
  227. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/_generated/__init__.py +0 -0
  228. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/_generated/cdi.py +0 -0
  229. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/_generated/codebook.py +0 -0
  230. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/_generated/lifecycle.py +0 -0
  231. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/_overrides/__init__.py +0 -0
  232. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/_overrides/_loader.py +0 -0
  233. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/_overrides/schema_overrides.toml +0 -0
  234. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/adapter.py +0 -0
  235. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/definitions/__init__.py +0 -0
  236. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/definitions/_dataclasses.py +0 -0
  237. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/definitions/cdi.py +0 -0
  238. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/definitions/codebook.py +0 -0
  239. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/definitions/lifecycle.py +0 -0
  240. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/schema/neo4j_adapter.py +0 -0
  241. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/utils/__init__.py +0 -0
  242. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/utils/chunking.py +0 -0
  243. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/utils/parsing.py +0 -0
  244. {ddigraph-0.4.3 → ddigraph-0.5.0}/src/ddigraph/utils/retry.py +0 -0
@@ -223,3 +223,8 @@ __marimo__/
223
223
  /ddi_graph.jsonld
224
224
  /ddi_data.xlsx
225
225
  /ddi_export/
226
+
227
+ # mutmut's mutated copy of the source tree and its run state
228
+ mutants/
229
+ .mutmut-cache
230
+ mutmut-stats.json
@@ -0,0 +1,152 @@
1
+ # Contributing to ddigraph
2
+
3
+ Thanks for taking the time to look at the project. This file is the
4
+ short version; the deeper guide lives at
5
+ `docs/en/project/contributing.md` (and `docs/fr/project/contributing.md`).
6
+
7
+ ## Quick start
8
+
9
+ ```bash
10
+ git clone https://github.com/pbisson44/ddigraph
11
+ cd ddigraph
12
+
13
+ # uv is the recommended tooling, but ``pip install -e .[dev,docs]`` works too.
14
+ uv sync --extra dev --extra docs
15
+
16
+ # Run every gate the CI uses.
17
+ .venv/bin/ruff format --check .
18
+ .venv/bin/ruff check .
19
+ .venv/bin/mypy .
20
+ .venv/bin/python -m pytest
21
+ .venv/bin/python scripts/xsd_coverage.py --structural --structural-threshold 100
22
+ .venv/bin/python scripts/generate_schema_definitions.py --check
23
+ .venv/bin/python scripts/generate_vocabulary.py --check
24
+ npx --yes markdownlint-cli2@0.18.1 "**/*.md" "!**/site-packages/**" "!**/.venv/**"
25
+ ```
26
+
27
+ The same gates are wrapped as Makefile targets: `make lint`,
28
+ `make typecheck`, `make test`, `make lint-md`, `make check-schemas`,
29
+ `make check-schema-definitions`, `make check-vocabulary`, and
30
+ `make check-readability` (the last one needs the `docs` extra).
31
+
32
+ ## Documented examples are executed
33
+
34
+ A fenced code block in `docs/` opts into being run by carrying a
35
+ `<!-- runnable -->` comment on the line before it. `tests/test_docs_examples.py`
36
+ then executes it, in both languages, against the fixtures in `tests/fixtures/`.
37
+
38
+ Prefer making an example runnable over leaving it illustrative. Three
39
+ documented examples in this repository could not run for months --
40
+ `nx.info(G)` was removed in NetworkX 3.x, and the RDF page described a
41
+ parser API that has never existed -- because nothing executed them.
42
+
43
+ Examples needing a live database cannot be marked runnable. The same test
44
+ file still checks that every `from ddigraph... import X` in the docs
45
+ resolves, which covers those blocks.
46
+
47
+ ## Mutation testing
48
+
49
+ Scoped, not global, and not a CI gate:
50
+
51
+ ```bash
52
+ make mutation # a few minutes
53
+ make mutation-results # list the survivors
54
+ ```
55
+
56
+ `[tool.mutmut]` in `pyproject.toml` restricts it to the RDF vocabulary and
57
+ the graph tier, where the tests are the only thing standing between a
58
+ subtle mapping error and silently wrong output. The parsers are excluded
59
+ deliberately: they run to thousands of lines, and they are already pinned
60
+ by byte-equality snapshots and a blocking 100 % XSD coverage gate.
61
+
62
+ Read the survivors with judgement rather than chasing the number. Two
63
+ categories are not worth killing:
64
+
65
+ - Mutations of docstrings, log messages and error text.
66
+ - Mutations inside functions whose result is computed once at import into
67
+ a module-level constant, such as `_LIFECYCLE_TERMS`. The constant is
68
+ already built by the time a test runs, so the mutant is unreachable.
69
+
70
+ What is worth acting on is a mutation that changes behaviour and no test
71
+ notices. That is how `to_lower_camel("_")` was found to raise `ValueError`:
72
+ the emptiness guard sat after the unpack that raises.
73
+
74
+ ## Where things live
75
+
76
+ - `src/ddigraph/` -- the Python package. The public CRUD entry
77
+ points (`load`, `aload`, `detect`, `bootstrap`, `LoadResult`) live
78
+ in `ddigraph.api`; the loaders sit under `ddigraph.ingest/`.
79
+ - `src/ddigraph/graph/view.py` -- `iter_graph`, the backend-neutral
80
+ seam. All three DDI flavors project to the same `GraphChunk`, and
81
+ every exporter, previewer and validator consumes that rather than a
82
+ parser. Reach for it before writing anything flavor-specific.
83
+ - `src/ddigraph/rdf/` -- the vocabulary, writer, reader and SHACL
84
+ emitter. `vocabulary.py` holds plain strings and must never import
85
+ `rdflib`; `tests/test_extras_lazy_imports.py` fails the build if any
86
+ module here top-level-imports an optional extra.
87
+ `docs/{en,fr}/ns/vocabulary.ttl` is *generated* from these tables --
88
+ re-run `python scripts/generate_vocabulary.py` after touching them.
89
+ - `src/ddigraph/exporter.py` and `previewer.py` -- the file-writing
90
+ verbs (`export`, `preview`). Neither opens a database. The module is
91
+ `previewer`, not `preview`, so the re-exported `ddigraph.preview`
92
+ function does not shadow it.
93
+ - `src/ddigraph/schema/_generated/` -- *generated* node and
94
+ relationship metadata. Do not edit by hand; re-run
95
+ `python scripts/generate_schema_definitions.py` after a schema
96
+ change. The override file at
97
+ `src/ddigraph/schema/_overrides/schema_overrides.toml` is the
98
+ human-edited bridge between the XSDs and the runtime tables.
99
+ - `schemas/` -- bundled DDI XSDs (Codebook 2.6, DDI-L 3.x, DDI-CDI 1.0).
100
+ The structural-coverage audit blocks PRs if any concrete
101
+ identifiable element drops below 100% relationship coverage.
102
+ - `tests/` -- pytest tree. New tests follow the existing pattern;
103
+ the `tests/test_public_api.py` guard enforces the public/private
104
+ naming convention.
105
+ - `docs/en/` and `docs/fr/` -- mkdocs-material sources in two
106
+ languages.
107
+
108
+ ## Pull requests
109
+
110
+ 1. Branch from `main`.
111
+ 2. Run the gates above and `pre-commit run --all-files` if you have
112
+ pre-commit installed.
113
+ 3. Open the PR; explain *why* the change is needed in the
114
+ description, not just *what* it does.
115
+ 4. CI runs the same gates plus a TestPyPI dry-run for the publish
116
+ workflow. The structural-coverage and markdownlint gates are
117
+ blocking.
118
+
119
+ ## Releasing
120
+
121
+ Releases are fully automatic. There is one manual act: bumping
122
+ `version` in `pyproject.toml` and dating the matching `CHANGELOG.md`
123
+ heading. Merging that to `main` does the rest in a single workflow run:
124
+
125
+ 1. `detect-release` compares the version to the existing tags.
126
+ 2. `publish` uploads to PyPI via OIDC Trusted Publishing, pushes the
127
+ `vX.Y.Z` tag, and creates the GitHub Release with the notes taken
128
+ from that version's CHANGELOG section.
129
+ 3. `docs` deploys the site with `mkdocs gh-deploy`.
130
+
131
+ Two things about that sequence are easy to get wrong, so they are
132
+ worth stating:
133
+
134
+ - **The docs job depends on `publish`, not on the `release` event.**
135
+ GitHub does not fire workflow events for anything created with the
136
+ default `GITHUB_TOKEN` -- a recursion guard -- so the Release the
137
+ workflow creates would never trigger a `release`-gated job. Keying
138
+ the deploy off the job instead keeps it in the same run. A Release
139
+ published by hand through the web UI still deploys the docs, because
140
+ that one *does* fire the event.
141
+ - **Every step is idempotent.** PyPI accepts a version exactly once,
142
+ so the upload passes `skip-existing`, and the release step edits an
143
+ existing Release rather than failing to create it. Re-running the
144
+ workflow is safe.
145
+
146
+ Nothing publishes without a version bump: a push to `main` that leaves
147
+ the version alone skips `publish`, and therefore skips `docs` too.
148
+
149
+ ## Security
150
+
151
+ Please report security issues per `SECURITY.md` (do not file a
152
+ public issue).
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Philippe Bisson
3
+ Copyright (c) 2026 Philippe Bisson
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ddigraph
3
- Version: 0.4.3
3
+ Version: 0.5.0
4
4
  Summary: DDI to Knowledge Graph toolkit - transform DDI metadata into graph databases (Neo4j, RDF, Gremlin, NetworkX)
5
5
  Project-URL: Homepage, https://github.com/pbisson44/ddigraph
6
6
  Project-URL: Repository, https://github.com/pbisson44/ddigraph
@@ -11,7 +11,7 @@ Project-URL: Issues, https://github.com/pbisson44/ddigraph/issues
11
11
  Author-email: ddigraph maintainers <ddigraph@noreply.github.com>
12
12
  License: MIT License
13
13
 
14
- Copyright (c) 2025 Philippe Bisson
14
+ Copyright (c) 2026 Philippe Bisson
15
15
 
16
16
  Permission is hereby granted, free of charge, to any person obtaining a copy
17
17
  of this software and associated documentation files (the "Software"), to deal
@@ -54,27 +54,31 @@ Requires-Dist: neo4j>=5.19
54
54
  Requires-Dist: orjson>=3.10
55
55
  Requires-Dist: pydantic-settings>=2.13.1
56
56
  Requires-Dist: pydantic>=2.7
57
- Requires-Dist: xmlschema>=3.4
58
57
  Provides-Extra: all
59
58
  Requires-Dist: gremlinpython<4.0.0,>=3.8.1; extra == 'all'
60
59
  Requires-Dist: networkx>=3.6.1; extra == 'all'
61
60
  Requires-Dist: openpyxl>=3.1.5; extra == 'all'
62
61
  Requires-Dist: pandas>=2.3.3; extra == 'all'
62
+ Requires-Dist: pyshacl>=0.26; extra == 'all'
63
63
  Requires-Dist: rdflib<8.0.0,>=7.5.0; extra == 'all'
64
64
  Requires-Dist: sdmx1>=2.26; extra == 'all'
65
65
  Provides-Extra: dev
66
66
  Requires-Dist: build>=1.2; extra == 'dev'
67
67
  Requires-Dist: check-manifest>=0.50; extra == 'dev'
68
68
  Requires-Dist: mypy>=1.10; extra == 'dev'
69
+ Requires-Dist: networkx>=3.6.1; extra == 'dev'
69
70
  Requires-Dist: pre-commit>=3.7; extra == 'dev'
70
71
  Requires-Dist: psutil>=5.9; extra == 'dev'
71
72
  Requires-Dist: pyroma>=4.2; extra == 'dev'
73
+ Requires-Dist: pyshacl>=0.26; extra == 'dev'
72
74
  Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
73
75
  Requires-Dist: pytest-cov>=4.1; extra == 'dev'
74
76
  Requires-Dist: pytest>=8.2; extra == 'dev'
77
+ Requires-Dist: rdflib<8.0.0,>=7.5.0; extra == 'dev'
75
78
  Requires-Dist: ruff>=0.15.10; extra == 'dev'
76
79
  Requires-Dist: twine>=5.1; extra == 'dev'
77
80
  Requires-Dist: types-lxml>=2026.2.16; extra == 'dev'
81
+ Requires-Dist: xmlschema>=3.4; extra == 'dev'
78
82
  Provides-Extra: docs
79
83
  Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
80
84
  Requires-Dist: mkdocs-static-i18n>=1.2; extra == 'docs'
@@ -92,6 +96,9 @@ Provides-Extra: rdf
92
96
  Requires-Dist: rdflib<8.0.0,>=7.5.0; extra == 'rdf'
93
97
  Provides-Extra: sdmx
94
98
  Requires-Dist: sdmx1>=2.26; extra == 'sdmx'
99
+ Provides-Extra: shacl
100
+ Requires-Dist: pyshacl>=0.26; extra == 'shacl'
101
+ Requires-Dist: rdflib<8.0.0,>=7.5.0; extra == 'shacl'
95
102
  Description-Content-Type: text/markdown
96
103
 
97
104
  # ddigraph
@@ -99,11 +106,16 @@ Description-Content-Type: text/markdown
99
106
  [![CI](https://img.shields.io/github/actions/workflow/status/pbisson44/ddigraph/ci.yml?label=CI&logo=github)](https://github.com/pbisson44/ddigraph/actions)
100
107
  [![codecov](https://codecov.io/gh/pbisson44/ddigraph/branch/main/graph/badge.svg)](https://codecov.io/gh/pbisson44/ddigraph)
101
108
  [![PyPI](https://img.shields.io/pypi/v/ddigraph?logo=pypi&logoColor=white)](https://pypi.org/project/ddigraph/)
109
+ [![Downloads](https://img.shields.io/pypi/dm/ddigraph?logo=pypi&logoColor=white)](https://pypi.org/project/ddigraph/)
110
+ [![Docs](https://img.shields.io/badge/docs-EN%20%7C%20FR-blue?logo=materialformkdocs&logoColor=white)](https://pbisson44.github.io/ddigraph/)
102
111
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
103
- [![Python](https://img.shields.io/badge/Python-3.12%E2%80%933.14-blue?logo=python)](pyproject.toml)
112
+ [![Python](https://img.shields.io/pypi/pyversions/ddigraph?logo=python&logoColor=white)](pyproject.toml)
104
113
  [![Neo4j](https://img.shields.io/badge/Neo4j-5.x-green?logo=neo4j)](https://neo4j.com/docs/)
114
+ [![DDI](https://img.shields.io/badge/DDI-Codebook%20%7C%20Lifecycle%20%7C%20CDI-6a4c93)](https://ddialliance.org/)
105
115
  [![Code style](https://img.shields.io/badge/code%20style-ruff-000000?logo=ruff&logoColor=white)](https://docs.astral.sh/ruff/)
106
116
  [![Type checking](https://img.shields.io/badge/type%20checking-mypy-1678be?logo=mypy&logoColor=white)](https://mypy-lang.org/)
117
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](.pre-commit-config.yaml)
118
+ [![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-support-FFDD00?logo=buymeacoffee&logoColor=black)](https://buymeacoffee.com/pbisson44)
107
119
 
108
120
  A modern Python toolkit that transforms [DDI](https://ddialliance.org/) (Data Documentation
109
121
  Initiative) XML metadata into knowledge graphs. Supports **DDI Codebook** and **DDI-L
@@ -119,11 +131,18 @@ multiple graph backends.
119
131
 
120
132
  ## Features
121
133
 
122
- - **Multi-backend support** -- Neo4j, RDF/SPARQL, Gremlin, NetworkX, and pandas
134
+ - **Neo4j and RDF** -- load into Neo4j, or read and write RDF with a
135
+ documented, versioned vocabulary aligned to DISCO, SKOS and XKOS
136
+ - **File export** -- `ddigraph export` writes Turtle, JSON-LD, N-Triples,
137
+ RDF/XML, JSON or CSV with no database involved
138
+ - **SHACL shapes** -- generated from the same schema that builds the Neo4j
139
+ constraints, so they cannot drift
140
+ - **Preview before you load** -- `ddigraph preview` summarises a file as
141
+ text, Mermaid, or one self-contained HTML page
123
142
  - **Streaming XML processing** -- Memory-bounded `iterparse` for files of any size
124
143
  - **Batched writes** -- UNWIND-based Cypher for 10-100x fewer database round trips
125
144
  - **Async I/O** -- Concurrent parsing and writing with back-pressure control
126
- - **Format auto-detection** -- Automatically identifies DDI Codebook vs Lifecycle format
145
+ - **Format auto-detection** -- identifies DDI Codebook, DDI-L and DDI-CDI input
127
146
  - **Unified schema** -- Single source of truth for all node and relationship definitions
128
147
  - **Adapter pattern** -- Plug in custom graph backends via `GraphWriteAdapter` protocol
129
148
  - **Production-ready** -- Retry logic, observability hooks, pydantic-based configuration
@@ -152,30 +171,20 @@ ddigraph load survey.xml --dataset-id my-survey
152
171
  ### Load DDI metadata (Python)
153
172
 
154
173
  ```python
155
- import asyncio
156
- from neo4j import AsyncGraphDatabase
157
- from ddigraph import DDILoader, DDIFragmentLoader, detect_ddi_format
158
- from ddigraph.config import Settings
159
-
160
-
161
- async def main():
162
- settings = Settings()
163
- driver = AsyncGraphDatabase.driver(
164
- settings.neo4j_uri,
165
- auth=(settings.neo4j_user, settings.neo4j_password.get_secret_value()),
166
- )
167
- path = "survey.xml"
168
- if detect_ddi_format(path) == "lifecycle":
169
- loader = DDIFragmentLoader(driver, settings=settings)
170
- result = await loader.load(path)
171
- else:
172
- loader = DDILoader(driver, settings=settings)
173
- result = await loader.load(path, dataset_id="my-survey")
174
- print(result) # {'Instrument': 1, 'Sequence': 388, 'QuestionItem': 373, ...}
175
- await driver.close()
176
-
177
-
178
- asyncio.run(main())
174
+ import ddigraph
175
+
176
+ ddigraph.bootstrap(target="bolt://localhost:7687")
177
+ result = ddigraph.load("survey.xml", target="bolt://localhost:7687")
178
+ print(result.nodes_written, "nodes,", result.relationships_written, "relationships")
179
+ ```
180
+
181
+ ### Export without a database
182
+
183
+ ```python
184
+ import ddigraph
185
+
186
+ result = ddigraph.export("survey.xml", "survey.ttl", format="turtle")
187
+ print(result.triples, "triples")
179
188
  ```
180
189
 
181
190
  ## Supported Formats
@@ -203,13 +212,19 @@ Run `python scripts/xsd_coverage.py` to regenerate the audit or
203
212
 
204
213
  ## Supported Backends
205
214
 
206
- | Backend | Description | Use Case |
207
- | ------- | ----------- | -------- |
208
- | **Neo4j** | Native graph database (Bolt) | Production deployments, complex queries |
209
- | **RDF/SPARQL** | Semantic web triplestores | Linked data, ontology integration |
210
- | **Gremlin** | Graph traversal language | JanusGraph, Neptune, Cosmos DB |
211
- | **NetworkX** | Python graph library | Local analysis, prototyping |
212
- | **pandas** | DataFrame-based | Tabular analysis, Excel export |
215
+ | Backend | Status | Install |
216
+ | ------- | ------ | ------- |
217
+ | **Neo4j** | Shipped. Read and write, all three DDI flavors | base install |
218
+ | **RDF/SPARQL** | Shipped. Read and write, SHACL shapes | `ddigraph[rdf]` |
219
+ | **JSON / CSV** | Shipped. Export only | base install |
220
+ | **Gremlin** | Example script in `demo/`, not part of the package | `ddigraph[gremlin]` |
221
+ | **NetworkX** | Example script in `demo/`, not part of the package | `ddigraph[networkx]` |
222
+ | **pandas** | Example script in `demo/`, not part of the package | `ddigraph[pandas]` |
223
+
224
+ `demo/` scripts ship in neither the wheel nor the source distribution. They
225
+ are worked examples of driving another store from the parser tier, not
226
+ supported backends. To build your own, use `ddigraph.iter_graph()`, which
227
+ yields backend-neutral nodes and relationships for any DDI flavor.
213
228
 
214
229
  ## Docker Quick Start
215
230
 
@@ -246,8 +261,6 @@ cd ddigraph
246
261
  pip install -e ".[dev,docs]"
247
262
 
248
263
  ruff check . && ruff format .
249
- # Docstring linting is currently enforced for src/ddigraph only.
250
- pydocstyle src/ddigraph
251
264
  mypy .
252
265
  pytest
253
266
  mkdocs serve
@@ -3,11 +3,16 @@
3
3
  [![CI](https://img.shields.io/github/actions/workflow/status/pbisson44/ddigraph/ci.yml?label=CI&logo=github)](https://github.com/pbisson44/ddigraph/actions)
4
4
  [![codecov](https://codecov.io/gh/pbisson44/ddigraph/branch/main/graph/badge.svg)](https://codecov.io/gh/pbisson44/ddigraph)
5
5
  [![PyPI](https://img.shields.io/pypi/v/ddigraph?logo=pypi&logoColor=white)](https://pypi.org/project/ddigraph/)
6
+ [![Downloads](https://img.shields.io/pypi/dm/ddigraph?logo=pypi&logoColor=white)](https://pypi.org/project/ddigraph/)
7
+ [![Docs](https://img.shields.io/badge/docs-EN%20%7C%20FR-blue?logo=materialformkdocs&logoColor=white)](https://pbisson44.github.io/ddigraph/)
6
8
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
- [![Python](https://img.shields.io/badge/Python-3.12%E2%80%933.14-blue?logo=python)](pyproject.toml)
9
+ [![Python](https://img.shields.io/pypi/pyversions/ddigraph?logo=python&logoColor=white)](pyproject.toml)
8
10
  [![Neo4j](https://img.shields.io/badge/Neo4j-5.x-green?logo=neo4j)](https://neo4j.com/docs/)
11
+ [![DDI](https://img.shields.io/badge/DDI-Codebook%20%7C%20Lifecycle%20%7C%20CDI-6a4c93)](https://ddialliance.org/)
9
12
  [![Code style](https://img.shields.io/badge/code%20style-ruff-000000?logo=ruff&logoColor=white)](https://docs.astral.sh/ruff/)
10
13
  [![Type checking](https://img.shields.io/badge/type%20checking-mypy-1678be?logo=mypy&logoColor=white)](https://mypy-lang.org/)
14
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](.pre-commit-config.yaml)
15
+ [![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-support-FFDD00?logo=buymeacoffee&logoColor=black)](https://buymeacoffee.com/pbisson44)
11
16
 
12
17
  A modern Python toolkit that transforms [DDI](https://ddialliance.org/) (Data Documentation
13
18
  Initiative) XML metadata into knowledge graphs. Supports **DDI Codebook** and **DDI-L
@@ -23,11 +28,18 @@ multiple graph backends.
23
28
 
24
29
  ## Features
25
30
 
26
- - **Multi-backend support** -- Neo4j, RDF/SPARQL, Gremlin, NetworkX, and pandas
31
+ - **Neo4j and RDF** -- load into Neo4j, or read and write RDF with a
32
+ documented, versioned vocabulary aligned to DISCO, SKOS and XKOS
33
+ - **File export** -- `ddigraph export` writes Turtle, JSON-LD, N-Triples,
34
+ RDF/XML, JSON or CSV with no database involved
35
+ - **SHACL shapes** -- generated from the same schema that builds the Neo4j
36
+ constraints, so they cannot drift
37
+ - **Preview before you load** -- `ddigraph preview` summarises a file as
38
+ text, Mermaid, or one self-contained HTML page
27
39
  - **Streaming XML processing** -- Memory-bounded `iterparse` for files of any size
28
40
  - **Batched writes** -- UNWIND-based Cypher for 10-100x fewer database round trips
29
41
  - **Async I/O** -- Concurrent parsing and writing with back-pressure control
30
- - **Format auto-detection** -- Automatically identifies DDI Codebook vs Lifecycle format
42
+ - **Format auto-detection** -- identifies DDI Codebook, DDI-L and DDI-CDI input
31
43
  - **Unified schema** -- Single source of truth for all node and relationship definitions
32
44
  - **Adapter pattern** -- Plug in custom graph backends via `GraphWriteAdapter` protocol
33
45
  - **Production-ready** -- Retry logic, observability hooks, pydantic-based configuration
@@ -56,30 +68,20 @@ ddigraph load survey.xml --dataset-id my-survey
56
68
  ### Load DDI metadata (Python)
57
69
 
58
70
  ```python
59
- import asyncio
60
- from neo4j import AsyncGraphDatabase
61
- from ddigraph import DDILoader, DDIFragmentLoader, detect_ddi_format
62
- from ddigraph.config import Settings
63
-
64
-
65
- async def main():
66
- settings = Settings()
67
- driver = AsyncGraphDatabase.driver(
68
- settings.neo4j_uri,
69
- auth=(settings.neo4j_user, settings.neo4j_password.get_secret_value()),
70
- )
71
- path = "survey.xml"
72
- if detect_ddi_format(path) == "lifecycle":
73
- loader = DDIFragmentLoader(driver, settings=settings)
74
- result = await loader.load(path)
75
- else:
76
- loader = DDILoader(driver, settings=settings)
77
- result = await loader.load(path, dataset_id="my-survey")
78
- print(result) # {'Instrument': 1, 'Sequence': 388, 'QuestionItem': 373, ...}
79
- await driver.close()
80
-
81
-
82
- asyncio.run(main())
71
+ import ddigraph
72
+
73
+ ddigraph.bootstrap(target="bolt://localhost:7687")
74
+ result = ddigraph.load("survey.xml", target="bolt://localhost:7687")
75
+ print(result.nodes_written, "nodes,", result.relationships_written, "relationships")
76
+ ```
77
+
78
+ ### Export without a database
79
+
80
+ ```python
81
+ import ddigraph
82
+
83
+ result = ddigraph.export("survey.xml", "survey.ttl", format="turtle")
84
+ print(result.triples, "triples")
83
85
  ```
84
86
 
85
87
  ## Supported Formats
@@ -107,13 +109,19 @@ Run `python scripts/xsd_coverage.py` to regenerate the audit or
107
109
 
108
110
  ## Supported Backends
109
111
 
110
- | Backend | Description | Use Case |
111
- | ------- | ----------- | -------- |
112
- | **Neo4j** | Native graph database (Bolt) | Production deployments, complex queries |
113
- | **RDF/SPARQL** | Semantic web triplestores | Linked data, ontology integration |
114
- | **Gremlin** | Graph traversal language | JanusGraph, Neptune, Cosmos DB |
115
- | **NetworkX** | Python graph library | Local analysis, prototyping |
116
- | **pandas** | DataFrame-based | Tabular analysis, Excel export |
112
+ | Backend | Status | Install |
113
+ | ------- | ------ | ------- |
114
+ | **Neo4j** | Shipped. Read and write, all three DDI flavors | base install |
115
+ | **RDF/SPARQL** | Shipped. Read and write, SHACL shapes | `ddigraph[rdf]` |
116
+ | **JSON / CSV** | Shipped. Export only | base install |
117
+ | **Gremlin** | Example script in `demo/`, not part of the package | `ddigraph[gremlin]` |
118
+ | **NetworkX** | Example script in `demo/`, not part of the package | `ddigraph[networkx]` |
119
+ | **pandas** | Example script in `demo/`, not part of the package | `ddigraph[pandas]` |
120
+
121
+ `demo/` scripts ship in neither the wheel nor the source distribution. They
122
+ are worked examples of driving another store from the parser tier, not
123
+ supported backends. To build your own, use `ddigraph.iter_graph()`, which
124
+ yields backend-neutral nodes and relationships for any DDI flavor.
117
125
 
118
126
  ## Docker Quick Start
119
127
 
@@ -150,8 +158,6 @@ cd ddigraph
150
158
  pip install -e ".[dev,docs]"
151
159
 
152
160
  ruff check . && ruff format .
153
- # Docstring linting is currently enforced for src/ddigraph only.
154
- pydocstyle src/ddigraph
155
161
  mypy .
156
162
  pytest
157
163
  mkdocs serve
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "ddigraph"
7
- version = "0.4.3"
7
+ version = "0.5.0"
8
8
  description = "DDI to Knowledge Graph toolkit - transform DDI metadata into graph databases (Neo4j, RDF, Gremlin, NetworkX)"
9
9
  authors = [{name = "ddigraph maintainers", email = "ddigraph@noreply.github.com"}]
10
10
  readme = "README.md"
@@ -53,7 +53,6 @@ dependencies = [
53
53
  "orjson>=3.10",
54
54
  "pydantic>=2.7",
55
55
  "pydantic-settings>=2.13.1",
56
- "xmlschema>=3.4",
57
56
  ]
58
57
 
59
58
  [project.scripts]
@@ -71,12 +70,14 @@ Issues = "https://github.com/pbisson44/ddigraph/issues"
71
70
  # Backend extras: install only what your target environment uses.
72
71
  # ``pip install ddigraph[rdf]`` enables the RDF/SPARQL demo path, etc.
73
72
  rdf = ["rdflib>=7.5.0,<8.0.0"]
73
+ shacl = ["rdflib>=7.5.0,<8.0.0", "pyshacl>=0.26"]
74
74
  gremlin = ["gremlinpython>=3.8.1,<4.0.0"]
75
75
  networkx = ["networkx>=3.6.1"]
76
76
  pandas = ["pandas>=2.3.3", "openpyxl>=3.1.5"]
77
77
  sdmx = ["sdmx1>=2.26"]
78
78
  all = [
79
79
  "rdflib>=7.5.0,<8.0.0",
80
+ "pyshacl>=0.26",
80
81
  "gremlinpython>=3.8.1,<4.0.0",
81
82
  "networkx>=3.6.1",
82
83
  "pandas>=2.3.3",
@@ -93,6 +94,18 @@ dev = [
93
94
  "psutil>=5.9",
94
95
  "types-lxml>=2026.2.16",
95
96
  "pre-commit>=3.7",
97
+ # Build-time only: ``scripts/generate_schema_definitions.py`` drives the
98
+ # XSD -> ``schema/_generated`` codegen with ``xmlschema.XMLSchema11``.
99
+ # Nothing under ``src/ddigraph/`` imports it and the script is not shipped
100
+ # in the wheel, so it has no business in the runtime dependency set.
101
+ "xmlschema>=3.4",
102
+ # The RDF tier is optional at runtime but exercised by the test suite.
103
+ "rdflib>=7.5.0,<8.0.0",
104
+ "pyshacl>=0.26",
105
+ # Needed so the runnable NetworkX examples in the docs actually execute
106
+ # rather than skip. Pure Python and small; the heavier extras
107
+ # (gremlinpython, pandas) stay out and their examples skip instead.
108
+ "networkx>=3.6.1",
96
109
  # Packaging audit tools used by the CI publish pipeline.
97
110
  "build>=1.2",
98
111
  "twine>=5.1",
@@ -110,6 +123,9 @@ docs = [
110
123
  [tool.ruff]
111
124
  line-length = 100
112
125
  target-version = "py314"
126
+ # ``mutmut`` generates a mutated copy of the tree here. It is machine
127
+ # written, deliberately broken, and regenerated on every run.
128
+ extend-exclude = ["mutants"]
113
129
 
114
130
  [tool.ruff.lint]
115
131
  select = [
@@ -167,7 +183,7 @@ plugins = ["pydantic.mypy"]
167
183
  # the base install does not pull in. They are user-facing examples,
168
184
  # not part of the typed package surface; exclude them from strict
169
185
  # type checking so the CI matrix does not need every extra installed.
170
- exclude = ["^demo/"]
186
+ exclude = ["^demo/", "^mutants/"]
171
187
 
172
188
  [[tool.mypy.overrides]]
173
189
  module = ["lxml", "lxml.*"]
@@ -232,6 +248,7 @@ ignore = [
232
248
  "demo/**",
233
249
  "docs/**",
234
250
  "hooks/**",
251
+ "plans/**",
235
252
  "scripts/**",
236
253
  "tests/**",
237
254
  ]
@@ -261,3 +278,35 @@ include = [
261
278
  "NOTICE",
262
279
  "README.md",
263
280
  ]
281
+
282
+ [tool.mutmut]
283
+ # Mutation testing is scoped, not global. The parsers run to thousands of
284
+ # lines and mutating them would take hours for little signal: they are
285
+ # already pinned by byte-equality snapshots and a blocking 100 % XSD
286
+ # coverage gate. What benefits is the 0.5.0 vocabulary and graph tier,
287
+ # where the tests are the only thing between a subtle mapping error and
288
+ # silently wrong RDF.
289
+ #
290
+ # Run with: make mutation
291
+ source_paths = ["src/ddigraph"]
292
+ only_mutate = [
293
+ "src/ddigraph/rdf/vocabulary.py",
294
+ "src/ddigraph/rdf/writer.py",
295
+ "src/ddigraph/rdf/reader.py",
296
+ "src/ddigraph/graph/writer.py",
297
+ "src/ddigraph/graph/view.py",
298
+ ]
299
+ # mutmut runs from a copied tree, so anything the suite reads at runtime
300
+ # has to come along: the fixtures, the bundled XSDs, and the overrides
301
+ # TOML the schema tables are built from.
302
+ also_copy = ["tests/", "schemas/", "pyproject.toml"]
303
+ # Only the tests that actually cover the mutated modules. Running all
304
+ # 1400 per mutant would make this unusable.
305
+ pytest_add_cli_args_test_selection = [
306
+ "tests/test_rdf_vocabulary.py",
307
+ "tests/test_rdf_export.py",
308
+ "tests/test_rdf_roundtrip.py",
309
+ "tests/test_shacl.py",
310
+ "tests/test_graph_view.py",
311
+ "tests/test_graph_writer.py",
312
+ ]