linkml-reference-validator 0.7.0__tar.gz → 0.8.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 (288) hide show
  1. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/PKG-INFO +1 -1
  2. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/concepts/content-types.md +1 -0
  3. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/how-to/add-reference-source.md +15 -5
  4. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/how-to/fetch-full-text-and-pdfs.md +12 -0
  5. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/how-to/use-local-files-and-urls.md +32 -2
  6. linkml_reference_validator-0.8.0/docs/how-to/use-signed-excerpts.md +262 -0
  7. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/reference/cli.md +32 -1
  8. linkml_reference_validator-0.8.0/src/linkml_reference_validator/_version.py +11 -0
  9. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/cli/__init__.py +1 -1
  10. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/cli/cache.py +10 -1
  11. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/cli/excerpts.py +101 -2
  12. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/cli/repair.py +3 -111
  13. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/fulltext/loader.py +44 -11
  14. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/reference_fetcher.py +119 -10
  15. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/sources/file.py +35 -5
  16. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/sources/loader.py +57 -30
  17. linkml_reference_validator-0.8.0/src/linkml_reference_validator/excerpt_signing.py +530 -0
  18. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/models.py +44 -0
  19. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/plugins/reference_validation_plugin.py +136 -0
  20. linkml_reference_validator-0.8.0/src/linkml_reference_validator/validation/evidence_items.py +124 -0
  21. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/validation/supporting_text_validator.py +23 -1
  22. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_cache_filename_collisions.py +3 -1
  23. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_cache_validation.py +7 -2
  24. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_cli_cache_reference.py +20 -3
  25. linkml_reference_validator-0.8.0/tests/test_config_precedence.py +269 -0
  26. linkml_reference_validator-0.8.0/tests/test_designates_type.py +325 -0
  27. linkml_reference_validator-0.8.0/tests/test_excerpts_sign.py +508 -0
  28. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_file_reference_cache.py +14 -7
  29. linkml_reference_validator-0.8.0/tests/test_file_reference_not_cached.py +119 -0
  30. linkml_reference_validator-0.8.0/tests/test_local_full_text.py +194 -0
  31. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_svg_extractor.py +2 -0
  32. linkml_reference_validator-0.7.0/docs/how-to/use-signed-excerpts.md +0 -122
  33. linkml_reference_validator-0.7.0/src/linkml_reference_validator/_version.py +0 -8
  34. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.claude/.mcp.json +0 -0
  35. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.claude/settings.json +0 -0
  36. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.copier-answers.yml +0 -0
  37. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.devcontainer/devcontainer.json +0 -0
  38. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.devcontainer/post_create.sh +0 -0
  39. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.editorconfig +0 -0
  40. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/actions/claude-code-action/action.yml +0 -0
  41. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/actions/claude-issue-summarize-action/action.yml +0 -0
  42. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/actions/claude-issue-triage-action/action.yml +0 -0
  43. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/ai-controllers.json +0 -0
  44. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/copilot-instructions.md +0 -0
  45. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/copilot-setup-steps.yml +0 -0
  46. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/dependabot.yml +0 -0
  47. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/workflows/claude-code-review.yml +0 -0
  48. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/workflows/claude-issue-summarize.yml +0 -0
  49. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/workflows/claude-issue-triage.yml +0 -0
  50. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/workflows/claude-ontology-review.yml +0 -0
  51. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/workflows/claude.yml +0 -0
  52. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/workflows/deploy-docs.yaml +0 -0
  53. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/workflows/dragon-ai.yml +0 -0
  54. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/workflows/main.yaml +0 -0
  55. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.github/workflows/pypi-publish.yaml +0 -0
  56. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.gitignore +0 -0
  57. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.goosehints +0 -0
  58. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.pre-commit-config.yaml +0 -0
  59. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/.yamllint.yaml +0 -0
  60. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/AGENTS.md +0 -0
  61. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/BUG_GEO_ACCESSION_TO_UID.md +0 -0
  62. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/BUG_ZENODO_DOI_AND_URL_HANDLING.md +0 -0
  63. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/CLAUDE.md +0 -0
  64. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/CLI-ISSUES.md +0 -0
  65. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/CODE_OF_CONDUCT.md +0 -0
  66. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/CONTRIBUTING.md +0 -0
  67. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/FEATURE_REQUEST_REPAIR.md +0 -0
  68. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/LICENSE +0 -0
  69. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/README.md +0 -0
  70. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/REVIEW2.md +0 -0
  71. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/REVIEW3.md +0 -0
  72. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/ai.just +0 -0
  73. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/benchmarks/repeated_quotes.py +0 -0
  74. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/copilot-instructions.md +0 -0
  75. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/about.md +0 -0
  76. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/assets/zotero-find-full-text.png +0 -0
  77. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/concepts/editorial-conventions.md +0 -0
  78. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/concepts/how-it-works.md +0 -0
  79. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/elements/.gitkeep +0 -0
  80. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/how-to/export-cache-to-zotero.md +0 -0
  81. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/how-to/repair-validation-errors.md +0 -0
  82. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/how-to/skip-unsupported-references.md +0 -0
  83. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/how-to/validate-clinical-trials.md +0 -0
  84. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/how-to/validate-dois.md +0 -0
  85. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/how-to/validate-entrez.md +0 -0
  86. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/how-to/validate-obo-files.md +0 -0
  87. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/how-to/validate-titles.md +0 -0
  88. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/how-to/validate-urls.md +0 -0
  89. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/how-to/validate-wikipedia.md +0 -0
  90. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/index.md +0 -0
  91. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/notebooks/01_getting_started.ipynb +0 -0
  92. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/notebooks/02_advanced_usage.ipynb +0 -0
  93. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/notebooks/03_python_api.ipynb +0 -0
  94. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/notebooks/04_obo_validation.ipynb +0 -0
  95. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/notebooks/05_geo_validation.ipynb +0 -0
  96. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/quickstart.md +0 -0
  97. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/reference/cache-format.md +0 -0
  98. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/reference/splitting.md +0 -0
  99. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/setup-guide.md +0 -0
  100. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/superpowers/plans/2026-06-12-modular-pdf-fulltext-fetching.md +0 -0
  101. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/superpowers/plans/2026-08-05-private-library-full-text.md +0 -0
  102. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/superpowers/specs/2026-06-12-modular-pdf-fulltext-fetching-design.md +0 -0
  103. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/superpowers/specs/2026-08-05-private-library-full-text-design.md +0 -0
  104. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/templates-linkml/README.md +0 -0
  105. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/todo.md +0 -0
  106. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/troubleshooting.md +0 -0
  107. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/docs/tutorials/complete-workflow.md +0 -0
  108. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/examples/README.md +0 -0
  109. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/justfile +0 -0
  110. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/mkdocs.yml +0 -0
  111. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/mypy.ini +0 -0
  112. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/notebooks/01_getting_started.ipynb +0 -0
  113. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/notebooks/02_advanced_usage.ipynb +0 -0
  114. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/notebooks/03_python_api.ipynb +0 -0
  115. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/notebooks/README.md +0 -0
  116. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/project/README.md +0 -0
  117. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/project.justfile +0 -0
  118. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/pyproject.toml +0 -0
  119. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/pytest.ini +0 -0
  120. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/skills/linkml-reference-validator/SKILL.md +0 -0
  121. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/skills/linkml-reference-validator/references/configuration.md +0 -0
  122. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/skills/linkml-reference-validator/references/guardrails.md +0 -0
  123. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/__init__.py +0 -0
  124. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/cache.py +0 -0
  125. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/cli/lookup.py +0 -0
  126. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/cli/shared.py +0 -0
  127. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/cli/validate.py +0 -0
  128. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/__init__.py +0 -0
  129. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/acquire.py +0 -0
  130. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/csl_export.py +0 -0
  131. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/extract/__init__.py +0 -0
  132. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/extract/base.py +0 -0
  133. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/extract/drawio.py +0 -0
  134. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/extract/html.py +0 -0
  135. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/extract/pdf.py +0 -0
  136. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/extract/svg.py +0 -0
  137. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/extract/svg_geometry.py +0 -0
  138. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/extract/untrusted_xml.py +0 -0
  139. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/extract/xml.py +0 -0
  140. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/fulltext/__init__.py +0 -0
  141. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/fulltext/base.py +0 -0
  142. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/fulltext/bioc.py +0 -0
  143. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/fulltext/bookshelf.py +0 -0
  144. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/fulltext/epmc.py +0 -0
  145. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/fulltext/epmc_preprint.py +0 -0
  146. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/fulltext/json_api.py +0 -0
  147. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/fulltext/openalex.py +0 -0
  148. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/fulltext/pmc.py +0 -0
  149. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/fulltext/unpaywall.py +0 -0
  150. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/fulltext/zotero.py +0 -0
  151. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/identifiers.py +0 -0
  152. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/rules.py +0 -0
  153. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/sources/__init__.py +0 -0
  154. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/sources/base.py +0 -0
  155. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/sources/clinicaltrials.py +0 -0
  156. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/sources/doi.py +0 -0
  157. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/sources/entrez.py +0 -0
  158. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/sources/json_api.py +0 -0
  159. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/sources/pmid.py +0 -0
  160. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/sources/ppr.py +0 -0
  161. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/sources/url.py +0 -0
  162. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/sources/utils.py +0 -0
  163. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/sources/wikipedia.py +0 -0
  164. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/etl/text_extractor.py +0 -0
  165. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/field_detection.py +0 -0
  166. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/matching.py +0 -0
  167. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/plugins/REVIEW.md +0 -0
  168. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/plugins/__init__.py +0 -0
  169. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/signed_excerpts.py +0 -0
  170. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/validation/__init__.py +0 -0
  171. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/validation/fuzzy_text_utils.py +0 -0
  172. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/src/linkml_reference_validator/validation/repairer.py +0 -0
  173. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/__init__.py +0 -0
  174. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/conftest.py +0 -0
  175. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/data/test_data_deep_nesting_invalid.yaml +0 -0
  176. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/data/test_data_deep_nesting_valid.yaml +0 -0
  177. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/data/test_data_invalid.yaml +0 -0
  178. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/data/test_data_valid.yaml +0 -0
  179. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/data/test_schema.yaml +0 -0
  180. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/data/test_schema_deep_nesting.yaml +0 -0
  181. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/GEO_GSE12345.md +0 -0
  182. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/PMC_TEST001.md +0 -0
  183. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/PMC_TEST001.txt +0 -0
  184. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/PMC_TEST002.md +0 -0
  185. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/PMC_TEST002.txt +0 -0
  186. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/PMID_TEST001.md +0 -0
  187. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/PMID_TEST001.txt +0 -0
  188. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/PMID_TEST002.md +0 -0
  189. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/PMID_TEST002.txt +0 -0
  190. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/PMID_TEST003.md +0 -0
  191. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/PMID_TEST003.txt +0 -0
  192. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/bookshelf/esummary_20301710.xml +0 -0
  193. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/bookshelf/gene_NBK1116/men1.nxml +0 -0
  194. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/bookshelf/pubmed_20301710.xml +0 -0
  195. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/clinicaltrials_NCT00000001.md +0 -0
  196. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/fulltext_html/README.md +0 -0
  197. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/fulltext_html/dspace-32894695.html +0 -0
  198. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/fulltext_html/iris-19049553.html +0 -0
  199. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/fulltext_html/plos-0000308.html +0 -0
  200. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/jats/PMC5593426.xml +0 -0
  201. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/jats/README.md +0 -0
  202. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/fixtures/sample.obo +0 -0
  203. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_absent_abstract_recovery.py +0 -0
  204. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_acquire.py +0 -0
  205. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_bookshelf_provider.py +0 -0
  206. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_bot_challenge.py +0 -0
  207. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_cache_author_recovery.py +0 -0
  208. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_cache_read_robustness.py +0 -0
  209. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_cli.py +0 -0
  210. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_cli_cache_enrich.py +0 -0
  211. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_cli_cache_export.py +0 -0
  212. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_cli_lookup.py +0 -0
  213. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_cli_repair.py +0 -0
  214. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_clinicaltrials_cache.py +0 -0
  215. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_clinicaltrials_integration.py +0 -0
  216. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_deep_nesting.py +0 -0
  217. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_doi_preprint.py +0 -0
  218. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_doi_title_cleaning.py +0 -0
  219. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_doi_url_encoding.py +0 -0
  220. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_drawio.py +0 -0
  221. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_e2e_integration.py +0 -0
  222. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_empty_snippets.py +0 -0
  223. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_epmc_preprint_provider.py +0 -0
  224. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_extractor_fidelity.py +0 -0
  225. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_extractors.py +0 -0
  226. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_field_detection.py +0 -0
  227. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_field_detection_qualifiers.py +0 -0
  228. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_frontmatter_and_doi_case.py +0 -0
  229. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_fulltext_loader.py +0 -0
  230. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_fulltext_providers.py +0 -0
  231. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_fuzzy_suggestions.py +0 -0
  232. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_geo_integration.py +0 -0
  233. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_greek_variants.py +0 -0
  234. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_html_fulltext_acceptance.py +0 -0
  235. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_html_scope_text.py +0 -0
  236. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_identifiers.py +0 -0
  237. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_inline_abstract_headings.py +0 -0
  238. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_jats_tables.py +0 -0
  239. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_json_api_source.py +0 -0
  240. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_ligature_normalization.py +0 -0
  241. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_long_cache_filenames.py +0 -0
  242. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_meaning_changes.py +0 -0
  243. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_meaning_symbols.py +0 -0
  244. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_models.py +0 -0
  245. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_multivalued_reference.py +0 -0
  246. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_no_cache_downgrade.py +0 -0
  247. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_normalized_content_cache.py +0 -0
  248. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_open_access_policy.py +0 -0
  249. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_optional_linkml_dependency.py +0 -0
  250. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_pdf_url_title.py +0 -0
  251. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_plugin_integration.py +0 -0
  252. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_plugin_value_shapes.py +0 -0
  253. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_pmc_fulltext.py +0 -0
  254. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_pmid_network.py +0 -0
  255. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_ppr_source.py +0 -0
  256. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_publisher_typography.py +0 -0
  257. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_real_validation.py +0 -0
  258. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_reference_fetcher.py +0 -0
  259. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_repair.py +0 -0
  260. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_repair_data_output.py +0 -0
  261. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_repair_thresholds.py +0 -0
  262. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_rules.py +0 -0
  263. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_serve_stale_html_optin.py +0 -0
  264. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_signed_excerpts_and_fair_use.py +0 -0
  265. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_signed_excerpts_sync.py +0 -0
  266. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_source_network_errors.py +0 -0
  267. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_source_utils.py +0 -0
  268. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_sources.py +0 -0
  269. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_split_supporting_text.py +0 -0
  270. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_supporting_text_validator.py +0 -0
  271. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_svg_edges.py +0 -0
  272. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_text_extractor.py +0 -0
  273. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_title_only_shapes.py +0 -0
  274. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_title_validation.py +0 -0
  275. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_trust_cached_entries.py +0 -0
  276. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_unknown_slot_traversal.py +0 -0
  277. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_url_fragment_cache.py +0 -0
  278. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_url_html_sanitize.py +0 -0
  279. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_url_html_to_text.py +0 -0
  280. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_url_source_cache_version.py +0 -0
  281. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_validation_config.py +0 -0
  282. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_validation_counts.py +0 -0
  283. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_welded_markers.py +0 -0
  284. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_wikipedia_source.py +0 -0
  285. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_word_boundaries.py +0 -0
  286. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_xml_extractor_text.py +0 -0
  287. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/tests/test_zotero_provider.py +0 -0
  288. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.8.0}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: linkml_reference_validator
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: Validation of supporting text from references and publications
5
5
  Author-email: Chris Mungall <cjmungall@lbl.gov>
