dump-things-service 0.1.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 (421) hide show
  1. dump_things_service-0.1.0/.github/workflows/run_tests.yaml +25 -0
  2. dump_things_service-0.1.0/.gitignore +3 -0
  3. dump_things_service-0.1.0/.gitmodules +4 -0
  4. dump_things_service-0.1.0/LinkML YAML API Service - Final Report.md +141 -0
  5. dump_things_service-0.1.0/PKG-INFO +284 -0
  6. dump_things_service-0.1.0/README.md +255 -0
  7. dump_things_service-0.1.0/base_unreleased.yaml +99 -0
  8. dump_things_service-0.1.0/conv0.json +26 -0
  9. dump_things_service-0.1.0/conv1.json +22 -0
  10. dump_things_service-0.1.0/conv2.json +17 -0
  11. dump_things_service-0.1.0/datalad-concepts/.codespellrc +6 -0
  12. dump_things_service-0.1.0/datalad-concepts/.git +1 -0
  13. dump_things_service-0.1.0/datalad-concepts/.github/workflows/codespell.yml +25 -0
  14. dump_things_service-0.1.0/datalad-concepts/.github/workflows/model-checks.yml +26 -0
  15. dump_things_service-0.1.0/datalad-concepts/.github/workflows/sitebuild.yml +59 -0
  16. dump_things_service-0.1.0/datalad-concepts/.github/workflows/validate-examples.yaml +26 -0
  17. dump_things_service-0.1.0/datalad-concepts/.gitignore +5 -0
  18. dump_things_service-0.1.0/datalad-concepts/.linkmllint.yaml +8 -0
  19. dump_things_service-0.1.0/datalad-concepts/LICENSE +24 -0
  20. dump_things_service-0.1.0/datalad-concepts/Makefile +194 -0
  21. dump_things_service-0.1.0/datalad-concepts/README.md +37 -0
  22. dump_things_service-0.1.0/datalad-concepts/extra-docs/about.md +44 -0
  23. dump_things_service-0.1.0/datalad-concepts/extra-docs/dump-things.md +152 -0
  24. dump_things_service-0.1.0/datalad-concepts/extra-docs/index.md +49 -0
  25. dump_things_service-0.1.0/datalad-concepts/mkdocs.yml +49 -0
  26. dump_things_service-0.1.0/datalad-concepts/patches/jsonschemagen_mixins.diff +28 -0
  27. dump_things_service-0.1.0/datalad-concepts/patches/jsonschemavalidator_plainyaml.diff +34 -0
  28. dump_things_service-0.1.0/datalad-concepts/patches/linkml_runtime_utils_yamlutils.diff +29 -0
  29. dump_things_service-0.1.0/datalad-concepts/patches/rdflib_dumper_canonical.diff +22 -0
  30. dump_things_service-0.1.0/datalad-concepts/patches/rdflib_loader_typedesignator.diff +27 -0
  31. dump_things_service-0.1.0/datalad-concepts/patches/shacl_ifabsent.diff +14 -0
  32. dump_things_service-0.1.0/datalad-concepts/patches/shaclgen_annotations.diff +63 -0
  33. dump_things_service-0.1.0/datalad-concepts/pyproject.toml +74 -0
  34. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/DataService-annexremote.json +36 -0
  35. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/DataService-annexremote.yaml +52 -0
  36. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-access.json +42 -0
  37. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-access.yaml +79 -0
  38. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-annexaccess.json +12 -0
  39. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-annexaccess.yaml +14 -0
  40. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-annexkey.json +14 -0
  41. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-annexkey.yaml +6 -0
  42. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-basic.json +27 -0
  43. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-basic.yaml +21 -0
  44. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-customlicense.json +13 -0
  45. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-customlicense.yaml +7 -0
  46. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-datatypes.json +19 -0
  47. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-datatypes.yaml +19 -0
  48. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-formats.json +25 -0
  49. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-formats.yaml +15 -0
  50. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-gitblob.json +14 -0
  51. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-gitblob.yaml +7 -0
  52. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-gittree.json +16 -0
  53. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-gittree.yaml +11 -0
  54. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-parts.json +43 -0
  55. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-parts.yaml +25 -0
  56. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-resource.json +43 -0
  57. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Distribution-resource.yaml +29 -0
  58. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Resource-dataladdataset.json +26 -0
  59. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Resource-dataladdataset.yaml +16 -0
  60. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Resource-gitcommit.json +89 -0
  61. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Resource-gitcommit.yaml +66 -0
  62. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Resource-study.json +108 -0
  63. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/examples/Resource-study.yaml +63 -0
  64. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/extra-docs/about.md +101 -0
  65. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/validation/DataService.valid.cfg.yaml +9 -0
  66. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/validation/Distribution.valid.cfg.yaml +19 -0
  67. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased/validation/Resource.valid.cfg.yaml +11 -0
  68. dump_things_service-0.1.0/datalad-concepts/src/distribution/unreleased.yaml +529 -0
  69. dump_things_service-0.1.0/datalad-concepts/src/edistributions/unreleased/examples/ElectronicDistribution-01-minimal.json +5 -0
  70. dump_things_service-0.1.0/datalad-concepts/src/edistributions/unreleased/examples/ElectronicDistribution-01-minimal.yaml +2 -0
  71. dump_things_service-0.1.0/datalad-concepts/src/edistributions/unreleased/examples/ElectronicDistribution-02-props.json +22 -0
  72. dump_things_service-0.1.0/datalad-concepts/src/edistributions/unreleased/examples/ElectronicDistribution-02-props.yaml +13 -0
  73. dump_things_service-0.1.0/datalad-concepts/src/edistributions/unreleased/examples/ElectronicDistribution-03-parts.json +25 -0
  74. dump_things_service-0.1.0/datalad-concepts/src/edistributions/unreleased/examples/ElectronicDistribution-03-parts.yaml +19 -0
  75. dump_things_service-0.1.0/datalad-concepts/src/edistributions/unreleased/examples/ElectronicDistribution-04-partrole.json +20 -0
  76. dump_things_service-0.1.0/datalad-concepts/src/edistributions/unreleased/examples/ElectronicDistribution-04-partrole.yaml +17 -0
  77. dump_things_service-0.1.0/datalad-concepts/src/edistributions/unreleased/examples/ElectronicDistribution-05-download.json +22 -0
  78. dump_things_service-0.1.0/datalad-concepts/src/edistributions/unreleased/examples/ElectronicDistribution-05-download.yaml +10 -0
  79. dump_things_service-0.1.0/datalad-concepts/src/edistributions/unreleased/extra-docs/about.md +0 -0
  80. dump_things_service-0.1.0/datalad-concepts/src/edistributions/unreleased/validation/ElectronicDistribution.valid.cfg.yaml +13 -0
  81. dump_things_service-0.1.0/datalad-concepts/src/edistributions/unreleased.yaml +199 -0
  82. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/Checksum-01-minimal.json +6 -0
  83. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/Checksum-01-minimal.yaml +2 -0
  84. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/DOI-01-minimal.json +7 -0
  85. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/DOI-01-minimal.yaml +1 -0
  86. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/DOI-02-complete.json +7 -0
  87. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/DOI-02-complete.yaml +4 -0
  88. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/Identifier-01-minimal.json +5 -0
  89. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/Identifier-01-minimal.yaml +2 -0
  90. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/Identifier-02-full.json +6 -0
  91. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/Identifier-02-full.yaml +2 -0
  92. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/IssuedIdentifier-01-minimal.json +5 -0
  93. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/IssuedIdentifier-01-minimal.yaml +2 -0
  94. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/IssuedIdentifier-02-full.json +7 -0
  95. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/examples/IssuedIdentifier-02-full.yaml +3 -0
  96. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/extra-docs/about.md +0 -0
  97. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/validation/Checksum.valid.cfg.yaml +9 -0
  98. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/validation/DOI.valid.cfg.yaml +9 -0
  99. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/validation/Identifier.valid.cfg.yaml +10 -0
  100. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased/validation/IssuedIdentifier.valid.cfg.yaml +10 -0
  101. dump_things_service-0.1.0/datalad-concepts/src/identifiers/unreleased.yaml +190 -0
  102. dump_things_service-0.1.0/datalad-concepts/src/properties/unreleased/extra-docs/about.md +0 -0
  103. dump_things_service-0.1.0/datalad-concepts/src/properties/unreleased.yaml +141 -0
  104. dump_things_service-0.1.0/datalad-concepts/src/prov/unreleased/examples/Agent-01-minimal.json +5 -0
  105. dump_things_service-0.1.0/datalad-concepts/src/prov/unreleased/examples/Agent-01-minimal.yaml +2 -0
  106. dump_things_service-0.1.0/datalad-concepts/src/prov/unreleased/examples/Agent-02-attributes.json +20 -0
  107. dump_things_service-0.1.0/datalad-concepts/src/prov/unreleased/examples/Agent-02-attributes.yaml +12 -0
  108. dump_things_service-0.1.0/datalad-concepts/src/prov/unreleased/examples/Agent-03-relations.json +14 -0
  109. dump_things_service-0.1.0/datalad-concepts/src/prov/unreleased/examples/Agent-03-relations.yaml +9 -0
  110. dump_things_service-0.1.0/datalad-concepts/src/prov/unreleased/extra-docs/about.md +0 -0
  111. dump_things_service-0.1.0/datalad-concepts/src/prov/unreleased/validation/Agent.valid.cfg.yaml +11 -0
  112. dump_things_service-0.1.0/datalad-concepts/src/prov/unreleased.yaml +261 -0
  113. dump_things_service-0.1.0/datalad-concepts/src/publications/unreleased/examples/Publication-01-minimal.json +5 -0
  114. dump_things_service-0.1.0/datalad-concepts/src/publications/unreleased/examples/Publication-01-minimal.yaml +2 -0
  115. dump_things_service-0.1.0/datalad-concepts/src/publications/unreleased/examples/Publication-02-linkage.json +84 -0
  116. dump_things_service-0.1.0/datalad-concepts/src/publications/unreleased/examples/Publication-02-linkage.yaml +54 -0
  117. dump_things_service-0.1.0/datalad-concepts/src/publications/unreleased/examples/Publication-03-attributes.json +14 -0
  118. dump_things_service-0.1.0/datalad-concepts/src/publications/unreleased/examples/Publication-03-attributes.yaml +10 -0
  119. dump_things_service-0.1.0/datalad-concepts/src/publications/unreleased/extra-docs/about.md +0 -0
  120. dump_things_service-0.1.0/datalad-concepts/src/publications/unreleased/validation/Publication.valid.cfg.yaml +11 -0
  121. dump_things_service-0.1.0/datalad-concepts/src/publications/unreleased.yaml +91 -0
  122. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Dataset-02-props.json +7 -0
  123. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Dataset-02-props.yaml +3 -0
  124. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Dataset-03-license.json +21 -0
  125. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Dataset-03-license.yaml +9 -0
  126. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Grant-01-minimal.json +5 -0
  127. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Grant-01-minimal.yaml +2 -0
  128. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Grant-02-sponsor.json +6 -0
  129. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Grant-02-sponsor.yaml +4 -0
  130. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Instrument-02-access.json +12 -0
  131. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Instrument-02-access.yaml +5 -0
  132. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Instrument-03-rich.json +24 -0
  133. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Instrument-03-rich.yaml +20 -0
  134. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Resource-01-minimal.json +5 -0
  135. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Resource-01-minimal.yaml +2 -0
  136. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Resource-02-parts.json +17 -0
  137. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Resource-02-parts.yaml +11 -0
  138. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Resource-03-partof.json +12 -0
  139. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Resource-03-partof.yaml +8 -0
  140. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Resource-04-version.json +11 -0
  141. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/examples/Resource-04-version.yaml +6 -0
  142. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/extra-docs/about.md +0 -0
  143. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/validation/Dataset.valid.cfg.yaml +10 -0
  144. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/validation/Grant.valid.cfg.yaml +10 -0
  145. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/validation/Instrument.valid.cfg.yaml +11 -0
  146. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased/validation/Resource.valid.cfg.yaml +12 -0
  147. dump_things_service-0.1.0/datalad-concepts/src/resources/unreleased.yaml +317 -0
  148. dump_things_service-0.1.0/datalad-concepts/src/roles/unreleased/examples/Relationship-01-topic.json +8 -0
  149. dump_things_service-0.1.0/datalad-concepts/src/roles/unreleased/examples/Relationship-01-topic.yaml +4 -0
  150. dump_things_service-0.1.0/datalad-concepts/src/roles/unreleased/examples/Relationship-02-author.json +9 -0
  151. dump_things_service-0.1.0/datalad-concepts/src/roles/unreleased/examples/Relationship-02-author.yaml +7 -0
  152. dump_things_service-0.1.0/datalad-concepts/src/roles/unreleased/examples/Role-01-minimal.json +5 -0
  153. dump_things_service-0.1.0/datalad-concepts/src/roles/unreleased/examples/Role-01-minimal.yaml +2 -0
  154. dump_things_service-0.1.0/datalad-concepts/src/roles/unreleased/examples/Role-02-explained.json +12 -0
  155. dump_things_service-0.1.0/datalad-concepts/src/roles/unreleased/examples/Role-02-explained.yaml +6 -0
  156. dump_things_service-0.1.0/datalad-concepts/src/roles/unreleased/extra-docs/about.md +0 -0
  157. dump_things_service-0.1.0/datalad-concepts/src/roles/unreleased/validation/Relationship.valid.cfg.yaml +10 -0
  158. dump_things_service-0.1.0/datalad-concepts/src/roles/unreleased/validation/Role.valid.cfg.yaml +10 -0
  159. dump_things_service-0.1.0/datalad-concepts/src/roles/unreleased.yaml +122 -0
  160. dump_things_service-0.1.0/datalad-concepts/src/sdd/unreleased/examples/Distribution-penguins.json +326 -0
  161. dump_things_service-0.1.0/datalad-concepts/src/sdd/unreleased/examples/Distribution-penguins.yaml +219 -0
  162. dump_things_service-0.1.0/datalad-concepts/src/sdd/unreleased/examples/Resource-funding.json +32 -0
  163. dump_things_service-0.1.0/datalad-concepts/src/sdd/unreleased/examples/Resource-funding.yaml +15 -0
  164. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Group-03-members.json +22 -0
  165. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Group-03-members.yaml +13 -0
  166. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Organization-01-minimal.json +5 -0
  167. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Organization-01-minimal.yaml +3 -0
  168. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Organization-02-attributes.json +20 -0
  169. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Organization-02-attributes.yaml +9 -0
  170. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Organization-03-relations.json +14 -0
  171. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Organization-03-relations.yaml +6 -0
  172. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Person-01-minimal.json +5 -0
  173. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Person-01-minimal.yaml +2 -0
  174. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Person-02-attributes.json +20 -0
  175. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Person-02-attributes.yaml +12 -0
  176. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Person-03-relations.json +21 -0
  177. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Person-03-relations.yaml +14 -0
  178. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Person-04-names.json +13 -0
  179. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Person-04-names.yaml +9 -0
  180. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Project-01-minimal.json +5 -0
  181. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Project-01-minimal.yaml +2 -0
  182. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Project-02-attributes.json +16 -0
  183. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Project-02-attributes.yaml +11 -0
  184. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Project-03-relations.json +23 -0
  185. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/examples/Project-03-relations.yaml +13 -0
  186. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/extra-docs/about.md +0 -0
  187. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/validation/Group.valid.cfg.yaml +9 -0
  188. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/validation/Organization.valid.cfg.yaml +11 -0
  189. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/validation/Person.valid.cfg.yaml +12 -0
  190. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased/validation/Project.valid.cfg.yaml +11 -0
  191. dump_things_service-0.1.0/datalad-concepts/src/social/unreleased.yaml +246 -0
  192. dump_things_service-0.1.0/datalad-concepts/src/spatial/unreleased/examples/Location-01-minimal.json +5 -0
  193. dump_things_service-0.1.0/datalad-concepts/src/spatial/unreleased/examples/Location-01-minimal.yaml +2 -0
  194. dump_things_service-0.1.0/datalad-concepts/src/spatial/unreleased/extra-docs/about.md +0 -0
  195. dump_things_service-0.1.0/datalad-concepts/src/spatial/unreleased/validation/Location.valid.cfg.yaml +9 -0
  196. dump_things_service-0.1.0/datalad-concepts/src/spatial/unreleased.yaml +91 -0
  197. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-01-minimal.json +5 -0
  198. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-01-minimal.yaml +1 -0
  199. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-02-year.json +6 -0
  200. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-02-year.yaml +2 -0
  201. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-03-month.json +6 -0
  202. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-03-month.yaml +2 -0
  203. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-04-day.json +6 -0
  204. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-04-day.yaml +2 -0
  205. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-05-min.json +6 -0
  206. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-05-min.yaml +2 -0
  207. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-06-sec.json +6 -0
  208. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-06-sec.yaml +2 -0
  209. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-07-subsec.json +6 -0
  210. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-07-subsec.yaml +2 -0
  211. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-08-BCyear.json +6 -0
  212. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/examples/InstantaneousEvent-08-BCyear.yaml +5 -0
  213. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/extra-docs/about.md +0 -0
  214. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased/validation/InstanteneousEvent.valid.cfg.yaml +16 -0
  215. dump_things_service-0.1.0/datalad-concepts/src/temporal/unreleased.yaml +157 -0
  216. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/AttributeSpecification-01-minimal.json +6 -0
  217. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/AttributeSpecification-01-minimal.yaml +5 -0
  218. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/AttributeSpecification-02-with-attributes.json +20 -0
  219. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/AttributeSpecification-02-with-attributes.yaml +10 -0
  220. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Property-01-minimal.json +5 -0
  221. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Property-01-minimal.yaml +4 -0
  222. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Property-02-as_a_thing.json +13 -0
  223. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Property-02-as_a_thing.yaml +10 -0
  224. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Statement-01-minimal.json +5 -0
  225. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Statement-01-minimal.yaml +5 -0
  226. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Thing-01-minimal.json +5 -0
  227. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Thing-01-minimal.yaml +3 -0
  228. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Thing-02-identifiers.json +49 -0
  229. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Thing-02-identifiers.yaml +33 -0
  230. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Thing-03-topic.json +11 -0
  231. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Thing-03-topic.yaml +6 -0
  232. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Thing-04-relations.json +22 -0
  233. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Thing-04-relations.yaml +13 -0
  234. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Thing-05-publication.json +143 -0
  235. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Thing-05-publication.yaml +74 -0
  236. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Thing-06-annotations.json +18 -0
  237. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/Thing-06-annotations.yaml +13 -0
  238. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/ValueSpecification-01-minimal.json +6 -0
  239. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/ValueSpecification-01-minimal.yaml +9 -0
  240. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/ValueSpecification-02-quantitative-measurement.json +28 -0
  241. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/examples/ValueSpecification-02-quantitative-measurement.yaml +16 -0
  242. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/extra-docs/about.md +72 -0
  243. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/validation/AttributeSpecification.valid.cfg.yaml +10 -0
  244. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/validation/Property.valid.cfg.yaml +10 -0
  245. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/validation/Statement.valid.cfg.yaml +9 -0
  246. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/validation/Thing.valid.cfg.yaml +13 -0
  247. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased/validation/ValueSpecification.valid.cfg.yaml +10 -0
  248. dump_things_service-0.1.0/datalad-concepts/src/things/unreleased.yaml +485 -0
  249. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/AttributeSpecification-01-minimal.json +6 -0
  250. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/AttributeSpecification-01-minimal.yaml +5 -0
  251. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/AttributeSpecification-02-with-attributes.json +20 -0
  252. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/AttributeSpecification-02-with-attributes.yaml +10 -0
  253. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Property-01-minimal.json +5 -0
  254. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Property-01-minimal.yaml +4 -0
  255. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Property-02-as_a_thing.json +13 -0
  256. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Property-02-as_a_thing.yaml +10 -0
  257. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Statement-01-minimal.json +5 -0
  258. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Statement-01-minimal.yaml +5 -0
  259. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Thing-01-minimal.json +5 -0
  260. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Thing-01-minimal.yaml +3 -0
  261. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Thing-02-identifiers.json +49 -0
  262. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Thing-02-identifiers.yaml +33 -0
  263. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Thing-03-topic.json +11 -0
  264. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Thing-03-topic.yaml +6 -0
  265. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Thing-04-relations.json +22 -0
  266. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Thing-04-relations.yaml +13 -0
  267. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Thing-05-publication.json +143 -0
  268. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Thing-05-publication.yaml +74 -0
  269. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Thing-06-annotations.json +18 -0
  270. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/Thing-06-annotations.yaml +13 -0
  271. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/ValueSpecification-01-minimal.json +6 -0
  272. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/ValueSpecification-01-minimal.yaml +9 -0
  273. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/ValueSpecification-02-quantitative-measurement.json +28 -0
  274. dump_things_service-0.1.0/datalad-concepts/src/things/v1/examples/ValueSpecification-02-quantitative-measurement.yaml +16 -0
  275. dump_things_service-0.1.0/datalad-concepts/src/things/v1/extra-docs/about.md +72 -0
  276. dump_things_service-0.1.0/datalad-concepts/src/things/v1/validation/AttributeSpecification.valid.cfg.yaml +10 -0
  277. dump_things_service-0.1.0/datalad-concepts/src/things/v1/validation/Property.valid.cfg.yaml +10 -0
  278. dump_things_service-0.1.0/datalad-concepts/src/things/v1/validation/Statement.valid.cfg.yaml +9 -0
  279. dump_things_service-0.1.0/datalad-concepts/src/things/v1/validation/Thing.valid.cfg.yaml +14 -0
  280. dump_things_service-0.1.0/datalad-concepts/src/things/v1/validation/ValueSpecification.valid.cfg.yaml +10 -0
  281. dump_things_service-0.1.0/datalad-concepts/src/things/v1.yaml +488 -0
  282. dump_things_service-0.1.0/datalad-concepts/src/types/unreleased/extra-docs/about.md +0 -0
  283. dump_things_service-0.1.0/datalad-concepts/src/types/unreleased.yaml +106 -0
  284. dump_things_service-0.1.0/datalad-concepts/tools/patch_linkml +18 -0
  285. dump_things_service-0.1.0/dlschema-things.yaml +488 -0
  286. dump_things_service-0.1.0/dump_things_service/__about__.py +1 -0
  287. dump_things_service-0.1.0/dump_things_service/__init__.py +38 -0
  288. dump_things_service-0.1.0/dump_things_service/config.py +400 -0
  289. dump_things_service-0.1.0/dump_things_service/conftest.py +11 -0
  290. dump_things_service-0.1.0/dump_things_service/convert.py +178 -0
  291. dump_things_service-0.1.0/dump_things_service/dynamic_endpoints.py +56 -0
  292. dump_things_service-0.1.0/dump_things_service/main.py +368 -0
  293. dump_things_service-0.1.0/dump_things_service/model.py +75 -0
  294. dump_things_service-0.1.0/dump_things_service/record.py +325 -0
  295. dump_things_service-0.1.0/dump_things_service/resolve_curie.py +23 -0
  296. dump_things_service-0.1.0/dump_things_service/tests/__init__.py +0 -0
  297. dump_things_service-0.1.0/dump_things_service/tests/create_store.py +118 -0
  298. dump_things_service-0.1.0/dump_things_service/tests/fixtures.py +200 -0
  299. dump_things_service-0.1.0/dump_things_service/tests/test_basic.py +225 -0
  300. dump_things_service-0.1.0/dump_things_service/tests/test_config.py +70 -0
  301. dump_things_service-0.1.0/dump_things_service/tests/test_extract_inline.py +313 -0
  302. dump_things_service-0.1.0/dump_things_service/tests/test_mapping.py +46 -0
  303. dump_things_service-0.1.0/dump_things_service/tests/test_modes.py +148 -0
  304. dump_things_service-0.1.0/dump_things_service/tests/test_permission_fetching.py +71 -0
  305. dump_things_service-0.1.0/dump_things_service/tests/test_roundtrip.py +104 -0
  306. dump_things_service-0.1.0/dump_things_service/tests/test_roundtrip_trr379.py +129 -0
  307. dump_things_service-0.1.0/dump_things_service/tests/test_utils.py +40 -0
  308. dump_things_service-0.1.0/dump_things_service/tests/test_web_interface.py +84 -0
  309. dump_things_service-0.1.0/dump_things_service/tests/testschema.yaml +71 -0
  310. dump_things_service-0.1.0/dump_things_service/utils.py +54 -0
  311. dump_things_service-0.1.0/err1.1.json +16 -0
  312. dump_things_service-0.1.0/err1.2.json +16 -0
  313. dump_things_service-0.1.0/err1.json +30 -0
  314. dump_things_service-0.1.0/err1.ttl +27 -0
  315. dump_things_service-0.1.0/err2.json +3 -0
  316. dump_things_service-0.1.0/err2.ttl +45 -0
  317. dump_things_service-0.1.0/err3.1.ttl +12 -0
  318. dump_things_service-0.1.0/err3.ttl +7 -0
  319. dump_things_service-0.1.0/exa.ttl +11 -0
  320. dump_things_service-0.1.0/exa2.ttl +11 -0
  321. dump_things_service-0.1.0/exa3.ttl +12 -0
  322. dump_things_service-0.1.0/exa4.ttl +5 -0
  323. dump_things_service-0.1.0/exa5.ttl +5 -0
  324. dump_things_service-0.1.0/exa6.ttl +5 -0
  325. dump_things_service-0.1.0/exa7.ttl +5 -0
  326. dump_things_service-0.1.0/exa8.ttl +5 -0
  327. dump_things_service-0.1.0/example_conf.yaml +6 -0
  328. dump_things_service-0.1.0/good +4037 -0
  329. dump_things_service-0.1.0/in0.json +74 -0
  330. dump_things_service-0.1.0/in1.json +4 -0
  331. dump_things_service-0.1.0/in1.yaml +8 -0
  332. dump_things_service-0.1.0/in10.json +16 -0
  333. dump_things_service-0.1.0/in13.json +22 -0
  334. dump_things_service-0.1.0/in14.json +17 -0
  335. dump_things_service-0.1.0/in2.json +4 -0
  336. dump_things_service-0.1.0/in3.json +14 -0
  337. dump_things_service-0.1.0/in4.json +14 -0
  338. dump_things_service-0.1.0/in5.json +6 -0
  339. dump_things_service-0.1.0/in5.ttl +7 -0
  340. dump_things_service-0.1.0/in6.1.ttl +15 -0
  341. dump_things_service-0.1.0/in6.ttl +6 -0
  342. dump_things_service-0.1.0/in7.json +19 -0
  343. dump_things_service-0.1.0/in8.json +8 -0
  344. dump_things_service-0.1.0/in9.json +6 -0
  345. dump_things_service-0.1.0/o.ttl +23 -0
  346. dump_things_service-0.1.0/oo.ttl +22 -0
  347. dump_things_service-0.1.0/openapi.json +1 -0
  348. dump_things_service-0.1.0/out.json +17058 -0
  349. dump_things_service-0.1.0/out6.ttl +17 -0
  350. dump_things_service-0.1.0/p.ttl +85 -0
  351. dump_things_service-0.1.0/p2.ttl +84 -0
  352. dump_things_service-0.1.0/pyproject.toml +118 -0
  353. dump_things_service-0.1.0/requirements-devel.txt +16 -0
  354. dump_things_service-0.1.0/requirements-devel.txt.old +16 -0
  355. dump_things_service-0.1.0/requirements.txt +12 -0
  356. dump_things_service-0.1.0/requirements.txt.old +12 -0
  357. dump_things_service-0.1.0/s1.ttl +4 -0
  358. dump_things_service-0.1.0/s3.json +12 -0
  359. dump_things_service-0.1.0/s3.ttl +11 -0
  360. dump_things_service-0.1.0/s3.ttl.orig +4 -0
  361. dump_things_service-0.1.0/schema-base-full.yaml +3946 -0
  362. dump_things_service-0.1.0/schema-base.yaml +101 -0
  363. dump_things_service-0.1.0/schema-flatbase.yaml +450 -0
  364. dump_things_service-0.1.0/schema-flatdata.yaml +677 -0
  365. dump_things_service-0.1.0/schema-flatusers.yaml +309 -0
  366. dump_things_service-0.1.0/schema-simpleinput.yaml +991 -0
  367. dump_things_service-0.1.0/schema-simpleinput.yaml.orig +991 -0
  368. dump_things_service-0.1.0/schema-things.yaml +488 -0
  369. dump_things_service-0.1.0/schema-trr379.yaml +101 -0
  370. dump_things_service-0.1.0/schemas/buf.json +2022 -0
  371. dump_things_service-0.1.0/schemas/et1.yaml +78 -0
  372. dump_things_service-0.1.0/schemas/in11.json +4 -0
  373. dump_things_service-0.1.0/schemas/in12.json +22 -0
  374. dump_things_service-0.1.0/schemas/in13.json +22 -0
  375. dump_things_service-0.1.0/schemas/in14.json +8 -0
  376. dump_things_service-0.1.0/schemas/schema-flatbase.yaml +450 -0
  377. dump_things_service-0.1.0/schemas/schema-flatusers.yaml +309 -0
  378. dump_things_service-0.1.0/schemas/simpleinput_unreleased.py +2229 -0
  379. dump_things_service-0.1.0/schemas/simpleinput_unreleased.yaml +536 -0
  380. dump_things_service-0.1.0/schemas/t.json +0 -0
  381. dump_things_service-0.1.0/schemas/t.yaml +78 -0
  382. dump_things_service-0.1.0/schemas/tt.json +536 -0
  383. dump_things_service-0.1.0/schemas/tt.yaml +81 -0
  384. dump_things_service-0.1.0/schemas/ttt.yaml +94 -0
  385. dump_things_service-0.1.0/schemas/x.json +41 -0
  386. dump_things_service-0.1.0/schemas/x.yaml +16 -0
  387. dump_things_service-0.1.0/schemas/xxx.owl +1548 -0
  388. dump_things_service-0.1.0/schemas/yyy.out +6533 -0
  389. dump_things_service-0.1.0/t1.json +73 -0
  390. dump_things_service-0.1.0/t1.ttl +8 -0
  391. dump_things_service-0.1.0/t2.gz +0 -0
  392. dump_things_service-0.1.0/token1.tk +1 -0
  393. dump_things_service-0.1.0/token1.tk.gz +0 -0
  394. dump_things_service-0.1.0/tools/call_patch_linkml +9 -0
  395. dump_things_service-0.1.0/tools/convert.sh +34 -0
  396. dump_things_service-0.1.0/tools/create_test_store.py +37 -0
  397. dump_things_service-0.1.0/tools/validate.sh +37 -0
  398. dump_things_service-0.1.0/trr379.nopy +1586 -0
  399. dump_things_service-0.1.0/trr379.yaml +81 -0
  400. dump_things_service-0.1.0/ttl-outlined-1.ttl +13 -0
  401. dump_things_service-0.1.0/ttl-outlined-2.ttl +10 -0
  402. dump_things_service-0.1.0/ttl-outlined-3.ttl +7 -0
  403. dump_things_service-0.1.0/ttl-outlined-4.ttl +7 -0
  404. dump_things_service-0.1.0/ttl-outlined-combined-fixed.ttl +21 -0
  405. dump_things_service-0.1.0/ttl-outlined-combined.ttl +24 -0
  406. dump_things_service-0.1.0/unreleased.json +7311 -0
  407. dump_things_service-0.1.0/unreleased.yaml +15049 -0
  408. dump_things_service-0.1.0/x.1.ttl +10 -0
  409. dump_things_service-0.1.0/x.2.ttl +21 -0
  410. dump_things_service-0.1.0/x.3.ttl +12 -0
  411. dump_things_service-0.1.0/x.fixed.ttl +10 -0
  412. dump_things_service-0.1.0/x.json +26 -0
  413. dump_things_service-0.1.0/x.min.ttl +5 -0
  414. dump_things_service-0.1.0/x.py +2759 -0
  415. dump_things_service-0.1.0/x.ttl +21 -0
  416. dump_things_service-0.1.0/xf.1.ttl +12 -0
  417. dump_things_service-0.1.0/xxx +4056 -0
  418. dump_things_service-0.1.0/y.ttl +23 -0
  419. dump_things_service-0.1.0/yaml2json.py +16 -0
  420. dump_things_service-0.1.0/z.json +35 -0
  421. dump_things_service-0.1.0/z.ttl +11 -0
