linkml-reference-validator 0.5.2rc1__tar.gz → 0.6.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 (275) hide show
  1. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/PKG-INFO +1 -1
  2. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/cli/shared.py +8 -0
  3. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/cli/validate.py +10 -0
  4. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/sources/doi.py +89 -2
  5. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/models.py +52 -0
  6. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/plugins/reference_validation_plugin.py +52 -9
  7. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/validation/supporting_text_validator.py +216 -15
  8. linkml_reference_validator-0.6.0/tests/test_doi_title_cleaning.py +164 -0
  9. linkml_reference_validator-0.6.0/tests/test_signed_excerpts_and_fair_use.py +394 -0
  10. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.claude/.mcp.json +0 -0
  11. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.claude/settings.json +0 -0
  12. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.copier-answers.yml +0 -0
  13. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.devcontainer/devcontainer.json +0 -0
  14. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.devcontainer/post_create.sh +0 -0
  15. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.editorconfig +0 -0
  16. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/actions/claude-code-action/action.yml +0 -0
  17. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/actions/claude-issue-summarize-action/action.yml +0 -0
  18. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/actions/claude-issue-triage-action/action.yml +0 -0
  19. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/ai-controllers.json +0 -0
  20. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/copilot-instructions.md +0 -0
  21. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/copilot-setup-steps.yml +0 -0
  22. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/dependabot.yml +0 -0
  23. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/workflows/claude-code-review.yml +0 -0
  24. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/workflows/claude-issue-summarize.yml +0 -0
  25. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/workflows/claude-issue-triage.yml +0 -0
  26. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/workflows/claude-ontology-review.yml +0 -0
  27. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/workflows/claude.yml +0 -0
  28. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/workflows/deploy-docs.yaml +0 -0
  29. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/workflows/dragon-ai.yml +0 -0
  30. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/workflows/main.yaml +0 -0
  31. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.github/workflows/pypi-publish.yaml +0 -0
  32. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.gitignore +0 -0
  33. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.goosehints +0 -0
  34. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.pre-commit-config.yaml +0 -0
  35. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/.yamllint.yaml +0 -0
  36. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/AGENTS.md +0 -0
  37. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/BUG_GEO_ACCESSION_TO_UID.md +0 -0
  38. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/BUG_ZENODO_DOI_AND_URL_HANDLING.md +0 -0
  39. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/CLAUDE.md +0 -0
  40. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/CLI-ISSUES.md +0 -0
  41. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/CODE_OF_CONDUCT.md +0 -0
  42. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/CONTRIBUTING.md +0 -0
  43. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/FEATURE_REQUEST_REPAIR.md +0 -0
  44. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/LICENSE +0 -0
  45. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/README.md +0 -0
  46. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/REVIEW2.md +0 -0
  47. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/REVIEW3.md +0 -0
  48. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/ai.just +0 -0
  49. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/benchmarks/repeated_quotes.py +0 -0
  50. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/copilot-instructions.md +0 -0
  51. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/about.md +0 -0
  52. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/assets/zotero-find-full-text.png +0 -0
  53. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/concepts/content-types.md +0 -0
  54. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/concepts/editorial-conventions.md +0 -0
  55. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/concepts/how-it-works.md +0 -0
  56. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/elements/.gitkeep +0 -0
  57. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/how-to/add-reference-source.md +0 -0
  58. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/how-to/export-cache-to-zotero.md +0 -0
  59. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/how-to/fetch-full-text-and-pdfs.md +0 -0
  60. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/how-to/repair-validation-errors.md +0 -0
  61. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/how-to/skip-unsupported-references.md +0 -0
  62. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/how-to/use-local-files-and-urls.md +0 -0
  63. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/how-to/validate-clinical-trials.md +0 -0
  64. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/how-to/validate-dois.md +0 -0
  65. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/how-to/validate-entrez.md +0 -0
  66. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/how-to/validate-obo-files.md +0 -0
  67. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/how-to/validate-titles.md +0 -0
  68. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/how-to/validate-urls.md +0 -0
  69. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/how-to/validate-wikipedia.md +0 -0
  70. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/index.md +0 -0
  71. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/notebooks/01_getting_started.ipynb +0 -0
  72. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/notebooks/02_advanced_usage.ipynb +0 -0
  73. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/notebooks/03_python_api.ipynb +0 -0
  74. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/notebooks/04_obo_validation.ipynb +0 -0
  75. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/notebooks/05_geo_validation.ipynb +0 -0
  76. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/quickstart.md +0 -0
  77. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/reference/cache-format.md +0 -0
  78. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/reference/cli.md +0 -0
  79. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/reference/splitting.md +0 -0
  80. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/setup-guide.md +0 -0
  81. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/superpowers/plans/2026-06-12-modular-pdf-fulltext-fetching.md +0 -0
  82. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/superpowers/plans/2026-08-05-private-library-full-text.md +0 -0
  83. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/superpowers/specs/2026-06-12-modular-pdf-fulltext-fetching-design.md +0 -0
  84. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/superpowers/specs/2026-08-05-private-library-full-text-design.md +0 -0
  85. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/templates-linkml/README.md +0 -0
  86. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/todo.md +0 -0
  87. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/troubleshooting.md +0 -0
  88. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/docs/tutorials/complete-workflow.md +0 -0
  89. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/examples/README.md +0 -0
  90. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/justfile +0 -0
  91. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/mkdocs.yml +0 -0
  92. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/mypy.ini +0 -0
  93. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/notebooks/01_getting_started.ipynb +0 -0
  94. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/notebooks/02_advanced_usage.ipynb +0 -0
  95. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/notebooks/03_python_api.ipynb +0 -0
  96. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/notebooks/README.md +0 -0
  97. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/project/README.md +0 -0
  98. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/project.justfile +0 -0
  99. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/pyproject.toml +0 -0
  100. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/pytest.ini +0 -0
  101. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/skills/linkml-reference-validator/SKILL.md +0 -0
  102. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/skills/linkml-reference-validator/references/configuration.md +0 -0
  103. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/skills/linkml-reference-validator/references/guardrails.md +0 -0
  104. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/__init__.py +0 -0
  105. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/_version.py +0 -0
  106. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/cache.py +0 -0
  107. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/cli/__init__.py +0 -0
  108. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/cli/cache.py +0 -0
  109. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/cli/lookup.py +0 -0
  110. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/cli/repair.py +0 -0
  111. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/__init__.py +0 -0
  112. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/acquire.py +0 -0
  113. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/csl_export.py +0 -0
  114. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/extract/__init__.py +0 -0
  115. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/extract/base.py +0 -0
  116. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/extract/drawio.py +0 -0
  117. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/extract/html.py +0 -0
  118. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/extract/pdf.py +0 -0
  119. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/extract/svg.py +0 -0
  120. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/extract/svg_geometry.py +0 -0
  121. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/extract/untrusted_xml.py +0 -0
  122. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/extract/xml.py +0 -0
  123. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/fulltext/__init__.py +0 -0
  124. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/fulltext/base.py +0 -0
  125. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/fulltext/bioc.py +0 -0
  126. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/fulltext/bookshelf.py +0 -0
  127. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/fulltext/epmc.py +0 -0
  128. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/fulltext/epmc_preprint.py +0 -0
  129. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/fulltext/json_api.py +0 -0
  130. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/fulltext/loader.py +0 -0
  131. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/fulltext/openalex.py +0 -0
  132. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/fulltext/pmc.py +0 -0
  133. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/fulltext/unpaywall.py +0 -0
  134. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/fulltext/zotero.py +0 -0
  135. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/identifiers.py +0 -0
  136. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/reference_fetcher.py +0 -0
  137. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/rules.py +0 -0
  138. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/sources/__init__.py +0 -0
  139. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/sources/base.py +0 -0
  140. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/sources/clinicaltrials.py +0 -0
  141. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/sources/entrez.py +0 -0
  142. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/sources/file.py +0 -0
  143. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/sources/json_api.py +0 -0
  144. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/sources/loader.py +0 -0
  145. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/sources/pmid.py +0 -0
  146. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/sources/ppr.py +0 -0
  147. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/sources/url.py +0 -0
  148. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/sources/utils.py +0 -0
  149. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/sources/wikipedia.py +0 -0
  150. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/etl/text_extractor.py +0 -0
  151. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/field_detection.py +0 -0
  152. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/matching.py +0 -0
  153. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/plugins/REVIEW.md +0 -0
  154. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/plugins/__init__.py +0 -0
  155. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/validation/__init__.py +0 -0
  156. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/validation/fuzzy_text_utils.py +0 -0
  157. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/src/linkml_reference_validator/validation/repairer.py +0 -0
  158. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/__init__.py +0 -0
  159. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/conftest.py +0 -0
  160. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/data/test_data_deep_nesting_invalid.yaml +0 -0
  161. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/data/test_data_deep_nesting_valid.yaml +0 -0
  162. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/data/test_data_invalid.yaml +0 -0
  163. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/data/test_data_valid.yaml +0 -0
  164. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/data/test_schema.yaml +0 -0
  165. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/data/test_schema_deep_nesting.yaml +0 -0
  166. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/GEO_GSE12345.md +0 -0
  167. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/PMC_TEST001.md +0 -0
  168. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/PMC_TEST001.txt +0 -0
  169. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/PMC_TEST002.md +0 -0
  170. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/PMC_TEST002.txt +0 -0
  171. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/PMID_TEST001.md +0 -0
  172. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/PMID_TEST001.txt +0 -0
  173. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/PMID_TEST002.md +0 -0
  174. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/PMID_TEST002.txt +0 -0
  175. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/PMID_TEST003.md +0 -0
  176. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/PMID_TEST003.txt +0 -0
  177. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/bookshelf/esummary_20301710.xml +0 -0
  178. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/bookshelf/gene_NBK1116/men1.nxml +0 -0
  179. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/bookshelf/pubmed_20301710.xml +0 -0
  180. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/clinicaltrials_NCT00000001.md +0 -0
  181. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/fulltext_html/README.md +0 -0
  182. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/fulltext_html/dspace-32894695.html +0 -0
  183. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/fulltext_html/iris-19049553.html +0 -0
  184. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/fulltext_html/plos-0000308.html +0 -0
  185. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/jats/PMC5593426.xml +0 -0
  186. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/jats/README.md +0 -0
  187. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/fixtures/sample.obo +0 -0
  188. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_absent_abstract_recovery.py +0 -0
  189. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_acquire.py +0 -0
  190. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_bookshelf_provider.py +0 -0
  191. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_bot_challenge.py +0 -0
  192. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_cache_author_recovery.py +0 -0
  193. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_cache_filename_collisions.py +0 -0
  194. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_cache_read_robustness.py +0 -0
  195. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_cache_validation.py +0 -0
  196. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_cli.py +0 -0
  197. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_cli_cache_enrich.py +0 -0
  198. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_cli_cache_export.py +0 -0
  199. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_cli_cache_reference.py +0 -0
  200. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_cli_lookup.py +0 -0
  201. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_cli_repair.py +0 -0
  202. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_clinicaltrials_cache.py +0 -0
  203. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_clinicaltrials_integration.py +0 -0
  204. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_deep_nesting.py +0 -0
  205. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_doi_preprint.py +0 -0
  206. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_doi_url_encoding.py +0 -0
  207. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_drawio.py +0 -0
  208. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_e2e_integration.py +0 -0
  209. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_empty_snippets.py +0 -0
  210. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_epmc_preprint_provider.py +0 -0
  211. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_extractor_fidelity.py +0 -0
  212. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_extractors.py +0 -0
  213. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_field_detection.py +0 -0
  214. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_field_detection_qualifiers.py +0 -0
  215. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_file_reference_cache.py +0 -0
  216. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_frontmatter_and_doi_case.py +0 -0
  217. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_fulltext_loader.py +0 -0
  218. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_fulltext_providers.py +0 -0
  219. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_fuzzy_suggestions.py +0 -0
  220. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_geo_integration.py +0 -0
  221. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_greek_variants.py +0 -0
  222. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_html_fulltext_acceptance.py +0 -0
  223. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_html_scope_text.py +0 -0
  224. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_identifiers.py +0 -0
  225. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_inline_abstract_headings.py +0 -0
  226. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_jats_tables.py +0 -0
  227. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_json_api_source.py +0 -0
  228. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_ligature_normalization.py +0 -0
  229. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_long_cache_filenames.py +0 -0
  230. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_meaning_changes.py +0 -0
  231. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_meaning_symbols.py +0 -0
  232. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_models.py +0 -0
  233. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_multivalued_reference.py +0 -0
  234. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_no_cache_downgrade.py +0 -0
  235. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_normalized_content_cache.py +0 -0
  236. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_open_access_policy.py +0 -0
  237. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_optional_linkml_dependency.py +0 -0
  238. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_pdf_url_title.py +0 -0
  239. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_plugin_integration.py +0 -0
  240. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_plugin_value_shapes.py +0 -0
  241. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_pmc_fulltext.py +0 -0
  242. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_pmid_network.py +0 -0
  243. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_ppr_source.py +0 -0
  244. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_publisher_typography.py +0 -0
  245. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_real_validation.py +0 -0
  246. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_reference_fetcher.py +0 -0
  247. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_repair.py +0 -0
  248. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_repair_data_output.py +0 -0
  249. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_repair_thresholds.py +0 -0
  250. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_rules.py +0 -0
  251. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_serve_stale_html_optin.py +0 -0
  252. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_source_network_errors.py +0 -0
  253. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_source_utils.py +0 -0
  254. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_sources.py +0 -0
  255. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_split_supporting_text.py +0 -0
  256. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_supporting_text_validator.py +0 -0
  257. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_svg_edges.py +0 -0
  258. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_svg_extractor.py +0 -0
  259. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_text_extractor.py +0 -0
  260. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_title_only_shapes.py +0 -0
  261. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_title_validation.py +0 -0
  262. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_trust_cached_entries.py +0 -0
  263. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_unknown_slot_traversal.py +0 -0
  264. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_url_fragment_cache.py +0 -0
  265. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_url_html_sanitize.py +0 -0
  266. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_url_html_to_text.py +0 -0
  267. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_url_source_cache_version.py +0 -0
  268. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_validation_config.py +0 -0
  269. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_validation_counts.py +0 -0
  270. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_welded_markers.py +0 -0
  271. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_wikipedia_source.py +0 -0
  272. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_word_boundaries.py +0 -0
  273. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_xml_extractor_text.py +0 -0
  274. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/tests/test_zotero_provider.py +0 -0
  275. {linkml_reference_validator-0.5.2rc1 → linkml_reference_validator-0.6.0}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: linkml_reference_validator
