linkml-reference-validator 0.7.0__tar.gz → 0.9.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 (289) hide show
  1. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/PKG-INFO +1 -1
  2. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/concepts/content-types.md +1 -0
  3. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/how-to/add-reference-source.md +15 -5
  4. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/how-to/export-cache-to-zotero.md +15 -3
  5. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/how-to/fetch-full-text-and-pdfs.md +12 -0
  6. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/how-to/use-local-files-and-urls.md +32 -2
  7. linkml_reference_validator-0.9.0/docs/how-to/use-signed-excerpts.md +268 -0
  8. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/reference/cli.md +32 -1
  9. linkml_reference_validator-0.9.0/src/linkml_reference_validator/_version.py +11 -0
  10. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/cache.py +12 -2
  11. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/cli/__init__.py +1 -1
  12. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/cli/cache.py +90 -13
  13. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/cli/excerpts.py +101 -2
  14. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/cli/repair.py +3 -111
  15. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/acquire.py +37 -0
  16. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/fulltext/loader.py +44 -11
  17. linkml_reference_validator-0.9.0/src/linkml_reference_validator/etl/fulltext/zotero.py +483 -0
  18. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/reference_fetcher.py +161 -13
  19. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/sources/file.py +49 -5
  20. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/sources/loader.py +57 -30
  21. linkml_reference_validator-0.9.0/src/linkml_reference_validator/excerpt_signing.py +555 -0
  22. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/models.py +53 -0
  23. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/plugins/reference_validation_plugin.py +136 -0
  24. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/signed_excerpts.py +4 -1
  25. linkml_reference_validator-0.9.0/src/linkml_reference_validator/validation/evidence_items.py +124 -0
  26. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/validation/supporting_text_validator.py +23 -1
  27. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_cache_filename_collisions.py +3 -1
  28. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_cache_validation.py +7 -2
  29. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_cli_cache_enrich.py +129 -0
  30. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_cli_cache_reference.py +20 -3
  31. linkml_reference_validator-0.9.0/tests/test_config_precedence.py +269 -0
  32. linkml_reference_validator-0.9.0/tests/test_designates_type.py +325 -0
  33. linkml_reference_validator-0.9.0/tests/test_excerpts_sign.py +576 -0
  34. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_file_reference_cache.py +14 -7
  35. linkml_reference_validator-0.9.0/tests/test_file_reference_not_cached.py +119 -0
  36. linkml_reference_validator-0.9.0/tests/test_local_full_text.py +266 -0
  37. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_svg_extractor.py +2 -0
  38. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_zotero_provider.py +234 -0
  39. linkml_reference_validator-0.7.0/docs/how-to/use-signed-excerpts.md +0 -122
  40. linkml_reference_validator-0.7.0/src/linkml_reference_validator/_version.py +0 -8
  41. linkml_reference_validator-0.7.0/src/linkml_reference_validator/etl/fulltext/zotero.py +0 -252
  42. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.claude/.mcp.json +0 -0
  43. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.claude/settings.json +0 -0
  44. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.copier-answers.yml +0 -0
  45. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.devcontainer/devcontainer.json +0 -0
  46. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.devcontainer/post_create.sh +0 -0
  47. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.editorconfig +0 -0
  48. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/actions/claude-code-action/action.yml +0 -0
  49. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/actions/claude-issue-summarize-action/action.yml +0 -0
  50. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/actions/claude-issue-triage-action/action.yml +0 -0
  51. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/ai-controllers.json +0 -0
  52. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/copilot-instructions.md +0 -0
  53. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/copilot-setup-steps.yml +0 -0
  54. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/dependabot.yml +0 -0
  55. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/workflows/claude-code-review.yml +0 -0
  56. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/workflows/claude-issue-summarize.yml +0 -0
  57. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/workflows/claude-issue-triage.yml +0 -0
  58. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/workflows/claude-ontology-review.yml +0 -0
  59. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/workflows/claude.yml +0 -0
  60. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/workflows/deploy-docs.yaml +0 -0
  61. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/workflows/dragon-ai.yml +0 -0
  62. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/workflows/main.yaml +0 -0
  63. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.github/workflows/pypi-publish.yaml +0 -0
  64. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.gitignore +0 -0
  65. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.goosehints +0 -0
  66. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.pre-commit-config.yaml +0 -0
  67. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/.yamllint.yaml +0 -0
  68. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/AGENTS.md +0 -0
  69. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/BUG_GEO_ACCESSION_TO_UID.md +0 -0
  70. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/BUG_ZENODO_DOI_AND_URL_HANDLING.md +0 -0
  71. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/CLAUDE.md +0 -0
  72. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/CLI-ISSUES.md +0 -0
  73. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/CODE_OF_CONDUCT.md +0 -0
  74. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/CONTRIBUTING.md +0 -0
  75. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/FEATURE_REQUEST_REPAIR.md +0 -0
  76. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/LICENSE +0 -0
  77. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/README.md +0 -0
  78. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/REVIEW2.md +0 -0
  79. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/REVIEW3.md +0 -0
  80. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/ai.just +0 -0
  81. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/benchmarks/repeated_quotes.py +0 -0
  82. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/copilot-instructions.md +0 -0
  83. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/about.md +0 -0
  84. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/assets/zotero-find-full-text.png +0 -0
  85. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/concepts/editorial-conventions.md +0 -0
  86. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/concepts/how-it-works.md +0 -0
  87. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/elements/.gitkeep +0 -0
  88. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/how-to/repair-validation-errors.md +0 -0
  89. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/how-to/skip-unsupported-references.md +0 -0
  90. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/how-to/validate-clinical-trials.md +0 -0
  91. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/how-to/validate-dois.md +0 -0
  92. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/how-to/validate-entrez.md +0 -0
  93. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/how-to/validate-obo-files.md +0 -0
  94. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/how-to/validate-titles.md +0 -0
  95. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/how-to/validate-urls.md +0 -0
  96. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/how-to/validate-wikipedia.md +0 -0
  97. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/index.md +0 -0
  98. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/notebooks/01_getting_started.ipynb +0 -0
  99. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/notebooks/02_advanced_usage.ipynb +0 -0
  100. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/notebooks/03_python_api.ipynb +0 -0
  101. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/notebooks/04_obo_validation.ipynb +0 -0
  102. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/notebooks/05_geo_validation.ipynb +0 -0
  103. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/quickstart.md +0 -0
  104. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/reference/cache-format.md +0 -0
  105. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/reference/splitting.md +0 -0
  106. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/setup-guide.md +0 -0
  107. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/superpowers/plans/2026-06-12-modular-pdf-fulltext-fetching.md +0 -0
  108. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/superpowers/plans/2026-08-05-private-library-full-text.md +0 -0
  109. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/superpowers/specs/2026-06-12-modular-pdf-fulltext-fetching-design.md +0 -0
  110. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/superpowers/specs/2026-08-05-private-library-full-text-design.md +0 -0
  111. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/templates-linkml/README.md +0 -0
  112. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/todo.md +0 -0
  113. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/troubleshooting.md +0 -0
  114. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/docs/tutorials/complete-workflow.md +0 -0
  115. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/examples/README.md +0 -0
  116. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/justfile +0 -0
  117. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/mkdocs.yml +0 -0
  118. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/mypy.ini +0 -0
  119. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/notebooks/01_getting_started.ipynb +0 -0
  120. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/notebooks/02_advanced_usage.ipynb +0 -0
  121. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/notebooks/03_python_api.ipynb +0 -0
  122. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/notebooks/README.md +0 -0
  123. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/project/README.md +0 -0
  124. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/project.justfile +0 -0
  125. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/pyproject.toml +0 -0
  126. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/pytest.ini +0 -0
  127. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/skills/linkml-reference-validator/SKILL.md +0 -0
  128. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/skills/linkml-reference-validator/references/configuration.md +0 -0
  129. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/skills/linkml-reference-validator/references/guardrails.md +0 -0
  130. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/__init__.py +0 -0
  131. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/cli/lookup.py +0 -0
  132. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/cli/shared.py +0 -0
  133. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/cli/validate.py +0 -0
  134. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/__init__.py +0 -0
  135. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/csl_export.py +0 -0
  136. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/extract/__init__.py +0 -0
  137. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/extract/base.py +0 -0
  138. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/extract/drawio.py +0 -0
  139. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/extract/html.py +0 -0
  140. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/extract/pdf.py +0 -0
  141. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/extract/svg.py +0 -0
  142. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/extract/svg_geometry.py +0 -0
  143. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/extract/untrusted_xml.py +0 -0
  144. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/extract/xml.py +0 -0
  145. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/fulltext/__init__.py +0 -0
  146. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/fulltext/base.py +0 -0
  147. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/fulltext/bioc.py +0 -0
  148. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/fulltext/bookshelf.py +0 -0
  149. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/fulltext/epmc.py +0 -0
  150. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/fulltext/epmc_preprint.py +0 -0
  151. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/fulltext/json_api.py +0 -0
  152. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/fulltext/openalex.py +0 -0
  153. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/fulltext/pmc.py +0 -0
  154. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/fulltext/unpaywall.py +0 -0
  155. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/identifiers.py +0 -0
  156. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/rules.py +0 -0
  157. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/sources/__init__.py +0 -0
  158. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/sources/base.py +0 -0
  159. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/sources/clinicaltrials.py +0 -0
  160. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/sources/doi.py +0 -0
  161. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/sources/entrez.py +0 -0
  162. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/sources/json_api.py +0 -0
  163. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/sources/pmid.py +0 -0
  164. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/sources/ppr.py +0 -0
  165. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/sources/url.py +0 -0
  166. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/sources/utils.py +0 -0
  167. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/sources/wikipedia.py +0 -0
  168. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/etl/text_extractor.py +0 -0
  169. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/field_detection.py +0 -0
  170. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/matching.py +0 -0
  171. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/plugins/REVIEW.md +0 -0
  172. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/plugins/__init__.py +0 -0
  173. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/validation/__init__.py +0 -0
  174. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/validation/fuzzy_text_utils.py +0 -0
  175. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/src/linkml_reference_validator/validation/repairer.py +0 -0
  176. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/__init__.py +0 -0
  177. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/conftest.py +0 -0
  178. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/data/test_data_deep_nesting_invalid.yaml +0 -0
  179. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/data/test_data_deep_nesting_valid.yaml +0 -0
  180. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/data/test_data_invalid.yaml +0 -0
  181. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/data/test_data_valid.yaml +0 -0
  182. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/data/test_schema.yaml +0 -0
  183. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/data/test_schema_deep_nesting.yaml +0 -0
  184. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/GEO_GSE12345.md +0 -0
  185. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/PMC_TEST001.md +0 -0
  186. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/PMC_TEST001.txt +0 -0
  187. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/PMC_TEST002.md +0 -0
  188. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/PMC_TEST002.txt +0 -0
  189. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/PMID_TEST001.md +0 -0
  190. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/PMID_TEST001.txt +0 -0
  191. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/PMID_TEST002.md +0 -0
  192. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/PMID_TEST002.txt +0 -0
  193. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/PMID_TEST003.md +0 -0
  194. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/PMID_TEST003.txt +0 -0
  195. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/bookshelf/esummary_20301710.xml +0 -0
  196. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/bookshelf/gene_NBK1116/men1.nxml +0 -0
  197. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/bookshelf/pubmed_20301710.xml +0 -0
  198. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/clinicaltrials_NCT00000001.md +0 -0
  199. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/fulltext_html/README.md +0 -0
  200. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/fulltext_html/dspace-32894695.html +0 -0
  201. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/fulltext_html/iris-19049553.html +0 -0
  202. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/fulltext_html/plos-0000308.html +0 -0
  203. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/jats/PMC5593426.xml +0 -0
  204. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/jats/README.md +0 -0
  205. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/fixtures/sample.obo +0 -0
  206. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_absent_abstract_recovery.py +0 -0
  207. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_acquire.py +0 -0
  208. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_bookshelf_provider.py +0 -0
  209. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_bot_challenge.py +0 -0
  210. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_cache_author_recovery.py +0 -0
  211. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_cache_read_robustness.py +0 -0
  212. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_cli.py +0 -0
  213. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_cli_cache_export.py +0 -0
  214. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_cli_lookup.py +0 -0
  215. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_cli_repair.py +0 -0
  216. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_clinicaltrials_cache.py +0 -0
  217. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_clinicaltrials_integration.py +0 -0
  218. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_deep_nesting.py +0 -0
  219. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_doi_preprint.py +0 -0
  220. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_doi_title_cleaning.py +0 -0
  221. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_doi_url_encoding.py +0 -0
  222. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_drawio.py +0 -0
  223. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_e2e_integration.py +0 -0
  224. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_empty_snippets.py +0 -0
  225. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_epmc_preprint_provider.py +0 -0
  226. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_extractor_fidelity.py +0 -0
  227. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_extractors.py +0 -0
  228. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_field_detection.py +0 -0
  229. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_field_detection_qualifiers.py +0 -0
  230. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_frontmatter_and_doi_case.py +0 -0
  231. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_fulltext_loader.py +0 -0
  232. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_fulltext_providers.py +0 -0
  233. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_fuzzy_suggestions.py +0 -0
  234. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_geo_integration.py +0 -0
  235. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_greek_variants.py +0 -0
  236. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_html_fulltext_acceptance.py +0 -0
  237. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_html_scope_text.py +0 -0
  238. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_identifiers.py +0 -0
  239. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_inline_abstract_headings.py +0 -0
  240. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_jats_tables.py +0 -0
  241. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_json_api_source.py +0 -0
  242. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_ligature_normalization.py +0 -0
  243. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_long_cache_filenames.py +0 -0
  244. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_meaning_changes.py +0 -0
  245. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_meaning_symbols.py +0 -0
  246. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_models.py +0 -0
  247. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_multivalued_reference.py +0 -0
  248. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_no_cache_downgrade.py +0 -0
  249. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_normalized_content_cache.py +0 -0
  250. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_open_access_policy.py +0 -0
  251. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_optional_linkml_dependency.py +0 -0
  252. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_pdf_url_title.py +0 -0
  253. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_plugin_integration.py +0 -0
  254. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_plugin_value_shapes.py +0 -0
  255. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_pmc_fulltext.py +0 -0
  256. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_pmid_network.py +0 -0
  257. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_ppr_source.py +0 -0
  258. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_publisher_typography.py +0 -0
  259. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_real_validation.py +0 -0
  260. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_reference_fetcher.py +0 -0
  261. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_repair.py +0 -0
  262. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_repair_data_output.py +0 -0
  263. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_repair_thresholds.py +0 -0
  264. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_rules.py +0 -0
  265. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_serve_stale_html_optin.py +0 -0
  266. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_signed_excerpts_and_fair_use.py +0 -0
  267. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_signed_excerpts_sync.py +0 -0
  268. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_source_network_errors.py +0 -0
  269. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_source_utils.py +0 -0
  270. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_sources.py +0 -0
  271. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_split_supporting_text.py +0 -0
  272. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_supporting_text_validator.py +0 -0
  273. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_svg_edges.py +0 -0
  274. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_text_extractor.py +0 -0
  275. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_title_only_shapes.py +0 -0
  276. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_title_validation.py +0 -0
  277. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_trust_cached_entries.py +0 -0
  278. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_unknown_slot_traversal.py +0 -0
  279. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_url_fragment_cache.py +0 -0
  280. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_url_html_sanitize.py +0 -0
  281. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_url_html_to_text.py +0 -0
  282. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_url_source_cache_version.py +0 -0
  283. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_validation_config.py +0 -0
  284. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_validation_counts.py +0 -0
  285. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_welded_markers.py +0 -0
  286. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_wikipedia_source.py +0 -0
  287. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_word_boundaries.py +0 -0
  288. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.0}/tests/test_xml_extractor_text.py +0 -0
  289. {linkml_reference_validator-0.7.0 → linkml_reference_validator-0.9.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.9.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
 
@@ -86,19 +86,31 @@ which cached references now have usable Zotero text or PDF attachments. It does
86
86
  not invoke **Find Full Text** and does not modify Zotero.
87
87
 
88
88
  After reviewing the matches, materialize them into the separate private research
89
- cache:
89
+ cache (you can also pass `--zotero-dir ~/Zotero` to read your local Zotero SQLite
90
+ database and `storage/` folder directly without needing the Zotero desktop HTTP
91
+ API running, and `--referenced-in` or `--reference` to scope to specific data
92
+ files):
90
93
 
91
94
  ```bash
92
95
  uv run linkml-reference-validator cache enrich \
93
96
  --provider zotero \
97
+ --zotero-dir ~/Zotero \
94
98
  --cache-dir /Users/cjm/repos/dismech/references_cache \
99
+ --referenced-in 'kb/disorders/MyDisease.yaml' \
95
100
  --apply
96
101
  ```
97
102
 
98
103
  Apply mode leaves `references_cache` unchanged. Private content goes to
99
104
  `~/.cache/linkml-reference-validator/private` by default with owner-only
100
- permissions. Agents may inspect it for context, but validation cannot use it as
101
- evidence.
105
+ permissions (or to a private full-text repository such as `claimstore` when
106
+ `--private-cache-dir /path/to/claimstore/references_cache` is passed). When
107
+ `download_pdfs: true` is configured, `--zotero-dir` also copies the source PDF
108
+ into `<private_cache_dir>/files/` even when Zotero has already pre-indexed the
109
+ full text (whereas the HTTP API backend only downloads the PDF when Zotero has
110
+ not indexed the text). Ordinary validation never reads `private_cache_dir`
111
+ directly, but `linkml-reference-validator excerpts sign` can verify quotes
112
+ against it and write fair-use bundles to `signed_excerpts/` (see
113
+ [Using Signed Excerpts](use-signed-excerpts.md)).
102
114
 
103
115
  ## 5. Validate reproducibly
104
116
 
@@ -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,268 @@
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`, `.txt`, or `.pdf`):
77
+
78
+ ```yaml
79
+ validation:
80
+ local_full_text_dir: ~/private-papers
81
+ ```
82
+
83
+ If you used `linkml-reference-validator cache enrich --provider zotero --apply`
84
+ (see [Export a Reference Cache to Zotero](export-cache-to-zotero.md)), its
85
+ output in `private_cache_dir` (`~/.cache/linkml-reference-validator/private`) is
86
+ checked automatically by `excerpts sign` as a fallback for any reference not
87
+ already mapped in `local_full_text` or `local_full_text_dir`.
88
+
89
+ Relative paths, including a relative `local_full_text_dir`, resolve against
90
+ `reference_base_dir`, or the working directory if that is unset. Set
91
+ `reference_base_dir` so the result does not depend on where you run the
92
+ command. Keep the files out of the repository, or list them in
93
+ `.gitignore`.
94
+
95
+ While a mapped file exists, quotes citing that ID are matched against it, in
96
+ preference to any fetched text. The paper's metadata (title and so on) is
97
+ still fetched and cached as usual, but **the file's text is never written to
98
+ any cache**. Where the file is absent, for example in CI or on another
99
+ curator's machine, validation works exactly as if nothing were mapped.
100
+
101
+ ### 2. Sign the quotes
102
+
103
+ ```bash
104
+ linkml-reference-validator excerpts sign kb/disorders/*.yaml
105
+ ```
106
+
107
+ For every cited reference that has local text, each quote is validated
108
+ against the file, with the usual matcher and fair-use caps
109
+ (`max_excerpt_length`, `max_total_chars_per_reference`,
110
+ `max_reference_fraction`). Quotes that pass are written to
111
+ `signed_excerpts/<REF_ID>.yaml`. Quotes that fail are listed, are not signed,
112
+ and make the command exit 1.
113
+
114
+ ```yaml
115
+ reference_id: DOI:10.1016/j.ajodo.2025.11.017
116
+ title: ...
117
+ source_char_count: 41230
118
+ excerpts:
119
+ - text: The T-appliance is a removable activator supported by both the maxilla and the mandible.
120
+ verification:
121
+ method: local_full_text
122
+ source_sha256: 3f1c...
123
+ validator_version: 0.7.0
124
+ verified_at: '2026-11-17'
125
+ ```
126
+
127
+ The bundle stores each quote as it is written in the data, because CI
128
+ compares quotes against the bundle exactly. `source_char_count` lets CI
129
+ apply `max_reference_fraction` without the file.
130
+
131
+ Options:
132
+
133
+ - `--reference ID` (repeatable) signs only those references. A requested
134
+ reference with no local text is reported and the command exits 1.
135
+ - `--check` writes nothing and exits 1 if any bundle is out of date.
136
+ - `--prune` removes excerpts this command signed earlier that the data no
137
+ longer cites, including from bundles for references the data no longer
138
+ cites at all. Excerpts from anywhere else, such as a private store, are
139
+ always kept. Pass **every** data file with `--prune`: a quote cited only in
140
+ a file you left out counts as no longer cited. A reference with any quote
141
+ that fails to verify is not pruned in that run, so a wrongly mapped file
142
+ (a preprint instead of the published paper, say) cannot delete good
143
+ excerpts. With `--reference`, only the named references are pruned, and
144
+ bundles for references the data no longer cites are left alone.
145
+ Only bundles named as validation reads them (`<REF_ID>.yaml`, or `.yml`
146
+ when there is no `.yaml`) are pruned; a hand-named file is left alone.
147
+ A bundle whose excerpts from elsewhere are already over a cap is reported
148
+ on every `--prune` run, because pruning never removes them; trim it by hand.
149
+ Keep only bundles in `signed_excerpts_dir`: `--prune` reads every YAML
150
+ file there, and one that is not a readable bundle is reported and makes the
151
+ command exit 1.
152
+ - `--signed-excerpts-dir DIR` overrides the destination in the config.
153
+
154
+ The fair-use caps are checked twice: on each run's quotes, as in validation,
155
+ and on the merged bundle as a whole, because the bundle keeps every quote
156
+ ever signed into it. This is checked for every bundle the command would
157
+ write to, including one that is otherwise unchanged, so `--check` reports a bundle that a lowered
158
+ cap or a hand edit has pushed over. A bundle that would go over
159
+ `max_total_chars_per_reference` or `max_reference_fraction` is not written.
160
+ The same is true if the source file changes while its quotes are being
161
+ checked, since the recorded hash would not match the text that was checked.
162
+
163
+ Re-signing is deterministic. An existing bundle keeps its excerpts, their
164
+ order and their other fields (such as `target_repo`). An excerpt already
165
+ verified against the same file (the same `source_sha256`) is left as it is,
166
+ so an unchanged run rewrites nothing. New quotes are added in sorted order.
167
+ An existing bundle is never used as evidence when signing, so an entry typed
168
+ by hand cannot be re-signed without matching the file.
169
+
170
+ ### 3. Commit the bundle
171
+
172
+ Commit `signed_excerpts/*.yaml` together with the data. CI validates the same
173
+ `DOI:` citation through the bundle and never needs the paper.
174
+
175
+ ### What "signed" means here
176
+
177
+ The `verification` record is an **attestation, not a cryptographic
178
+ signature**. It records which text a quote was checked against, with which
179
+ version, and when, so a reviewer can tell signed entries from hand-typed
180
+ ones. It cannot stop someone who can edit the bundle from also editing the
181
+ record. In particular, it does not defend against an agent that writes a
182
+ bundle directly. To require the record, set:
183
+
184
+ ```yaml
185
+ validation:
186
+ signed_excerpts_require_verification: true
187
+ ```
188
+
189
+ Then validation ignores excerpts that have no `verification.source_sha256`.
190
+ This is off by default so bundles written before `excerpts sign` existed keep
191
+ working.
192
+
193
+ The hash identifies the *text file* that was matched, not the paper. Two
194
+ extractions of one paper (PDF to text, or JATS XML) have different hashes.
195
+
196
+ ## Syncing bundles with `excerpts sync`
197
+
198
+ `excerpts sync` copies bundles from a local checkout of the private store
199
+ into `signed_excerpts_dir`. Files are copied byte for byte, so the public copy
200
+ is exactly what the store verified.
201
+
202
+ ```bash
203
+ linkml-reference-validator excerpts sync --source ../claimstore/signed_excerpts
204
+ ```
205
+
206
+ With no filters every bundle is copied. A store usually serves several
207
+ repositories, so two filters narrow the selection. A bundle is copied if it
208
+ passes EITHER filter:
209
+
210
+ - `--target-repo NAME` selects bundles with an excerpt whose `target_repo`
211
+ is `NAME` or starts with `NAME:`.
212
+ - `--referenced-in GLOB` (repeatable) selects bundles whose `reference_id` is
213
+ cited in a file matching the glob. This catches excerpts that were never
214
+ tagged with a `target_repo`. Globs are relative to the working directory,
215
+ and a glob that matches no files is an error. The `reference_id` is matched
216
+ as written in the bundle (ignoring case), without the prefix normalization
217
+ that validation applies, so bundles should use the same CURIE form as the
218
+ citing data.
219
+
220
+ List every directory whose files are validated against `signed_excerpts_dir`.
221
+ With `--prune`, a bundle cited only from a directory left out of the list is
222
+ deleted.
223
+
224
+ Other options:
225
+
226
+ - `--prune` deletes bundles in the destination that are no longer selected.
227
+ Files that are not YAML, such as a README, are left alone. Pruning is refused
228
+ if nothing is selected, so a wrong source cannot empty the destination.
229
+ - `--check` writes nothing and exits 1 if the destination is out of date. Other
230
+ errors (missing source, malformed bundle, bad glob) exit 2.
231
+ - `--signed-excerpts-dir DIR` overrides the destination from the config.
232
+
233
+ ### Configuring a repository
234
+
235
+ Put the selection in the config file so that everyone syncs the same way. The
236
+ source path depends on where each person cloned the private store, so supply it
237
+ with `--source` or the `LRV_SIGNED_EXCERPTS_SOURCE` environment variable. It can
238
+ also go in `signed_excerpts_sync.source_dir`, but then it is the same for everyone.
239
+
240
+ ```yaml
241
+ validation:
242
+ signed_excerpts_dir: signed_excerpts
243
+ signed_excerpts_sync:
244
+ target_repo: dismech
245
+ referenced_in:
246
+ - kb/disorders/*.yaml
247
+ - kb/modules/*.yaml
248
+ prune: true
249
+ ```
250
+
251
+ Options given on the command line override the config.
252
+
253
+ ### Example: dismech
254
+
255
+ [dismech](https://github.com/monarch-initiative/dismech) cites claimstore
256
+ excerpts in `kb/disorders/`. Its config holds the settings above, and its
257
+ justfile wraps the command:
258
+
259
+ ```bash
260
+ # needs read access to the private monarch-initiative/claimstore repo
261
+ git clone git@github.com:monarch-initiative/claimstore.git ../claimstore
262
+ just sync-signed-excerpts # uses ../claimstore by default
263
+ CLAIMSTORE_DIR=~/repos/claimstore just sync-signed-excerpts
264
+ ```
265
+
266
+ Then commit the changed `signed_excerpts/*.yaml` files with the disorder files
267
+ that quote them. Validation in dismech CI reads only the committed
268
+ `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
+ )
@@ -218,13 +218,23 @@ def _hashed_filename(name: str, reference_id: str) -> str:
218
218
  return f"{prefix}_{digest}.md"
219
219
 
220
220
 
221
- def _same_reference_id(first: str, second: str) -> bool:
222
- """Compare stored IDs exactly, except for case-insensitive DOI identity."""
221
+ def same_reference_id(first: str, second: str) -> bool:
222
+ """Compare stored IDs exactly, except for case-insensitive DOI identity.
223
+
224
+ Examples:
225
+ >>> same_reference_id("DOI:10.1000/ABC", "doi:10.1000/abc")
226
+ True
227
+ >>> same_reference_id("PMID:1", "PMID:2")
228
+ False
229
+ """
223
230
  if first.upper().startswith("DOI:"):
224
231
  return first.casefold() == second.casefold()
225
232
  return first == second
226
233
 
227
234
 
235
+ _same_reference_id = same_reference_id
236
+
237
+
228
238
  def _recover_legacy_scalars(metadata: dict) -> dict:
229
239
  """Recover scalar text that older writers emitted without YAML quoting.
230
240
 
@@ -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