@@ -0,0 +1,25 @@
1
+ name: Test execution
2
+ on: [push]
3
+ jobs:
4
+ Test-all:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - name: Check out repository code
8
+ uses: actions/checkout@v4
9
+
10
+ - name: Set up Python
11
+ uses: actions/setup-python@v4
12
+ with:
13
+ python-version: '3.11'
14
+
15
+ - name: Install dependencies
16
+ run: |
17
+ pip install -r requirements.txt
18
+
19
+ - name: Install subdatasets
20
+ run: |
21
+ git submodule update --init --recursive
22
+
23
+ - name: run tests
24
+ run: |
25
+ hatch run tests:run
@@ -0,0 +1,3 @@
1
+ .idea/**
2
+ **/__pycache__
3
+ **/.hypothesis
@@ -0,0 +1,4 @@
1
+ [submodule "datalad-concepts"]
2
+ path = datalad-concepts
3
+ url = https://github.com/psychoinformatics-de/datalad-concepts.git
4
+ datalad-url = https://github.com/psychoinformatics-de/datalad-concepts.git
@@ -0,0 +1,141 @@
1
+ # LinkML YAML API Service - Final Report
2
+
3
+ ## Overview
4
+ This report summarizes the development of a web API service that stores records as YAML files based on LinkML schemas. The service is implemented in Python using FastAPI and supports storing, retrieving, and searching records with pagination capabilities. The architecture is designed to scale to billions of records.
5
+
6
+ ## Key Features
7
+
8
+ ### Core Functionality
9
+ - **YAML-based Storage**: Records are stored as YAML files in a sharded directory structure
10
+ - **LinkML Schema Integration**: Records are validated against the provided LinkML schema
11
+ - **RESTful API**: FastAPI-based endpoints for CRUD operations
12
+ - **Scalable Architecture**: Directory sharding based on SHA256 hashes of record PIDs
13
+
14
+ ### Advanced Features
15
+ - **Pagination**: Support for both offset-based and cursor-based pagination
16
+ - **Attribute-based Search**: Search records by content of attributes
17
+ - **Sorting**: Sort results by any attribute or metadata field
18
+ - **Concurrency Handling**: Robust handling of concurrent operations
19
+
20
+ ## Architecture
21
+
22
+ ### Storage Strategy
23
+ The service implements a scalable storage strategy using directory sharding:
24
+
25
+ 1. **SHA256-based Sharding**:
26
+ - The SHA256 hash of each record's PID is calculated
27
+ - The first 3 characters are used as the subdirectory name
28
+ - The remaining characters plus ".yaml" form the filename
29
+
30
+ 2. **Indexing**:
31
+ - SQLite database for efficient record lookup and search
32
+ - Attributes are indexed for attribute-based queries
33
+ - Full-text search capabilities for text attributes
34
+
35
+ 3. **Concurrency Management**:
36
+ - Transaction-based operations with proper locking
37
+ - Retry mechanisms for handling concurrent access
38
+
39
+ ## API Endpoints
40
+
41
+ ### Record Management
42
+ - `POST /api/v1/records`: Create a new record
43
+ - `GET /api/v1/records/{pid}`: Get a record by PID
44
+ - `DELETE /api/v1/records/{pid}`: Delete a record by PID
45
+ - `GET /api/v1/records`: List records with pagination
46
+
47
+ ### Search and Advanced Features
48
+ - `POST /api/v1/records/search`: Search for records with basic filtering
49
+ - `POST /api/v1/records/advanced-search`: Advanced search with complex filtering, sorting, and pagination options
50
+
51
+ ### Schema Information
52
+ - `GET /api/v1/schema/classes`: Get all classes defined in the schema
53
+ - `GET /api/v1/schema/class/{class_name}`: Get details about a specific class
54
+
55
+ ## Implementation Details
56
+
57
+ ### Directory Structure
58
+ ```
59
+ linkml_yaml_api/
60
+ ├── app/
61
+ │ ├── api/
62
+ │ │ ├── endpoints.py
63
+ │ │ └── advanced_search.py
64
+ │ ├── core/
65
+ │ │ └── config.py
66
+ │ ├── models/
67
+ │ │ └── api_models.py
68
+ │ ├── schemas/
69
+ │ │ └── schema_manager.py
70
+ │ ├── storage/
71
+ │ │ ├── yaml_storage.py
72
+ │ │ └── enhanced_index.py
73
+ │ └── main.py
74
+ ├── data/
75
+ ├── schema/
76
+ │ └── unreleased.yaml
77
+ ├── run.py
78
+ └── test_api.py
79
+ ```
80
+
81
+ ### Key Components
82
+
83
+ #### YAML Storage
84
+ The `YAMLStorage` class handles the storage and retrieval of YAML files, implementing the sharded directory structure and ensuring proper serialization/deserialization.
85
+
86
+ #### Schema Manager
87
+ The `SchemaManager` class loads and validates the LinkML schema, generating Pydantic models for validation and providing schema information to the API.
88
+
89
+ #### Enhanced Index
90
+ The `EnhancedIndexManager` class provides efficient indexing and search capabilities, with support for attribute-based filtering, sorting, and pagination.
91
+
92
+ ## Current Status and Limitations
93
+
94
+ ### Validated Functionality
95
+ - ✅ CRUD operations (Create, Read, Update, Delete)
96
+ - ✅ Record validation against LinkML schema
97
+ - ✅ Scalable storage architecture
98
+ - ✅ Basic pagination
99
+
100
+ ### Known Limitations
101
+ - ⚠️ Advanced search functionality may require additional tuning for complex queries
102
+ - ⚠️ Full-text search is implemented but may need optimization for large datasets
103
+ - ⚠️ The current implementation uses SQLite, which may become a bottleneck for extremely large datasets
104
+
105
+ ## Future Enhancements
106
+
107
+ ### Potential Improvements
108
+ 1. **Database Scaling**: Replace SQLite with PostgreSQL for larger deployments
109
+ 2. **Caching Layer**: Add Redis caching for frequently accessed records
110
+ 3. **Asynchronous Processing**: Implement background workers for indexing large batches
111
+ 4. **Advanced Query Language**: Develop a more expressive query language for complex searches
112
+ 5. **Monitoring and Metrics**: Add comprehensive monitoring for performance tracking
113
+
114
+ ## Usage Instructions
115
+
116
+ ### Starting the Service
117
+ ```bash
118
+ python run.py --host 0.0.0.0 --port 8000
119
+ ```
120
+
121
+ ### Creating a Record
122
+ ```bash
123
+ curl -X POST "http://localhost:8000/api/v1/records" \
124
+ -H "Content-Type: application/json" \
125
+ -d '{"record": {"id": "example:123", "@type": "Person", "family_name": "Doe", "given_name": "John"}}'
126
+ ```
127
+
128
+ ### Retrieving a Record
129
+ ```bash
130
+ curl -X GET "http://localhost:8000/api/v1/records/example:123"
131
+ ```
132
+
133
+ ### Searching Records
134
+ ```bash
135
+ curl -X POST "http://localhost:8000/api/v1/records/search" \
136
+ -H "Content-Type: application/json" \
137
+ -d '{"query": {"record_type": "Person"}, "page": 0, "page_size": 10}'
138
+ ```
139
+
140
+ ## Conclusion
141
+ The LinkML YAML API service provides a robust foundation for storing and retrieving records based on LinkML schemas. The architecture is designed to scale to billions of records through directory sharding and efficient indexing. While the core CRUD functionality is solid, some advanced search features may require additional tuning for optimal performance in production environments.
@@ -0,0 +1,284 @@
1
+ Metadata-Version: 2.4
2
+ Name: dump-things-service
3
+ Version: 0.1.0
4
+ Project-URL: Documentation, https://github.com/christian-monch/dump-things-server
5
+ Project-URL: Issues, https://github.com/christian-monch/dump-things-server/issues
6
+ Project-URL: Source, https://github.com/christian-monch/dump-things-server
7
+ Author-email: Christian Mönch <christian.moench@web.de>
8
+ License-Expression: MIT
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: Implementation :: CPython
17
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
18
+ Requires-Python: >=3.8
19
+ Requires-Dist: aiohttp
20
+ Requires-Dist: click==8.1.8
21
+ Requires-Dist: fastapi[standard]
22
+ Requires-Dist: fsspec
23
+ Requires-Dist: linkml
24
+ Requires-Dist: pydantic==2.8.0
25
+ Requires-Dist: pyyaml
26
+ Requires-Dist: rdflib
27
+ Requires-Dist: requests
28
+ Description-Content-Type: text/markdown
29
+
30
+
31
+ ### Dump Things Service
32
+
33
+ This is an implementation of a service that allows to store and retrieve data that is structured according to given schemata.
34
+
35
+ Data is stored in **collections**.
36
+ Each collection has a name and an associated schema.
37
+ All data records in the collection have to adhere to the given schema.
38
+
39
+ The general workflow in the service is as follows.
40
+ We distinguish between two areas of a collection, an **incoming** are and a **curated** area.
41
+ Data written to a collection is stored in a collection-specific **incoming** area.
42
+ A curation process, which is outside the scope of the service, moves data from the incoming area of a collection to the **curated** area of the collection.
43
+
44
+ In order to submit a record to a collection, a token is required.
45
+ The token defines read- and write- permissions for the incoming areas of collections and read-permissions for the curated area of a collection.
46
+ A token can carry permissions for multiple collections.
47
+ In addition the token carries a submitter ID.
48
+ It also defines a token specific **zone** in the incoming area.
49
+ So any read- and write-operations on an incoming area are actually restricted to the token-specific zone in the incoming area.
50
+ Multiple tokens can share the same zone.
51
+ That allows multiple submitters to work together when storing records in the service.
52
+
53
+ The service provides a HTTP-based API to store and retrieve data objects, and to verify token capabilities.
54
+
55
+
56
+ ### Running the service
57
+
58
+ The basic service configuration is done via command line parameters and configuration files.
59
+
60
+ The following command line parameters are supported:
61
+
62
+ - `<storage root>`: (mandatory) the path of a directory that serves as anchor for all relative paths given in the configuration files. Unless `-c/--config` is provided, the service will search the configuration file in `<storage root>/.dumpthings.yaml`.
63
+
64
+ - `--host <IP-address>`: The IP-address on which the service should accept connections (default: `0.0.0.0`).
65
+
66
+ - `--port <port>`: The port on which the service should accept connections (default: `8000`).
67
+
68
+ - `-c/--config <config-file>`: provide a path to the configuration file. The configuration file in `<storage root>/.dumpthings.yaml` will be ignored, if it exists at all.
69
+
70
+ - `--origins <origin>`: add a CORS origin hosts (repeat to add multiple CORS origin URLs).`
71
+
72
+ - `--root-path <path>`: Set the ASGI 'root_path' for applications submounted below a given URL path.
73
+
74
+
75
+ ### Configuration file
76
+
77
+ The service is configured via a configuration file that defines collections, pathes for incoming and curated data for each collection, as well as token properties.
78
+ Token properties include a submitter identification and for each collection an incoming zone specifier, permissions for reading and writing of the incoming zone and permission for reading the curated data of the collection.
79
+
80
+ A "formal" definition of the configuration file is provided by the class `GlobalConfig` in the file `dumpthings-server/config.py`.
81
+
82
+ Configurations are read in YAML format. The following is an example configuration file that illustrates all options:
83
+
84
+ ```yaml
85
+ type: collections # has to be "collections"
86
+ version: 1 # has to be 1
87
+
88
+ # All collections are listed in "collections"
89
+ collections:
90
+
91
+ # The following entry defines the collection "personal_records"
92
+ personal_records:
93
+ # The token, as defined below, that is used if no token is provided by a client.
94
+ # All tokens that are provided by the client will be OR-ed with the default token.
95
+ # That means all permissions in the default token will be added to the client provided
96
+ # token. In this way the default token will always be less or equally powerful as the
97
+ # client provided token.
98
+ default_token: no_access
99
+
100
+ # The path to the curated data of the collection. This path should contain the
101
+ # ".dumpthings.yaml"-configuration for collections that is described
102
+ # here: <https://concepts.datalad.org/dump-things/>.
103
+ # A relative path is interpreted relative to the storage root, which is provided on
104
+ # service start. An absolute path is interpreted as an absolute path.
105
+ curated: curated/personal_records
106
+
107
+ # The path to the incoming data of the collection.
108
+ # Different collections should have different curated- and incoming-paths
109
+ incoming: /tmp/personal_records/incoming
110
+
111
+ # The following entry defines the collection "rooms_and_buildings"
112
+ rooms_and_buildings:
113
+ default_token: basic_access
114
+ curated: curated/rooms_and_buildings
115
+ incoming: incoming/rooms_and_buildings
116
+
117
+ # The following entry defines the collection "fixed_data", which does not
118
+ # support data uploading, because there is no token that allows uploads to
119
+ # "fixed_data".
120
+ fixed_data:
121
+ default_token: basic_access
122
+ # If not upload is supported, the "incoming"-entry is not necessary.
123
+ curated: curated/fixed_data_curated
124
+
125
+ # All tokens are listed in "tokens"
126
+ tokens:
127
+
128
+ # The following entry defines the token "basic_access". This token allows read-only
129
+ # access to the two collections: "rooms_and_buildings" and "fixed_data".
130
+ basic_access:
131
+
132
+ # The value of "user-id" will be added as an annotation to each record that is
133
+ # uploaded with this token.
134
+ user_id: anonymous
135
+
136
+ # The collections for which the token holds rights are defined in "collections"
137
+ collections:
138
+
139
+ # The rights that "basic_access" carries for the collection "rooms_and_buildings"
140
+ # are defined here.
141
+ rooms_and_buildings:
142
+ # Access modes are defined here:
143
+ # <https://github.com/christian-monch/dump-things-server/issues/67#issuecomment-2834900042>
144
+ mode: READ_CURATED
145
+
146
+ # A token and collection-specific label, that defines "zones" in which incoming
147
+ # records are stored. Multiple tokens can share the same zone, for example if
148
+ # many clients with individual tokens work together to build a collection.
149
+ # (Since this token does not allow right access, "incoming_label" is ignored and
150
+ # left empty here (TODO: it should not be required in this case)).
151
+ incoming_label: ''
152
+
153
+ # The rights that "basic_access" carries for the collection "fixed_data"
154
+ # are defined here.
155
+ fixed_data:
156
+ mode: READ_CURATED
157
+ incoming_label: ''
158
+
159
+ # The following entry defines the token "no_access". This token does not allow
160
+ # any access and is used as a default token for the collection "personal_records".
161
+ no_access:
162
+ user_id: nobody
163
+
164
+ collections:
165
+ personal_records:
166
+ mode: NOTHING
167
+ incoming_label: ''
168
+
169
+ # The following entry defines the token "admin". It gives full access rights to
170
+ # the collection "personal_records".
171
+ admin:
172
+ user_id: Admin
173
+ collections:
174
+ personal_records:
175
+ mode: WRITE_COLLECTION
176
+ incoming_label: 'admin_posted_records'
177
+
178
+ # The following entry defines the token "contributor_bob". It gives full access
179
+ # to "rooms_and_buildings" for a user with the id "Bob".
180
+ contributor_bob:
181
+ user_id: Bob
182
+ collections:
183
+ rooms_and_buildings:
184
+ mode: WRITE_COLLECTION
185
+ incoming_label: new_rooms_and_buildings
186
+
187
+ # The following entry defines the token "contributor_alice". It gives full access
188
+ # to "rooms_and_buildings" for a user with the id "Alice". Bob and Alice share the
189
+ # same incoming-zone, i.e. "new_rooms_and_buildings". That means they can read
190
+ # incoming records that the other one posted.
191
+ contributor_alice:
192
+ user_id: Alice
193
+ collections:
194
+ rooms_and_buildings:
195
+ mode: WRITE_COLLECTION
196
+ incoming_label: new_rooms_and_buildings
197
+ ```
198
+
199
+ #### Command line parameters:
200
+
201
+ The service supports the following command line parameters:
202
+
203
+ - `<storage root>`: this is a mandatory parameter that defines the directory that serves as root for relative `curated`- and `incoming`-paths. Unless the `-c/--config` option is given, the configuration is loaded from `<storage root>/.dumpthings.yaml`.
204
+
205
+ - `--host`: (optional): the IP address of the host the service should run on
206
+
207
+
208
+ - `--port`: the port number the service should listen on
209
+
210
+
211
+ - `-c/--config`: if set, the service will read the configuration from the given path. Otherwise it will try to read the configuration from `<storage root>/.dumpthings.yaml`.
212
+
213
+ - `--error-mode`: if set, the service will run even if an error prevents it from starting properly. It will report the error on every request. This can be useful if the service is deployed automatically and a no other monitoring method is available.
214
+
215
+ The service can be started via `hatch` like this:
216
+
217
+ ```bash
218
+ hatch run fastapi:run /data-storage/store
219
+ ```
220
+ In this example the service will run on the network location `0.0.0.0:8000` and provide access to the stores under `/data-storage/store`.
221
+
222
+ To run the service on a specific host and port, use the command line options `--host` and `--port`, for example:
223
+
224
+ ```bash
225
+ hatch run fastapi:run /data-storage/store --host 127.0.0.1 --port 8000
226
+ ```
227
+
228
+ ### Endpoints
229
+
230
+ Most endpoints require a *collection*. These correspond to the names of the "data record collection"-directories (for example `myschema-v3-fmta` in [Dump Things Service](https://concepts.datalad.org/dump-things/)) in the stores.
231
+
232
+ The service provides the following endpoints:
233
+
234
+ - `POST /<collection>/record/<class>`: an object of type `<class>` (defined by the schema associated with `<collection>`) can be posted to this endpoint.
235
+ The object-content must be JSON-encoded.
236
+ In order to `POST` an object to the service, you MUST provide a valid token in the HTTP-header `X-DumpThings-Token`. This token has to correspond to a token value defined in the configuration file.
237
+ In addition, the `content-type`-header must be set to `application/json`.
238
+ The endpoint supports the query parameter `format`, to select the format of the posted data.
239
+ It can be set to `json` (the default) or to `ttl` (Terse RDF Triple Language, a.k.a. Turtle).
240
+ If the `ttl`-format is selected, the content-type should be `text/turtle`.
241
+ The service supports extraction of inlined records as described in [Dump Things Service](https://concepts.datalad.org/dump-things/).
242
+ On success the endpoint will return a list of all stored records.
243
+ This might be more than one record if the posted object contains inlined records.
244
+
245
+
246
+ - `GET /<collection>/records/<class>`: retrieve all objects of type `<class>` or any of its subclasses that are stored in a token storage space or the global storage space of the service.
247
+ If the service was started with the `--no-global-store` flag, records in the global storage space will be ignored.
248
+ If a token is provided, all matching objects from the token storage space are returned.
249
+ If the service was started with the `--no-global-store` flag, it will only return objects from the token storage space, otherwise the service returns objects from the global storage space in addition.
250
+ Objects from token space take precedence over objects from the global space, i.e. if there are two objects with identical `pid` in the global store and the object store, the record from the token store will be returned.
251
+ The endpoint supports the query parameter `format`, which determines the format of the query result.
252
+ It can be set to `json` (the default) or to `ttl`,
253
+
254
+
255
+ - `GET /<collection>/record?pid=<pid>`: retrieve an object with the pid `<pid>` from a token storage space or from the global storage of the service.
256
+ If the service was started with the `--no-global-store` flag, records in the global storage space will be ignored.
257
+ If a token is provided, the object is first searched in the token storage space.
258
+ If the service was started with the `--no-global-store` flag, it will only search in the token storage space, otherwise the service will also search in the global storage space in addition.
259
+ Only objects with a type defined by the schema associated with `<collection>` are considered.
260
+ The endpoint supports the query parameter `format`, which determines the format of the query result.
261
+ It can be set to `json` (the default) or to `ttl`,
262
+
263
+
264
+ - `POST /<collection>/token_permissions`: post an object of type `TokenCapabilityRequest` (JSON-encoded) to receive the permission flags and the zone-label of the specified token, or of the default token.
265
+
266
+
267
+ - `GET /docs`: provides information about the API of the service, i.e. about all endpoints.
268
+
269
+
270
+ #### Restrictions
271
+
272
+ The current implementation has the following restriction:
273
+
274
+ - does not yet support any other data format than `yaml`
275
+
276
+
277
+ ### Acknowledgements
278
+
279
+ This work was funded, in part, by
280
+
281
+ - Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under grant TRR 379 (546006540, Q02 project)
282
+
283
+
284
+ - MKW-NRW: Ministerium für Kultur und Wissenschaft des Landes Nordrhein-Westfalen under the Kooperationsplattformen 2022 program, grant number: KP22-106A