3
- Version: 0.5.2rc1
3
+ Version: 0.6.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
@@ -19,6 +19,14 @@ CacheDirOption = Annotated[
19
19
  ),
20
20
  ]
21
21
 
22
+ SignedExcerptsDirOption = Annotated[
23
+ Optional[Path],
24
+ typer.Option(
25
+ "--signed-excerpts-dir",
26
+ help="Directory of pre-verified ('signed') excerpts for exact-match fallback",
27
+ ),
28
+ ]
29
+
22
30
  VerboseOption = Annotated[
23
31
  bool,
24
32
  typer.Option(
@@ -18,6 +18,7 @@ from linkml_reference_validator.validation.supporting_text_validator import (
18
18
 
19
19
  from .shared import (
20
20
  CacheDirOption,
21
+ SignedExcerptsDirOption,
21
22
  VerboseOption,
22
23
  ConfigFileOption,
23
24
  FullTextOption,
@@ -48,6 +49,7 @@ def text_command(
48
49
  ] = None,
49
50
  config_file: ConfigFileOption = None,
50
51
  cache_dir: CacheDirOption = None,
52
+ signed_excerpts_dir: SignedExcerptsDirOption = None,
51
53
  full_text: FullTextOption = True,
52
54
  verbose: VerboseOption = False,
53
55
  ):
@@ -71,6 +73,8 @@ def text_command(
71
73
  config = load_validation_config(config_file)
72
74
  if cache_dir:
73
75
  config.cache_dir = cache_dir
76
+ if signed_excerpts_dir:
77
+ config.signed_excerpts_dir = signed_excerpts_dir
74
78
  config.fetch_full_text = full_text
75
79
 
76
80
  validator = SupportingTextValidator(config)
@@ -137,6 +141,7 @@ def text_file_command(
137
141
  ] = False,
138
142
  config_file: ConfigFileOption = None,
139
143
  cache_dir: CacheDirOption = None,
144
+ signed_excerpts_dir: SignedExcerptsDirOption = None,
140
145
  full_text: FullTextOption = True,
141
146
  verbose: VerboseOption = False,
142
147
  ):
@@ -167,6 +172,8 @@ def text_file_command(
167
172
  config = load_validation_config(config_file)
168
173
  if cache_dir:
169
174
  config.cache_dir = cache_dir
175
+ if signed_excerpts_dir:
176
+ config.signed_excerpts_dir = signed_excerpts_dir
170
177
  config.fetch_full_text = full_text
171
178
 
172
179
  typer.echo(f"Extracting text from {file_path}")
@@ -242,6 +249,7 @@ def data_command(
242
249
  ] = None,
243
250
  config_file: ConfigFileOption = None,
244
251
  cache_dir: CacheDirOption = None,
252
+ signed_excerpts_dir: SignedExcerptsDirOption = None,
245
253
  full_text: FullTextOption = True,
246
254
  verbose: VerboseOption = False,
247
255
  ):
@@ -268,6 +276,8 @@ def data_command(
268
276
  config = load_validation_config(config_file)
269
277
  if cache_dir:
270
278
  config.cache_dir = cache_dir
279
+ if signed_excerpts_dir:
280
+ config.signed_excerpts_dir = signed_excerpts_dir
271
281
  config.fetch_full_text = full_text
272
282
 
273
283
  # NOTE: `linkml` is an optional dependency. Import it only when this command is invoked.
@@ -11,6 +11,7 @@ Examples:
11
11
  True
12
12
  """
13
13
 
14
+ import html
14
15
  import logging
15
16
  import re
16
17
  import time
@@ -44,6 +45,27 @@ _JATS_ABSTRACT_BLOCKS = frozenset(
44
45
  )
45
46
 
46
47
 
48
+ # Inline formatting tags that Crossref and DataCite leave in titles: HTML
49
+ # (``<i>``, ``<sub>``...), JATS without a prefix (``<italic>``, ``<sc>``...) and
50
+ # any namespaced tag (``<jats:italic>``, ``<mml:mi>``). Only these are stripped,
51
+ # so a bare comparison such as ``x<y`` or a title about ``<canvas>`` survives.
52
+ # Attributes must be ``name="value"`` pairs, so ``A<B and C>D`` is not a tag.
53
+ _INLINE_TAG_NAMES = (
54
+ "i|b|u|em|strong|sub|sup|sc|scp|small|span|tt|code|br|"
55
+ "italic|bold|underline|monospace|inline-formula|styled-content"
56
+ )
57
+ _INLINE_TAG = re.compile(
58
+ r"</?(?:[A-Za-z][\w.-]*:[A-Za-z][\w.-]*|(?:" + _INLINE_TAG_NAMES + r"))"
59
+ r"""(?:\s+[\w:.-]+\s*=\s*(?:"[^"]*"|'[^']*'))*\s*/?>"""
60
+ )
61
+ # The whitespace Crossref leaves between a closing tag and the punctuation
62
+ # after it (``</b>\n :``). Spacing away from a tag is left as written.
63
+ _SPACE_AFTER_CLOSING_TAG = re.compile(
64
+ r"(</(?:[A-Za-z][\w.-]*:[A-Za-z][\w.-]*|(?:" + _INLINE_TAG_NAMES + r"))\s*>)"
65
+ r"\s+(?=[:;,.!?])"
66
+ )
67
+
68
+
47
69
  @ReferenceSourceRegistry.register
48
70
  class DOISource(ReferenceSource):
49
71
  """Fetch references from Crossref using DOI, with DataCite fallback.
@@ -129,7 +151,7 @@ class DOISource(ReferenceSource):
129
151
  return None
130
152
 
131
153
  title_list = message.get("title", [])
132
- title = title_list[0] if title_list else ""
154
+ title = self._clean_title(title_list[0] if title_list else "")
133
155
 
134
156
  authors = self._parse_crossref_authors(message.get("author", []))
135
157
 
@@ -234,7 +256,7 @@ class DOISource(ReferenceSource):
234
256
 
235
257
  # Extract title
236
258
  titles = attributes.get("titles", [])
237
- title = titles[0].get("title", "") if titles else ""
259
+ title = self._clean_title(titles[0].get("title", "") if titles else "")
238
260
 
239
261
  # Extract authors
240
262
  authors = self._parse_datacite_creators(attributes.get("creators", []))
@@ -523,6 +545,71 @@ class DOISource(ReferenceSource):
523
545
  return str(date_parts[0][0])
524
546
  return ""
525
547
 
548
+ def _clean_title(self, title: str) -> str:
549
+ """Reduce a Crossref or DataCite title to plain, single-spaced text.
550
+
551
+ Crossref keeps inline HTML/JATS markup (``<i>``, ``<b>``, ``<sub>``,
552
+ ``<scp>``, ``<jats:italic>``...) in some titles and wraps them across
553
+ lines with indentation. Left in, the tag names survive
554
+ ``normalize_text`` as stray words, so a correct curated title fails
555
+ ``validate_title``, and the wrapping shows up as a spurious cache diff.
556
+
557
+ Only known inline formatting tags are stripped (``<br>`` becomes a
558
+ space), then entities are unescaped. This repeats, up to three times,
559
+ so escaped and double-escaped markup (``&lt;i&gt;``,
560
+ ``&amp;lt;i&amp;gt;``) goes too. Anything else that looks like a tag
561
+ stays as text: a bare ``x<y`` is not markup, and a title about the
562
+ ``<canvas>`` element keeps it. Known trade-off: a title about one of
563
+ the stripped tags themselves (e.g. ``<i>``) loses that tag name.
564
+
565
+ Whitespace is collapsed, and the space a closing tag leaves before
566
+ punctuation is removed. Spacing away from any tag, such as French
567
+ ``Titre : sous-titre``, is kept as written.
568
+
569
+ Args:
570
+ title: Title as returned by Crossref or DataCite
571
+
572
+ Returns:
573
+ Plain-text title
574
+
575
+ Examples:
576
+ >>> source = DOISource()
577
+ >>> source._clean_title(
578
+ ... "Novel variants in\\n <i>COL2A1</i>\\n"
579
+ ... " causing rare spondyloepiphyseal dysplasia congenita")
580
+ 'Novel variants in COL2A1 causing rare spondyloepiphyseal dysplasia congenita'
581
+ >>> source._clean_title(
582
+ ... "<b>httk</b>\\n :\\n <i>R</i>\\n"
583
+ ... " Package for High-Throughput Toxicokinetics")
584
+ 'httk: R Package for High-Throughput Toxicokinetics'
585
+ >>> source._clean_title("<i>BRCA1, BRCA2</i>\\n , and PALB2")
586
+ 'BRCA1, BRCA2, and PALB2'
587
+ >>> source._clean_title("Uptake of H<sub>2</sub>O")
588
+ 'Uptake of H2O'
589
+ >>> source._clean_title("&amp;lt;i&amp;gt;R&amp;lt;/i&amp;gt; Package")
590
+ 'R Package'
591
+ >>> source._clean_title("Proof that x<y holds when p &lt; 0.05")
592
+ 'Proof that x<y holds when p < 0.05'
593
+ >>> source._clean_title("The &lt;canvas&gt; element")
594
+ 'The <canvas> element'
595
+ >>> source._clean_title("Titre : sous-titre")
596
+ 'Titre : sous-titre'
597
+ >>> source._clean_title("")
598
+ ''
599
+ """
600
+ text = title
601
+ for _ in range(3):
602
+ stripped = _SPACE_AFTER_CLOSING_TAG.sub(r"\1", text)
603
+ stripped = _INLINE_TAG.sub(
604
+ lambda m: " " if m.group(0).lstrip("</").startswith("br") else "",
605
+ stripped,
606
+ )
607
+ unescaped = html.unescape(stripped)
608
+ if unescaped == text:
609
+ break
610
+ text = unescaped
611
+ return " ".join(text.split())
612
+
526
613
  def _clean_abstract(self, abstract: str) -> str:
527
614
  """Clean JATS/XML markup from abstract text.
528
615
 
@@ -457,12 +457,25 @@ class ReferenceValidationConfig(BaseModel):
457
457
  0
458
458
  >>> ReferenceValidationConfig(min_excerpt_length=20).min_excerpt_length
459
459
  20
460
+ >>> ReferenceValidationConfig().max_excerpt_length
461
+ 0
462
+ >>> ReferenceValidationConfig(max_excerpt_length=400).max_excerpt_length
463
+ 400
460
464
  """
461
465
 
462
466
  cache_dir: Path = Field(
463
467
  default=Path("references_cache"),
464
468
  description="Directory for caching downloaded references",
465
469
  )
470
+ signed_excerpts_dir: Optional[Path] = Field(
471
+ default=None,
472
+ description=(
473
+ "Optional directory of pre-verified ('signed') excerpts synced from a "
474
+ "private full-text store (e.g. claimstore). An excerpt is trusted if "
475
+ "it EITHER substring-matches the reference cache OR exact-matches an "
476
+ "excerpt recorded for that reference in signed_excerpts_dir."
477
+ ),
478
+ )
466
479
  private_cache_dir: Path = Field(
467
480
  default_factory=lambda: Path.home()
468
481
  / ".cache"
@@ -524,6 +537,45 @@ class ReferenceValidationConfig(BaseModel):
524
537
  "empty and whitespace-only excerpts are always rejected regardless."
525
538
  ),
526
539
  )
540
+ max_excerpt_length: int = Field(
541
+ default=0,
542
+ ge=0,
543
+ description=(
544
+ "Maximum number of non-whitespace characters of quoted text allowed "
545
+ "in a single excerpt (across all '...' parts) for fair-use compliance. "
546
+ "Set to 0 to disable the check."
547
+ ),
548
+ )
549
+ max_excerpt_part_length: int = Field(
550
+ default=0,
551
+ ge=0,
552
+ description=(
553
+ "Maximum number of non-whitespace characters of quoted text allowed "
554
+ "in any single contiguous part between '...' separators. Encourages "
555
+ "concise, ellipsis-interspersed quotations under fair use. "
556
+ "Set to 0 to disable the check."
557
+ ),
558
+ )
559
+ max_total_chars_per_reference: int = Field(
560
+ default=0,
561
+ ge=0,
562
+ description=(
563
+ "Maximum cumulative non-whitespace characters quoted across all distinct "
564
+ "excerpts citing the same reference within a validation run. "
565
+ "Set to 0 to disable the check."
566
+ ),
567
+ )
568
+ max_reference_fraction: float = Field(
569
+ default=0.0,
570
+ ge=0.0,
571
+ le=1.0,
572
+ description=(
573
+ "Maximum fraction (0.0 to 1.0) of a reference's total non-whitespace "
574
+ "character length that may be cumulatively quoted across all distinct "
575
+ "excerpts citing that reference. Protects short works under fair use. "
576
+ "Set to 0.0 to disable the check."
577
+ ),
578
+ )
527
579
  reference_prefix_map: dict[str, str] = Field(
528
580
  default_factory=dict,
529
581
  description=(
@@ -218,6 +218,8 @@ if _LINKML_AVAILABLE:
218
218
  instance: dict[str, Any],
219
219
  class_name: str,
220
220
  path: str,
221
+ inherited_references: Optional[list[ResolvedReference]] = None,
222
+ inherited_title: Optional[str] = None,
221
223
  ) -> Iterator[LinkMLValidationResult]:
222
224
  """Recursively validate an instance and nested objects.
223
225
 
@@ -225,6 +227,8 @@ if _LINKML_AVAILABLE:
225
227
  instance: Instance data
226
228
  class_name: Class name from schema
227
229
  path: Current path in data structure
230
+ inherited_references: Optional parent-resolved references for nested excerpt items
231
+ inherited_title: Optional parent title when references are inherited
228
232
 
229
233
  Yields:
230
234
  ValidationResult objects
@@ -239,6 +243,18 @@ if _LINKML_AVAILABLE:
239
243
  excerpt_fields = self._find_excerpt_fields(class_name)
240
244
  title_fields = self._find_title_fields(class_name)
241
245
 
246
+ # Resolve local references once so child excerpt objects without their
247
+ # own reference slot can inherit the enclosing reference context.
248
+ local_resolved, local_unusable = self._resolve_references(
249
+ instance, reference_fields, path
250
+ )
251
+ local_title_field = next((f for f in title_fields if instance.get(f)), None)
252
+ local_title = instance[local_title_field] if local_title_field is not None else None
253
+ effective_inherited_refs = local_resolved if local_resolved else inherited_references
254
+ effective_inherited_title = (
255
+ local_title if local_resolved else (local_title or inherited_title)
256
+ )
257
+
242
258
  # Whether any excerpt was checked or attempted: that check includes
243
259
  # the title, or reports why neither can be checked.
244
260
  excerpt_attempted = False
@@ -274,21 +290,25 @@ if _LINKML_AVAILABLE:
274
290
 
275
291
  # A reference given but unusable must not let the excerpt pass
276
292
  # unchecked: it is reported, by _resolve_references.
277
- resolved, unusable = self._resolve_references(
278
- instance, reference_fields, path
279
- )
293
+ resolved, unusable = local_resolved, local_unusable
280
294
  for value, value_path in unusable:
281
295
  yield self._unusable_reference(value, value_path, excerpt_path)
296
+ using_inherited = False
297
+ if not resolved and not unusable and inherited_references:
298
+ resolved = inherited_references
299
+ using_inherited = True
282
300
  if not resolved:
283
301
  continue
284
302
  references = [(ref.reference_id, ref.title) for ref in resolved]
285
303
  # A title field names the paper, so it replaces any title a
286
304
  # reference object carries.
287
- title_field = next((f for f in title_fields if instance.get(f)), None)
305
+ title_field = local_title_field
288
306
  if len(references) == 1:
289
307
  reference_id, expected_title = references[0]
290
308
  if title_field is not None:
291
309
  expected_title = instance[title_field]
310
+ elif using_inherited and inherited_title is not None:
311
+ expected_title = inherited_title
292
312
  for excerpt, item_path in excerpts:
293
313
  yield from self._validate_excerpt(
294
314
  excerpt, reference_id, expected_title, item_path
@@ -346,11 +366,19 @@ if _LINKML_AVAILABLE:
346
366
  # A keyed mapping (inlined_as_list: false), not one
347
367
  # object: validate every object in it (#139).
348
368
  yield from self._validate_keyed_objects(
349
- value, range_class, slot_path
369
+ value,
370
+ range_class,
371
+ slot_path,
372
+ effective_inherited_refs,
373
+ effective_inherited_title,
350
374
  )
351
375
  else:
352
376
  yield from self._validate_instance(
353
- value, range_class, slot_path
377
+ value,
378
+ range_class,
379
+ slot_path,
380
+ effective_inherited_refs,
381
+ effective_inherited_title,
354
382
  )
355
383
 
356
384
  elif isinstance(value, list):
@@ -360,7 +388,11 @@ if _LINKML_AVAILABLE:
360
388
  range_class = slot.range
361
389
  if range_class and self.schema_view.get_class(range_class):
362
390
  yield from self._validate_instance(
363
- item, range_class, item_path
391
+ item,
392
+ range_class,
393
+ item_path,
394
+ effective_inherited_refs,
395
+ effective_inherited_title,
364
396
  )
365
397
 
366
398
  def _resolve_references(
@@ -570,7 +602,12 @@ if _LINKML_AVAILABLE:
570
602
  return not any(key in slot_names for key in value)
571
603
 
572
604
  def _validate_keyed_objects(
573
- self, mapping: dict[str, Any], class_name: str, path: str
605
+ self,
606
+ mapping: dict[str, Any],
607
+ class_name: str,
608
+ path: str,
609
+ inherited_references: Optional[list[ResolvedReference]] = None,
610
+ inherited_title: Optional[str] = None,
574
611
  ) -> Iterator[LinkMLValidationResult]:
575
612
  """Validate each object of a keyed mapping (``inlined_as_list: false``).
576
613
 
@@ -589,7 +626,13 @@ if _LINKML_AVAILABLE:
589
626
  continue
590
627
  if identifier is not None and identifier.name not in obj:
591
628
  obj = {identifier.name: key, **obj}
592
- yield from self._validate_instance(obj, class_name, f"{path}[{key}]")
629
+ yield from self._validate_instance(
630
+ obj,
631
+ class_name,
632
+ f"{path}[{key}]",
633
+ inherited_references,
634
+ inherited_title,
635
+ )
593
636
 
594
637
  def _convert_severity(self, severity: Any) -> Severity:
595
638
  """Translate internal severities to LinkML Severity enum.