6
6
  License-Expression: Apache-2.0
@@ -12,6 +12,7 @@ When fetching references, the validator tracks what type of content was retrieve
12
12
  | `abstract_only` | PMID, DOI | Only the abstract was available |
13
13
  | `summary` | GEO, BioProject, BioSample, ClinicalTrials | Database summary/description field |
14
14
  | `local_file` | file: | Content read from local filesystem |
15
+ | `local_full_text` | any (via `local_full_text`) | A local file mapped to a cited ID; never cached |
15
16
  | `local_svg` | file: (`.svg`) | Text an SVG figure renders, a blank line between labels; a quote must fall within one label |
16
17
  | `local_drawio` | file: (`.drawio`) | Labels a drawio diagram draws, read like `local_svg` |
17
18
  | `url` | url: | Content fetched from web URL |
@@ -44,11 +44,21 @@ linkml-reference-validator validate text \
44
44
 
45
45
  ### Configuration File Locations
46
46
 
47
- Sources are loaded from these locations (in order of priority):
48
-
49
- 1. `~/.config/linkml-reference-validator/sources/*.yaml` (user-level)
50
- 2. `.linkml-reference-validator-sources.yaml` (project-level)
51
- 3. `sources:` section in your main config file
47
+ Sources are loaded from these locations. If the same prefix is defined in
48
+ more than one place, the most specific definition wins (highest precedence
49
+ first):
50
+
51
+ 1. A dedicated sources file passed explicitly (`sources_file`)
52
+ 2. `sources:` section in your main config file
53
+ 3. `.linkml-reference-validator-sources.yaml` (or `.yml`) in the current
54
+ directory (project-level; if both exist, `.yaml` wins)
55
+ 4. `~/.config/linkml-reference-validator/sources/*.yaml` and `*.yml`
56
+ (user-level; files are read in alphabetical order and a later file
57
+ overrides an earlier one)
58
+
59
+ So a project file overrides your personal defaults, and a file you pass
60
+ explicitly overrides both. Prefixes defined in only one place are always
61
+ available.
52
62
 
53
63
  ### Source Configuration Fields
54
64
 
@@ -367,6 +367,18 @@ full_text_providers:
367
367
  - openalex
368
368
  ```
369
369
 
370
+ Custom provider definitions are read from three places. If the same provider
371
+ name is defined in more than one, the most specific definition wins (highest
372
+ precedence first):
373
+
374
+ 1. The file named by `full_text_providers_file`
375
+ 2. `.linkml-reference-validator-fulltext.yaml` in the current directory
376
+ (project-level)
377
+ 3. `~/.config/linkml-reference-validator/fulltext/*.yaml` (user-level; files
378
+ are read in alphabetical order and a later file overrides an earlier one)
379
+
380
+ Names defined in only one place are always available.
381
+
370
382
  ## Provenance fields
371
383
 
372
384
  When a reference is enriched with full text, the cached reference records where
@@ -31,8 +31,38 @@ file:/Users/me/research/notes.md
31
31
  1. If `reference_base_dir` is configured, paths resolve relative to it
32
32
  2. Otherwise, paths resolve relative to the current working directory
33
33
 
34
- Note: cached references use the resolved absolute path in the reference ID, so
35
- the cache file name reflects the full path.
34
+ A file under `reference_base_dir` (or, if that is unset, the working directory)
35
+ is named relative to it in reports, so `file:/home/me/repo/papers/a.md` is
36
+ reported as `file:papers/a.md`. A file outside it keeps its absolute path.
37
+
38
+ ### Local files are not cached
39
+
40
+ A `file:` reference is always read straight from the file, and its text is
41
+ **not** written to `cache_dir` or any other cache. The file is often a paper the
42
+ project may not redistribute, and `cache_dir` is usually committed.
43
+
44
+ To cache your own notes anyway, for the cache commands or export, set:
45
+
46
+ ```yaml
47
+ validation:
48
+ cache_local_files: true
49
+ reference_base_dir: .
50
+ ```
51
+
52
+ Set `reference_base_dir` too. Without it, entries are named relative to the
53
+ directory you happen to run from, and a file reached through `../` keeps its
54
+ absolute path, including your home directory.
55
+
56
+ Earlier versions (up to and including 0.6.0) wrote every `file:` reference to
57
+ `cache_dir`. If you validated against a closed paper with one of them, check the committed
58
+ cache for entries with `content_type: local_file` and remove them:
59
+
60
+ ```bash
61
+ grep -l "content_type: local_file" references_cache/*.md
62
+ ```
63
+
64
+ To cite such a paper by its real identifier instead of a path, see
65
+ [Using Signed Excerpts](use-signed-excerpts.md#signing-excerpts-from-local-full-text).
36
66
 
37
67
  ### Configuring a Base Directory
38
68
 
@@ -0,0 +1,262 @@
1
+ # Using Signed Excerpts from a Private Full-Text Store
2
+
3
+ A public repository cannot commit closed-access full texts to its
4
+ `references_cache/`, so a quote taken from the body of a paywalled paper fails
5
+ ordinary validation. Signed excerpts close that gap. A **private store** holds
6
+ the full texts and verifies short, fair-use excerpts against them. The
7
+ verified excerpts are then copied into the public repository, where the
8
+ validator accepts an exact match against them.
9
+
10
+ The store is any directory of YAML bundles. The reference setup is
11
+ [claimstore](https://github.com/monarch-initiative/claimstore), a private
12
+ repository that runs this validator over its own full texts and writes its
13
+ bundles to `signed_excerpts/`.
14
+
15
+ ## How validation uses signed excerpts
16
+
17
+ Set `signed_excerpts_dir` in `.linkml-reference-validator.yaml`:
18
+
19
+ ```yaml
20
+ validation:
21
+ cache_dir: references_cache
22
+ signed_excerpts_dir: signed_excerpts
23
+ ```
24
+
25
+ An excerpt then passes if EITHER:
26
+
27
+ 1. it matches the reference in `references_cache/` as usual, OR
28
+ 2. it exactly matches (after collapsing whitespace) an excerpt recorded for
29
+ that reference in `signed_excerpts/<REF_ID>.yaml`.
30
+
31
+ Any edit to a signed excerpt in the public repository makes it fail, so the
32
+ public copy cannot drift from what the private store verified.
33
+
34
+ A bundle is named like a cache file (`PMID_12345.yaml`,
35
+ `DOI_10.1038_s41418-020-0601-5.yaml`) and looks like this:
36
+
37
+ ```yaml
38
+ reference_id: PMID:12345
39
+ title: Example title
40
+ excerpts:
41
+ - text: The verbatim quote ... with omitted words marked by an ellipsis.
42
+ claim_text: Optional paraphrase of the claim the quote supports.
43
+ target_repo:
44
+ - dismech:kb/disorders/Example.yaml
45
+ ```
46
+
47
+ Only `reference_id` and each excerpt's `text` are used by validation. Other
48
+ fields (claims, NER annotations, checksums) are carried along unchanged.
49
+
50
+ ## Signing excerpts from local full text
51
+
52
+ You may not need a separate private store. If you hold a closed paper's full
53
+ text on your own machine, licensed for your use but not for redistribution,
54
+ the validator can check quotes against it and write the bundle itself.
55
+
56
+ ### 1. Map the reference to the local file
57
+
58
+ Cite the paper by its real identifier in the data:
59
+
60
+ ```yaml
61
+ evidence:
62
+ - reference: DOI:10.1016/j.ajodo.2025.11.017
63
+ supporting_text: "The T-appliance is a removable activator supported by both the maxilla and the mandible."
64
+ ```
65
+
66
+ Then tell the validator where the text is, either one reference at a time:
67
+
68
+ ```yaml
69
+ validation:
70
+ signed_excerpts_dir: signed_excerpts
71
+ local_full_text:
72
+ DOI:10.1016/j.ajodo.2025.11.017: papers/10.1016_j.ajodo.2025.11.017.md
73
+ ```
74
+
75
+ or with a directory of files named like cache files
76
+ (`DOI_10.1016_j.ajodo.2025.11.017.md` or `.txt`):
77
+
78
+ ```yaml
79
+ validation:
80
+ local_full_text_dir: ~/private-papers
81
+ ```
82
+
83
+ Relative paths, including a relative `local_full_text_dir`, resolve against
84
+ `reference_base_dir`, or the working directory if that is unset. Set
85
+ `reference_base_dir` so the result does not depend on where you run the
86
+ command. Keep the files out of the repository, or list them in
87
+ `.gitignore`.
88
+
89
+ While a mapped file exists, quotes citing that ID are matched against it, in
90
+ preference to any fetched text. The paper's metadata (title and so on) is
91
+ still fetched and cached as usual, but **the file's text is never written to
92
+ any cache**. Where the file is absent, for example in CI or on another
93
+ curator's machine, validation works exactly as if nothing were mapped.
94
+
95
+ ### 2. Sign the quotes
96
+
97
+ ```bash
98
+ linkml-reference-validator excerpts sign kb/disorders/*.yaml
99
+ ```
100
+
101
+ For every cited reference that has local text, each quote is validated
102
+ against the file, with the usual matcher and fair-use caps
103
+ (`max_excerpt_length`, `max_total_chars_per_reference`,
104
+ `max_reference_fraction`). Quotes that pass are written to
105
+ `signed_excerpts/<REF_ID>.yaml`. Quotes that fail are listed, are not signed,
106
+ and make the command exit 1.
107
+
108
+ ```yaml
109
+ reference_id: DOI:10.1016/j.ajodo.2025.11.017
110
+ title: ...
111
+ source_char_count: 41230
112
+ excerpts:
113
+ - text: The T-appliance is a removable activator supported by both the maxilla and the mandible.
114
+ verification:
115
+ method: local_full_text
116
+ source_sha256: 3f1c...
117
+ validator_version: 0.7.0
118
+ verified_at: '2026-11-17'
119
+ ```
120
+
121
+ The bundle stores each quote as it is written in the data, because CI
122
+ compares quotes against the bundle exactly. `source_char_count` lets CI
123
+ apply `max_reference_fraction` without the file.
124
+
125
+ Options:
126
+
127
+ - `--reference ID` (repeatable) signs only those references. A requested
128
+ reference with no local text is reported and the command exits 1.
129
+ - `--check` writes nothing and exits 1 if any bundle is out of date.
130
+ - `--prune` removes excerpts this command signed earlier that the data no
131
+ longer cites, including from bundles for references the data no longer
132
+ cites at all. Excerpts from anywhere else, such as a private store, are
133
+ always kept. Pass **every** data file with `--prune`: a quote cited only in
134
+ a file you left out counts as no longer cited. A reference with any quote
135
+ that fails to verify is not pruned in that run, so a wrongly mapped file
136
+ (a preprint instead of the published paper, say) cannot delete good
137
+ excerpts. With `--reference`, only the named references are pruned, and
138
+ bundles for references the data no longer cites are left alone.
139
+ Only bundles named as validation reads them (`<REF_ID>.yaml`, or `.yml`
140
+ when there is no `.yaml`) are pruned; a hand-named file is left alone.
141
+ A bundle whose excerpts from elsewhere are already over a cap is reported
142
+ on every `--prune` run, because pruning never removes them; trim it by hand.
143
+ Keep only bundles in `signed_excerpts_dir`: `--prune` reads every YAML
144
+ file there, and one that is not a readable bundle is reported and makes the
145
+ command exit 1.
146
+ - `--signed-excerpts-dir DIR` overrides the destination in the config.
147
+
148
+ The fair-use caps are checked twice: on each run's quotes, as in validation,
149
+ and on the merged bundle as a whole, because the bundle keeps every quote
150
+ ever signed into it. This is checked for every bundle the command would
151
+ write to, including one that is otherwise unchanged, so `--check` reports a bundle that a lowered
152
+ cap or a hand edit has pushed over. A bundle that would go over
153
+ `max_total_chars_per_reference` or `max_reference_fraction` is not written.
154
+ The same is true if the source file changes while its quotes are being
155
+ checked, since the recorded hash would not match the text that was checked.
156
+
157
+ Re-signing is deterministic. An existing bundle keeps its excerpts, their
158
+ order and their other fields (such as `target_repo`). An excerpt already
159
+ verified against the same file (the same `source_sha256`) is left as it is,
160
+ so an unchanged run rewrites nothing. New quotes are added in sorted order.
161
+ An existing bundle is never used as evidence when signing, so an entry typed
162
+ by hand cannot be re-signed without matching the file.
163
+
164
+ ### 3. Commit the bundle
165
+
166
+ Commit `signed_excerpts/*.yaml` together with the data. CI validates the same
167
+ `DOI:` citation through the bundle and never needs the paper.
168
+
169
+ ### What "signed" means here
170
+
171
+ The `verification` record is an **attestation, not a cryptographic
172
+ signature**. It records which text a quote was checked against, with which
173
+ version, and when, so a reviewer can tell signed entries from hand-typed
174
+ ones. It cannot stop someone who can edit the bundle from also editing the
175
+ record. In particular, it does not defend against an agent that writes a
176
+ bundle directly. To require the record, set:
177
+
178
+ ```yaml
179
+ validation:
180
+ signed_excerpts_require_verification: true
181
+ ```
182
+
183
+ Then validation ignores excerpts that have no `verification.source_sha256`.
184
+ This is off by default so bundles written before `excerpts sign` existed keep
185
+ working.
186
+
187
+ The hash identifies the *text file* that was matched, not the paper. Two
188
+ extractions of one paper (PDF to text, or JATS XML) have different hashes.
189
+
190
+ ## Syncing bundles with `excerpts sync`
191
+
192
+ `excerpts sync` copies bundles from a local checkout of the private store
193
+ into `signed_excerpts_dir`. Files are copied byte for byte, so the public copy
194
+ is exactly what the store verified.
195
+
196
+ ```bash
197
+ linkml-reference-validator excerpts sync --source ../claimstore/signed_excerpts
198
+ ```
199
+
200
+ With no filters every bundle is copied. A store usually serves several
201
+ repositories, so two filters narrow the selection. A bundle is copied if it
202
+ passes EITHER filter:
203
+
204
+ - `--target-repo NAME` selects bundles with an excerpt whose `target_repo`
205
+ is `NAME` or starts with `NAME:`.
206
+ - `--referenced-in GLOB` (repeatable) selects bundles whose `reference_id` is
207
+ cited in a file matching the glob. This catches excerpts that were never
208
+ tagged with a `target_repo`. Globs are relative to the working directory,
209
+ and a glob that matches no files is an error. The `reference_id` is matched
210
+ as written in the bundle (ignoring case), without the prefix normalization
211
+ that validation applies, so bundles should use the same CURIE form as the
212
+ citing data.
213
+
214
+ List every directory whose files are validated against `signed_excerpts_dir`.
215
+ With `--prune`, a bundle cited only from a directory left out of the list is
216
+ deleted.
217
+
218
+ Other options:
219
+
220
+ - `--prune` deletes bundles in the destination that are no longer selected.
221
+ Files that are not YAML, such as a README, are left alone. Pruning is refused
222
+ if nothing is selected, so a wrong source cannot empty the destination.
223
+ - `--check` writes nothing and exits 1 if the destination is out of date. Other
224
+ errors (missing source, malformed bundle, bad glob) exit 2.
225
+ - `--signed-excerpts-dir DIR` overrides the destination from the config.
226
+
227
+ ### Configuring a repository
228
+
229
+ Put the selection in the config file so that everyone syncs the same way. The
230
+ source path depends on where each person cloned the private store, so supply it
231
+ with `--source` or the `LRV_SIGNED_EXCERPTS_SOURCE` environment variable. It can
232
+ also go in `signed_excerpts_sync.source_dir`, but then it is the same for everyone.
233
+
234
+ ```yaml
235
+ validation:
236
+ signed_excerpts_dir: signed_excerpts
237
+ signed_excerpts_sync:
238
+ target_repo: dismech
239
+ referenced_in:
240
+ - kb/disorders/*.yaml
241
+ - kb/modules/*.yaml
242
+ prune: true
243
+ ```
244
+
245
+ Options given on the command line override the config.
246
+
247
+ ### Example: dismech
248
+
249
+ [dismech](https://github.com/monarch-initiative/dismech) cites claimstore
250
+ excerpts in `kb/disorders/`. Its config holds the settings above, and its
251
+ justfile wraps the command:
252
+
253
+ ```bash
254
+ # needs read access to the private monarch-initiative/claimstore repo
255
+ git clone git@github.com:monarch-initiative/claimstore.git ../claimstore
256
+ just sync-signed-excerpts # uses ../claimstore by default
257
+ CLAIMSTORE_DIR=~/repos/claimstore just sync-signed-excerpts
258
+ ```
259
+
260
+ Then commit the changed `signed_excerpts/*.yaml` files with the disorder files
261
+ that quote them. Validation in dismech CI reads only the committed
262
+ `signed_excerpts/` and never needs access to the private store.
@@ -18,7 +18,7 @@ linkml-reference-validator [OPTIONS] COMMAND [ARGS]...
18
18
  - `validate` - Validate supporting text against references
19
19
  - `repair` - Repair supporting text validation errors
20
20
  - `cache` - Manage reference cache
21
- - `excerpts` - Manage signed excerpts synced from a private full-text store
21
+ - `excerpts` - Sign excerpts against local full text, or sync them from a private store
22
22
 
23
23
  ---
24
24
 
@@ -713,6 +713,37 @@ the `signed_excerpts_sync` section of the config.
713
713
 
714
714
  ---
715
715
 
716
+ ## excerpts sign
717
+
718
+ Verify quotes in data files against local full text mapped with
719
+ `local_full_text` or `local_full_text_dir`, and write the quotes that pass to
720
+ snippet-only bundles in `signed_excerpts_dir`. See
721
+ [Signing excerpts from local full text](../how-to/use-signed-excerpts.md#signing-excerpts-from-local-full-text).
722
+
723
+ ### Usage
724
+
725
+ ```bash
726
+ linkml-reference-validator excerpts sign [OPTIONS] DATA_FILES...
727
+ ```
728
+
729
+ ### Options
730
+
731
+ - `--reference, -r ID` - Only sign quotes citing this reference (repeatable)
732
+ - `--signed-excerpts-dir PATH` - Destination (default: `signed_excerpts_dir` from config)
733
+ - `--check` - Write nothing; exit 1 if any bundle is out of date
734
+ - `--prune` - Remove excerpts this command signed earlier that are no longer cited
735
+ - `--config PATH` - Configuration file
736
+
737
+ ### Exit Codes
738
+
739
+ - `0` - Signed (or, with `--check`, already up to date)
740
+ - `1` - A quote failed to verify, a bundle would exceed a fair-use cap, the
741
+ source changed during the run, a requested reference has no local text, or
742
+ (with `--check`) a bundle is out of date
743
+ - `2` - No destination configured, or a data file is missing
744
+
745
+ ---
746
+
716
747
  ## cache
717
748
 
718
749
  Manage reference cache.
@@ -0,0 +1,11 @@
1
+ from importlib.metadata import version, PackageNotFoundError
2
+ from typing import Union
3
+
4
+ try:
5
+ __version__ = version("linkml-reference-validator")
6
+ except PackageNotFoundError:
7
+ # package not installed
8
+ __version__ = "0.0.0"
9
+ __version_tuple__: tuple[Union[int, str], ...] = tuple(
10
+ int(part) if part.isdigit() else part for part in __version__.split(".")
11
+ )
@@ -38,7 +38,7 @@ app.add_typer(
38
38
  app.add_typer(
39
39
  excerpts_app,
40
40
  name="excerpts",
41
- help="Manage signed excerpts synced from a private full-text store",
41
+ help="Sign excerpts against local full text, or sync them from a private store",
42
42
  )
43
43
 
44
44
  # Register top-level lookup command
@@ -151,7 +151,10 @@ def reference_command(
151
151
 
152
152
  typer.echo(f"Fetching {reference_id}...")
153
153
 
154
- outcome = fetcher.fetch_with_provenance(reference_id, force_refresh=force)
154
+ # Report what the cache holds, not a local full text overlaid on it.
155
+ outcome = fetcher.fetch_with_provenance(
156
+ reference_id, force_refresh=force, use_local_full_text=False
157
+ )
155
158
 
156
159
  # What this command promises is that the cache holds a current entry
157
160
  # afterwards - not that it downloaded one, since an entry the current
@@ -177,6 +180,12 @@ def reference_command(
177
180
 
178
181
  reference = outcome.content
179
182
 
183
+ if reference and reference.reference_id.startswith("file:") and not config.cache_local_files:
184
+ typer.echo(
185
+ f"Read {reference_id}, but did not cache it: file: references are "
186
+ "not cached unless cache_local_files is set."
187
+ )
188
+ raise typer.Exit(0)
180
189
  if reference:
181
190
  typer.echo(f"Successfully cached {reference_id}")
182
191
  typer.echo(f" Title: {reference.title}")
@@ -1,4 +1,4 @@
1
- """Commands for managing signed excerpts synced from a private full-text store."""
1
+ """Commands for producing and syncing signed excerpts."""
2
2
 
3
3
  from pathlib import Path
4
4
  from typing import Optional
@@ -7,11 +7,12 @@ import typer
7
7
  from ruamel.yaml import YAMLError # type: ignore
8
8
  from typing_extensions import Annotated
9
9
 
10
+ from linkml_reference_validator.excerpt_signing import sign_excerpts
10
11
  from linkml_reference_validator.signed_excerpts import sync_signed_excerpts
11
12
  from .shared import ConfigFileOption, SignedExcerptsDirOption, load_validation_config
12
13
 
13
14
  excerpts_app = typer.Typer(
14
- help="Manage signed excerpts synced from a private full-text store",
15
+ help="Sign excerpts against local full text, or sync them from a private store",
15
16
  no_args_is_help=True,
16
17
  )
17
18
 
@@ -127,3 +128,101 @@ def sync_command(
127
128
  )
128
129
  if check and report.changed:
129
130
  raise typer.Exit(1)
131
+
132
+
133
+ @excerpts_app.command(name="sign")
134
+ def sign_command(
135
+ data_files: Annotated[
136
+ list[Path],
137
+ typer.Argument(help="YAML data files whose quotes should be signed"),
138
+ ],
139
+ reference: Annotated[
140
+ Optional[list[str]],
141
+ typer.Option(
142
+ "--reference",
143
+ "-r",
144
+ help=(
145
+ "Only sign quotes citing this reference (repeatable). Default: every "
146
+ "cited reference mapped by local_full_text or local_full_text_dir."
147
+ ),
148
+ ),
149
+ ] = None,
150
+ signed_excerpts_dir: SignedExcerptsDirOption = None,
151
+ check: Annotated[
152
+ bool,
153
+ typer.Option(
154
+ "--check",
155
+ help="Write nothing; exit 1 if any bundle is out of date",
156
+ ),
157
+ ] = False,
158
+ prune: Annotated[
159
+ bool,
160
+ typer.Option(
161
+ "--prune",
162
+ help=(
163
+ "Remove excerpts this command signed earlier that the data no longer "
164
+ "cites; excerpts from elsewhere are kept"
165
+ ),
166
+ ),
167
+ ] = False,
168
+ config_file: ConfigFileOption = None,
169
+ ):
170
+ """Verify quotes against local full text and write snippet-only bundles.
171
+
172
+ Quotes citing a reference that `local_full_text` or `local_full_text_dir`
173
+ maps to a file on this machine are matched against that file, with the
174
+ usual fair-use caps. Those that pass are written to
175
+ `signed_excerpts_dir/<REF_ID>.yaml` with a `verification` record, so CI can
176
+ validate the same citations without the file. Nothing else from the file
177
+ is written.
178
+
179
+ Exits 1 if a quote fails to verify or (with --check) a bundle is out of
180
+ date, and 2 on a usage error.
181
+
182
+ Examples:
183
+
184
+ linkml-reference-validator excerpts sign kb/disorders/*.yaml
185
+
186
+ linkml-reference-validator excerpts sign kb/disorders/X.yaml \\
187
+ --reference DOI:10.1016/j.ajodo.2025.11.017 --check
188
+ """
189
+ config = load_validation_config(config_file)
190
+ dest_dir = signed_excerpts_dir or config.signed_excerpts_dir
191
+ if dest_dir is None:
192
+ typer.echo(
193
+ "No destination: pass --signed-excerpts-dir or set signed_excerpts_dir in the config.",
194
+ err=True,
195
+ )
196
+ raise typer.Exit(2)
197
+ missing = [str(p) for p in data_files if not p.is_file()]
198
+ if missing:
199
+ typer.echo(f"Data file not found: {', '.join(missing)}", err=True)
200
+ raise typer.Exit(2)
201
+
202
+ report = sign_excerpts(
203
+ data_files,
204
+ config,
205
+ references=reference,
206
+ dest_dir=dest_dir,
207
+ dry_run=check,
208
+ prune=prune,
209
+ )
210
+
211
+ verb = "would be written" if check else "written"
212
+ for name in report.written:
213
+ typer.echo(f" {verb}: {name}")
214
+ for reference_id in report.no_local_text:
215
+ typer.echo(f" no local full text: {reference_id}", err=True)
216
+ for failure in report.failures:
217
+ if failure.text:
218
+ typer.echo(f" NOT signed ({failure.reference_id}): {failure.text}")
219
+ typer.echo(f" {failure.message}")
220
+ else:
221
+ label = f" ({failure.reference_id})" if failure.reference_id else ""
222
+ typer.echo(f" NOT signed{label}: {failure.message}")
223
+ typer.echo(
224
+ f"{dest_dir}: {len(report.written)} {verb}, {len(report.unchanged)} unchanged, "
225
+ f"{len(report.failures)} problem(s)"
226
+ )
227
+ if report.failures or report.no_local_text or (check and report.changed):
228
+ raise typer.Exit(1)