linkml-reference-validator 0.5.1__tar.gz → 0.5.2rc1__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.
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/PKG-INFO +17 -1
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/README.md +16 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/concepts/content-types.md +1 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/how-to/add-reference-source.md +4 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/how-to/validate-urls.md +1 -0
- linkml_reference_validator-0.5.2rc1/docs/how-to/validate-wikipedia.md +118 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/reference/cache-format.md +2 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/mkdocs.yml +1 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/cache.py +3 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/reference_fetcher.py +29 -2
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/sources/__init__.py +4 -1
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/sources/base.py +42 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/sources/json_api.py +3 -1
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/sources/pmid.py +42 -0
- linkml_reference_validator-0.5.2rc1/src/linkml_reference_validator/etl/sources/wikipedia.py +231 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/models.py +6 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_cache_validation.py +6 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_pmid_network.py +26 -0
- linkml_reference_validator-0.5.2rc1/tests/test_wikipedia_source.py +370 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.claude/.mcp.json +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.claude/settings.json +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.copier-answers.yml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.devcontainer/devcontainer.json +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.devcontainer/post_create.sh +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.editorconfig +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/actions/claude-code-action/action.yml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/actions/claude-issue-summarize-action/action.yml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/actions/claude-issue-triage-action/action.yml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/ai-controllers.json +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/copilot-instructions.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/copilot-setup-steps.yml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/dependabot.yml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/workflows/claude-code-review.yml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/workflows/claude-issue-summarize.yml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/workflows/claude-issue-triage.yml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/workflows/claude-ontology-review.yml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/workflows/claude.yml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/workflows/deploy-docs.yaml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/workflows/dragon-ai.yml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/workflows/main.yaml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.github/workflows/pypi-publish.yaml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.gitignore +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.goosehints +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.pre-commit-config.yaml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/.yamllint.yaml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/AGENTS.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/BUG_GEO_ACCESSION_TO_UID.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/BUG_ZENODO_DOI_AND_URL_HANDLING.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/CLAUDE.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/CLI-ISSUES.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/CODE_OF_CONDUCT.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/CONTRIBUTING.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/FEATURE_REQUEST_REPAIR.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/LICENSE +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/REVIEW2.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/REVIEW3.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/ai.just +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/benchmarks/repeated_quotes.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/copilot-instructions.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/about.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/assets/zotero-find-full-text.png +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/concepts/editorial-conventions.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/concepts/how-it-works.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/elements/.gitkeep +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/how-to/export-cache-to-zotero.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/how-to/fetch-full-text-and-pdfs.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/how-to/repair-validation-errors.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/how-to/skip-unsupported-references.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/how-to/use-local-files-and-urls.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/how-to/validate-clinical-trials.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/how-to/validate-dois.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/how-to/validate-entrez.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/how-to/validate-obo-files.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/how-to/validate-titles.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/index.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/notebooks/01_getting_started.ipynb +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/notebooks/02_advanced_usage.ipynb +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/notebooks/03_python_api.ipynb +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/notebooks/04_obo_validation.ipynb +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/notebooks/05_geo_validation.ipynb +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/quickstart.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/reference/cli.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/reference/splitting.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/setup-guide.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/superpowers/plans/2026-06-12-modular-pdf-fulltext-fetching.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/superpowers/plans/2026-08-05-private-library-full-text.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/superpowers/specs/2026-06-12-modular-pdf-fulltext-fetching-design.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/superpowers/specs/2026-08-05-private-library-full-text-design.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/templates-linkml/README.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/todo.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/troubleshooting.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/docs/tutorials/complete-workflow.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/examples/README.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/justfile +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/mypy.ini +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/notebooks/01_getting_started.ipynb +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/notebooks/02_advanced_usage.ipynb +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/notebooks/03_python_api.ipynb +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/notebooks/README.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/project/README.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/project.justfile +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/pyproject.toml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/pytest.ini +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/skills/linkml-reference-validator/SKILL.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/skills/linkml-reference-validator/references/configuration.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/skills/linkml-reference-validator/references/guardrails.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/__init__.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/_version.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/cli/__init__.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/cli/cache.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/cli/lookup.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/cli/repair.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/cli/shared.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/cli/validate.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/__init__.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/acquire.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/csl_export.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/extract/__init__.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/extract/base.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/extract/drawio.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/extract/html.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/extract/pdf.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/extract/svg.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/extract/svg_geometry.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/extract/untrusted_xml.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/extract/xml.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/fulltext/__init__.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/fulltext/base.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/fulltext/bioc.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/fulltext/bookshelf.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/fulltext/epmc.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/fulltext/epmc_preprint.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/fulltext/json_api.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/fulltext/loader.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/fulltext/openalex.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/fulltext/pmc.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/fulltext/unpaywall.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/fulltext/zotero.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/identifiers.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/rules.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/sources/clinicaltrials.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/sources/doi.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/sources/entrez.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/sources/file.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/sources/loader.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/sources/ppr.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/sources/url.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/sources/utils.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/etl/text_extractor.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/field_detection.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/matching.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/plugins/REVIEW.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/plugins/__init__.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/plugins/reference_validation_plugin.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/validation/__init__.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/validation/fuzzy_text_utils.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/validation/repairer.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/src/linkml_reference_validator/validation/supporting_text_validator.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/__init__.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/conftest.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/data/test_data_deep_nesting_invalid.yaml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/data/test_data_deep_nesting_valid.yaml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/data/test_data_invalid.yaml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/data/test_data_valid.yaml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/data/test_schema.yaml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/data/test_schema_deep_nesting.yaml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/GEO_GSE12345.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/PMC_TEST001.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/PMC_TEST001.txt +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/PMC_TEST002.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/PMC_TEST002.txt +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/PMID_TEST001.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/PMID_TEST001.txt +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/PMID_TEST002.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/PMID_TEST002.txt +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/PMID_TEST003.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/PMID_TEST003.txt +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/bookshelf/esummary_20301710.xml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/bookshelf/gene_NBK1116/men1.nxml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/bookshelf/pubmed_20301710.xml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/clinicaltrials_NCT00000001.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/fulltext_html/README.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/fulltext_html/dspace-32894695.html +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/fulltext_html/iris-19049553.html +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/fulltext_html/plos-0000308.html +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/jats/PMC5593426.xml +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/jats/README.md +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/fixtures/sample.obo +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_absent_abstract_recovery.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_acquire.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_bookshelf_provider.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_bot_challenge.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_cache_author_recovery.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_cache_filename_collisions.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_cache_read_robustness.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_cli.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_cli_cache_enrich.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_cli_cache_export.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_cli_cache_reference.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_cli_lookup.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_cli_repair.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_clinicaltrials_cache.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_clinicaltrials_integration.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_deep_nesting.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_doi_preprint.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_doi_url_encoding.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_drawio.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_e2e_integration.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_empty_snippets.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_epmc_preprint_provider.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_extractor_fidelity.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_extractors.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_field_detection.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_field_detection_qualifiers.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_file_reference_cache.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_frontmatter_and_doi_case.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_fulltext_loader.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_fulltext_providers.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_fuzzy_suggestions.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_geo_integration.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_greek_variants.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_html_fulltext_acceptance.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_html_scope_text.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_identifiers.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_inline_abstract_headings.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_jats_tables.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_json_api_source.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_ligature_normalization.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_long_cache_filenames.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_meaning_changes.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_meaning_symbols.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_models.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_multivalued_reference.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_no_cache_downgrade.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_normalized_content_cache.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_open_access_policy.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_optional_linkml_dependency.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_pdf_url_title.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_plugin_integration.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_plugin_value_shapes.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_pmc_fulltext.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_ppr_source.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_publisher_typography.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_real_validation.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_reference_fetcher.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_repair.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_repair_data_output.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_repair_thresholds.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_rules.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_serve_stale_html_optin.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_source_network_errors.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_source_utils.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_sources.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_split_supporting_text.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_supporting_text_validator.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_svg_edges.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_svg_extractor.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_text_extractor.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_title_only_shapes.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_title_validation.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_trust_cached_entries.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_unknown_slot_traversal.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_url_fragment_cache.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_url_html_sanitize.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_url_html_to_text.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_url_source_cache_version.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_validation_config.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_validation_counts.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_welded_markers.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_word_boundaries.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_xml_extractor_text.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/tests/test_zotero_provider.py +0 -0
- {linkml_reference_validator-0.5.1 → linkml_reference_validator-0.5.2rc1}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: linkml_reference_validator
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2rc1
|
|
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
|
|
@@ -448,6 +448,22 @@ reference:
|
|
|
448
448
|
See the [full-text guide](docs/how-to/fetch-full-text-and-pdfs.md#preprints) for
|
|
449
449
|
details and coverage caveats.
|
|
450
450
|
|
|
451
|
+
#### Wikipedia articles
|
|
452
|
+
|
|
453
|
+
```yaml
|
|
454
|
+
reference:
|
|
455
|
+
id: WIKIPEDIA:Saanen_goat
|
|
456
|
+
supporting_text: "The Saanen originates in the historic region of Saanen"
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
**Fetches:**
|
|
460
|
+
- The English Wikipedia article as plain text, from the MediaWiki API, so a
|
|
461
|
+
quote through a link or bold text still matches
|
|
462
|
+
- The revision read, its timestamp and canonical URL, recorded in the cache
|
|
463
|
+
(Wikipedia text is CC BY-SA 4.0 and changes over time)
|
|
464
|
+
|
|
465
|
+
See [Validating Wikipedia Articles](docs/how-to/validate-wikipedia.md).
|
|
466
|
+
|
|
451
467
|
---
|
|
452
468
|
|
|
453
469
|
## Schema Requirements
|
|
@@ -427,6 +427,22 @@ reference:
|
|
|
427
427
|
See the [full-text guide](docs/how-to/fetch-full-text-and-pdfs.md#preprints) for
|
|
428
428
|
details and coverage caveats.
|
|
429
429
|
|
|
430
|
+
#### Wikipedia articles
|
|
431
|
+
|
|
432
|
+
```yaml
|
|
433
|
+
reference:
|
|
434
|
+
id: WIKIPEDIA:Saanen_goat
|
|
435
|
+
supporting_text: "The Saanen originates in the historic region of Saanen"
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
**Fetches:**
|
|
439
|
+
- The English Wikipedia article as plain text, from the MediaWiki API, so a
|
|
440
|
+
quote through a link or bold text still matches
|
|
441
|
+
- The revision read, its timestamp and canonical URL, recorded in the cache
|
|
442
|
+
(Wikipedia text is CC BY-SA 4.0 and changes over time)
|
|
443
|
+
|
|
444
|
+
See [Validating Wikipedia Articles](docs/how-to/validate-wikipedia.md).
|
|
445
|
+
|
|
430
446
|
---
|
|
431
447
|
|
|
432
448
|
## Schema Requirements
|
|
@@ -8,6 +8,7 @@ When fetching references, the validator tracks what type of content was retrieve
|
|
|
8
8
|
|-------|-----------|-------------|
|
|
9
9
|
| `full_text_xml` | PMID (via PMC) | Full text retrieved from PubMed Central as XML |
|
|
10
10
|
| `full_text_html` | PMID (via PMC) | Full text retrieved from PubMed Central as HTML (fallback) |
|
|
11
|
+
| `full_text` | WIKIPEDIA | The whole article as plain text |
|
|
11
12
|
| `abstract_only` | PMID, DOI | Only the abstract was available |
|
|
12
13
|
| `summary` | GEO, BioProject, BioSample, ClinicalTrials | Database summary/description field |
|
|
13
14
|
| `local_file` | file: | Content read from local filesystem |
|
|
@@ -240,6 +240,10 @@ With this setup:
|
|
|
240
240
|
- `MGNIFY:MGYS00000596` - Uses your custom MGnify source
|
|
241
241
|
- `SRA:SRP123456` - Skipped (returns valid with INFO message)
|
|
242
242
|
|
|
243
|
+
A source you define with the same prefix as a built-in one (such as
|
|
244
|
+
`WIKIPEDIA`) takes precedence over the built-in source for that prefix. Its
|
|
245
|
+
`id_patterns` are still tried only after every other built-in source.
|
|
246
|
+
|
|
243
247
|
### Finding the Right JSONPath
|
|
244
248
|
|
|
245
249
|
To figure out the correct JSONPath for a new API:
|
|
@@ -301,6 +301,7 @@ linkml-reference-validator validate text \
|
|
|
301
301
|
|
|
302
302
|
## See Also
|
|
303
303
|
|
|
304
|
+
- [Validating Wikipedia Articles](validate-wikipedia.md) - Prefer `WIKIPEDIA:Title` to a Wikipedia URL
|
|
304
305
|
- [Using Local Files and URLs](use-local-files-and-urls.md) - Quick reference for file and URL sources
|
|
305
306
|
- [Validating DOIs](validate-dois.md) - For journal articles with DOIs
|
|
306
307
|
- [Validating OBO Files](validate-obo-files.md) - For ontology-specific validation
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Validating Wikipedia References
|
|
2
|
+
|
|
3
|
+
This guide shows how to validate supporting text against English Wikipedia articles.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The `WIKIPEDIA` source reads an article as plain text from the
|
|
8
|
+
[MediaWiki Action API](https://www.mediawiki.org/wiki/API:Main_page)
|
|
9
|
+
(`prop=extracts` with `explaintext`). It gets:
|
|
10
|
+
|
|
11
|
+
- **Title**: the article's title, after any redirect
|
|
12
|
+
- **Content**: the whole article body as plain text (`content_type: full_text`),
|
|
13
|
+
with section headings as plain lines
|
|
14
|
+
- **Version**: the article's canonical URL, the revision that was read and its timestamp
|
|
15
|
+
- **License**: `CC BY-SA 4.0`
|
|
16
|
+
|
|
17
|
+
Because the text has no markup, a quote that runs through a link or bold text
|
|
18
|
+
on the rendered page matches. A `url:https://en.wikipedia.org/wiki/...`
|
|
19
|
+
reference also works, but it reads the whole rendered page, navigation and
|
|
20
|
+
footer included, and does not record which revision it read.
|
|
21
|
+
|
|
22
|
+
## Basic Usage
|
|
23
|
+
|
|
24
|
+
Cite the article by its title, as it appears in the article's URL:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
linkml-reference-validator validate text \
|
|
28
|
+
"The Saanen originates in the historic region of Saanen" \
|
|
29
|
+
WIKIPEDIA:Saanen_goat
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
In data:
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
evidence:
|
|
36
|
+
- reference: WIKIPEDIA:Saanen_goat
|
|
37
|
+
supporting_text: The Saanen originates in the historic region of Saanen
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Accepted Identifier Formats
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
WIKIPEDIA:Saanen_goat # as in the URL (recommended)
|
|
44
|
+
WIKIPEDIA:Saanen goat # spaces also work
|
|
45
|
+
WIKIPEDIA:Caf%C3%A9 # percent-encoded, as copied from a URL
|
|
46
|
+
wikipedia:Saanen_goat # the prefix is case-insensitive
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Every spelling normalizes to the one the article's URL uses, as MediaWiki
|
|
50
|
+
reads titles: spaces become underscores, percent-encoding is decoded and the
|
|
51
|
+
first letter is upper-cased, and a `#Section` anchor is dropped (the citation
|
|
52
|
+
is to the whole article). So `WIKIPEDIA:saanen goat` is `WIKIPEDIA:Saanen_goat`,
|
|
53
|
+
and all of them share the cache file `WIKIPEDIA_Saanen_goat.md`. A project
|
|
54
|
+
that defines its own `WIKIPEDIA` source keeps its IDs as written.
|
|
55
|
+
|
|
56
|
+
A redirect is followed: `WIKIPEDIA:Saanen` reads the article *Saanen goat*, and
|
|
57
|
+
the cached title says so. A title with no article, or an invalid one, is not found.
|
|
58
|
+
|
|
59
|
+
## Wikipedia Changes Over Time
|
|
60
|
+
|
|
61
|
+
An article is edited, and a quote that matched last month may not match now.
|
|
62
|
+
The cache records what was checked:
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
---
|
|
66
|
+
reference_id: WIKIPEDIA:Saanen_goat
|
|
67
|
+
content_type: full_text
|
|
68
|
+
title: Saanen goat
|
|
69
|
+
license: CC BY-SA 4.0
|
|
70
|
+
source_url: https://en.wikipedia.org/wiki/Saanen_goat
|
|
71
|
+
source_revision: '1250000001'
|
|
72
|
+
source_revision_timestamp: '2026-09-01T12:00:00Z'
|
|
73
|
+
---
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Commit the cache with your data, and the quote stays checked against the
|
|
77
|
+
revision in it. `cache reference WIKIPEDIA:Saanen_goat --force` reads the
|
|
78
|
+
current revision. You can see the revision you quoted at
|
|
79
|
+
`https://en.wikipedia.org/w/index.php?oldid=<source_revision>`.
|
|
80
|
+
|
|
81
|
+
Wikipedia's text is licensed CC BY-SA 4.0: quoting it is fine, and a committed
|
|
82
|
+
cache holds a copy of it under that licence.
|
|
83
|
+
|
|
84
|
+
## Rate Limits
|
|
85
|
+
|
|
86
|
+
Wikimedia asks API clients to identify themselves. The validator sends a
|
|
87
|
+
`User-Agent` naming itself and the `email` in your configuration, so set one:
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
# .linkml-reference-validator.yaml
|
|
91
|
+
validation:
|
|
92
|
+
email: you@example.org
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Wikimedia throttles busy clients with HTTP 429. A throttled request gets no
|
|
96
|
+
result; a cached copy is used when there is one, so caching the articles you
|
|
97
|
+
cite (and committing the cache) keeps validation working offline and in CI.
|
|
98
|
+
|
|
99
|
+
## Your Own WIKIPEDIA Source
|
|
100
|
+
|
|
101
|
+
A project that defined its own `WIKIPEDIA` source in
|
|
102
|
+
`.linkml-reference-validator-sources.yaml` before this one existed keeps using
|
|
103
|
+
it: a source a project defines takes precedence over a built-in source with the
|
|
104
|
+
same prefix. Delete it to use the built-in source.
|
|
105
|
+
|
|
106
|
+
## Limitations
|
|
107
|
+
|
|
108
|
+
- English Wikipedia only.
|
|
109
|
+
- A citation is to the article, not a revision: a fresh fetch reads the
|
|
110
|
+
current one.
|
|
111
|
+
- Tables, infoboxes, references and image captions are not in the plain-text
|
|
112
|
+
extract, so a quote from them is not found.
|
|
113
|
+
|
|
114
|
+
## See Also
|
|
115
|
+
|
|
116
|
+
- [Validating URLs](validate-urls.md)
|
|
117
|
+
- [Adding a New Reference Source](add-reference-source.md)
|
|
118
|
+
- [Cache Format and Validation](../reference/cache-format.md)
|
|
@@ -53,6 +53,8 @@ All other known fields are optional and may be null:
|
|
|
53
53
|
- Full-text metadata: `full_text_attempted`, `full_text_declined`,
|
|
54
54
|
`full_text_provider`, `full_text_url`, `oa_status`, `license`, `local_pdf_path`,
|
|
55
55
|
`full_text_access_type`, and `full_text_source_item_id`.
|
|
56
|
+
- Source version, for sources that change over time (such as `WIKIPEDIA`):
|
|
57
|
+
`source_url`, `source_revision`, and `source_revision_timestamp`.
|
|
56
58
|
- Captured fields and attachments: `extra_fields_captured` and
|
|
57
59
|
`supplementary_files`.
|
|
58
60
|
|
|
@@ -39,6 +39,7 @@ nav:
|
|
|
39
39
|
- Validating Clinical Trials: how-to/validate-clinical-trials.md
|
|
40
40
|
- Validating DOIs: how-to/validate-dois.md
|
|
41
41
|
- Validating URLs: how-to/validate-urls.md
|
|
42
|
+
- Validating Wikipedia Articles: how-to/validate-wikipedia.md
|
|
42
43
|
- Validating Reference Titles: how-to/validate-titles.md
|
|
43
44
|
- Using Local Files and URLs: how-to/use-local-files-and-urls.md
|
|
44
45
|
- Fetching Full Text and PDFs: how-to/fetch-full-text-and-pdfs.md
|
|
@@ -80,6 +80,9 @@ class CacheFrontmatter(BaseModel):
|
|
|
80
80
|
local_pdf_path: str | None = None
|
|
81
81
|
full_text_access_type: str | None = None
|
|
82
82
|
full_text_source_item_id: str | None = None
|
|
83
|
+
source_url: str | None = None
|
|
84
|
+
source_revision: str | None = None
|
|
85
|
+
source_revision_timestamp: str | None = None
|
|
83
86
|
extra_fields_captured: list[str] | None = None
|
|
84
87
|
supplementary_files: list[CacheSupplementaryFile] | None = None
|
|
85
88
|
|
|
@@ -40,6 +40,7 @@ from linkml_reference_validator.models import (
|
|
|
40
40
|
from linkml_reference_validator.etl.sources import ReferenceSourceRegistry
|
|
41
41
|
from linkml_reference_validator.etl.sources.clinicaltrials import NCT_ID_PATTERN
|
|
42
42
|
from linkml_reference_validator.etl.sources.file import FileSource
|
|
43
|
+
from linkml_reference_validator.etl.sources.wikipedia import WikipediaSource, canonical_title
|
|
43
44
|
from linkml_reference_validator.etl.acquire import ContentAcquirer, resolve_format, sniff_format
|
|
44
45
|
from linkml_reference_validator.etl.identifiers import build_identifiers
|
|
45
46
|
from linkml_reference_validator.etl.fulltext.base import PUBLISHER_FREE_ACCESS
|
|
@@ -1289,7 +1290,26 @@ class ReferenceFetcher:
|
|
|
1289
1290
|
return reference_id.strip()
|
|
1290
1291
|
if prefix == "file":
|
|
1291
1292
|
return f"file:{FileSource.resolve_path(identifier, self.config)}"
|
|
1292
|
-
return f"{prefix}:{identifier}"
|
|
1293
|
+
return self._canonical_wikipedia_id(f"{prefix}:{identifier}")
|
|
1294
|
+
|
|
1295
|
+
@staticmethod
|
|
1296
|
+
def _canonical_wikipedia_id(reference_id: str) -> str:
|
|
1297
|
+
"""Spell a WIKIPEDIA title as its article URL does, when the built-in source reads it.
|
|
1298
|
+
|
|
1299
|
+
Every spelling of one article then shares one cache entry. A project's
|
|
1300
|
+
own WIKIPEDIA source keeps its IDs as written.
|
|
1301
|
+
|
|
1302
|
+
Examples:
|
|
1303
|
+
>>> ReferenceFetcher._canonical_wikipedia_id("WIKIPEDIA:saanen goat")
|
|
1304
|
+
'WIKIPEDIA:Saanen_goat'
|
|
1305
|
+
>>> ReferenceFetcher._canonical_wikipedia_id("PMID:123")
|
|
1306
|
+
'PMID:123'
|
|
1307
|
+
"""
|
|
1308
|
+
if not reference_id.startswith("WIKIPEDIA:"):
|
|
1309
|
+
return reference_id
|
|
1310
|
+
if ReferenceSourceRegistry.get_source(reference_id) is not WikipediaSource:
|
|
1311
|
+
return reference_id
|
|
1312
|
+
return f"WIKIPEDIA:{canonical_title(reference_id.partition(':')[2])}"
|
|
1293
1313
|
|
|
1294
1314
|
def _normalize_prefix(self, prefix: str) -> str:
|
|
1295
1315
|
"""Normalize prefix casing to match the reference sources."""
|
|
@@ -1400,10 +1420,11 @@ class ReferenceFetcher:
|
|
|
1400
1420
|
prefix, identifier = self._parse_reference_id(
|
|
1401
1421
|
reference_id, apply_prefix_map=False
|
|
1402
1422
|
)
|
|
1403
|
-
if prefix
|
|
1423
|
+
if prefix in ("clinicaltrials", "WIKIPEDIA"):
|
|
1404
1424
|
reference_id = f"{prefix}:{identifier}"
|
|
1405
1425
|
if prefix == "file":
|
|
1406
1426
|
reference_id = f"file:{FileSource.resolve_path(identifier, self.config)}"
|
|
1427
|
+
reference_id = self._canonical_wikipedia_id(reference_id)
|
|
1407
1428
|
# Other IDs already arrive normalized from fetch(). Reapplying arbitrary
|
|
1408
1429
|
# prefix maps here could follow a second alias and change the cache key.
|
|
1409
1430
|
return cache_key(reference_id)
|
|
@@ -1674,6 +1695,9 @@ class ReferenceFetcher:
|
|
|
1674
1695
|
local_pdf_path=reference.local_pdf_path or None,
|
|
1675
1696
|
full_text_access_type=reference.full_text_access_type or None,
|
|
1676
1697
|
full_text_source_item_id=reference.full_text_source_item_id or None,
|
|
1698
|
+
source_url=reference.source_url or None,
|
|
1699
|
+
source_revision=reference.source_revision or None,
|
|
1700
|
+
source_revision_timestamp=reference.source_revision_timestamp or None,
|
|
1677
1701
|
extra_fields_captured=captured,
|
|
1678
1702
|
supplementary_files=[
|
|
1679
1703
|
CacheSupplementaryFile.model_validate({
|
|
@@ -2202,6 +2226,9 @@ class ReferenceFetcher:
|
|
|
2202
2226
|
local_pdf_path=frontmatter.get("local_pdf_path"),
|
|
2203
2227
|
full_text_access_type=frontmatter.get("full_text_access_type"),
|
|
2204
2228
|
full_text_source_item_id=frontmatter.get("full_text_source_item_id"),
|
|
2229
|
+
source_url=frontmatter.get("source_url"),
|
|
2230
|
+
source_revision=frontmatter.get("source_revision"),
|
|
2231
|
+
source_revision_timestamp=frontmatter.get("source_revision_timestamp"),
|
|
2205
2232
|
is_preprint=frontmatter.get("is_preprint"),
|
|
2206
2233
|
peer_review_status=frontmatter.get("peer_review_status"),
|
|
2207
2234
|
full_text_attempted=bool(frontmatter.get("full_text_attempted", False)),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"""Reference source plugins.
|
|
2
2
|
|
|
3
3
|
This package provides pluggable reference sources for fetching content
|
|
4
|
-
from various origins (PubMed, Crossref, local files, URLs, ClinicalTrials.gov
|
|
4
|
+
from various origins (PubMed, Crossref, local files, URLs, ClinicalTrials.gov,
|
|
5
|
+
Wikipedia).
|
|
5
6
|
|
|
6
7
|
Custom sources can be defined via YAML configuration using JSONAPISource.
|
|
7
8
|
|
|
@@ -33,6 +34,7 @@ from linkml_reference_validator.etl.sources.entrez import (
|
|
|
33
34
|
BioSampleSource,
|
|
34
35
|
)
|
|
35
36
|
from linkml_reference_validator.etl.sources.clinicaltrials import ClinicalTrialsSource
|
|
37
|
+
from linkml_reference_validator.etl.sources.wikipedia import WikipediaSource
|
|
36
38
|
|
|
37
39
|
# Import JSON API source for programmatic use
|
|
38
40
|
from linkml_reference_validator.etl.sources.json_api import (
|
|
@@ -58,6 +60,7 @@ __all__ = [
|
|
|
58
60
|
"BioProjectSource",
|
|
59
61
|
"BioSampleSource",
|
|
60
62
|
"ClinicalTrialsSource",
|
|
63
|
+
"WikipediaSource",
|
|
61
64
|
"JSONAPISource",
|
|
62
65
|
"register_json_api_source",
|
|
63
66
|
"load_custom_sources",
|
|
@@ -138,6 +138,48 @@ class ReferenceSourceRegistry:
|
|
|
138
138
|
logger.debug(f"Registered source: {source_class.prefix()}")
|
|
139
139
|
return source_class
|
|
140
140
|
|
|
141
|
+
@classmethod
|
|
142
|
+
def register_override(cls, source_class: type[ReferenceSource]) -> type[ReferenceSource]:
|
|
143
|
+
"""Register a source that takes precedence over one already registered for its prefix.
|
|
144
|
+
|
|
145
|
+
The source is placed just ahead of the first registered source with the
|
|
146
|
+
same prefix (compared case-insensitively), and nowhere earlier, so any
|
|
147
|
+
bare-ID patterns it carries cannot displace the sources ahead of that
|
|
148
|
+
one. With no source for its prefix it is appended, as by ``register``.
|
|
149
|
+
This is how a project's own source definition replaces a built-in one.
|
|
150
|
+
|
|
151
|
+
Args:
|
|
152
|
+
source_class: The source class to register
|
|
153
|
+
|
|
154
|
+
Returns:
|
|
155
|
+
The source class
|
|
156
|
+
|
|
157
|
+
Examples:
|
|
158
|
+
>>> from linkml_reference_validator.etl.sources.base import (
|
|
159
|
+
... ReferenceSource, ReferenceSourceRegistry
|
|
160
|
+
... )
|
|
161
|
+
>>> saved = ReferenceSourceRegistry.list_sources()
|
|
162
|
+
>>> class OwnPMID(ReferenceSource):
|
|
163
|
+
... @classmethod
|
|
164
|
+
... def prefix(cls) -> str:
|
|
165
|
+
... return "pmid"
|
|
166
|
+
... def fetch(self, identifier, config):
|
|
167
|
+
... return None
|
|
168
|
+
>>> _ = ReferenceSourceRegistry.register_override(OwnPMID)
|
|
169
|
+
>>> ReferenceSourceRegistry.get_source("PMID:1") is OwnPMID
|
|
170
|
+
True
|
|
171
|
+
>>> ReferenceSourceRegistry._sources = saved
|
|
172
|
+
"""
|
|
173
|
+
if source_class in cls._sources:
|
|
174
|
+
return source_class
|
|
175
|
+
prefix = source_class.prefix().lower()
|
|
176
|
+
for index, existing in enumerate(cls._sources):
|
|
177
|
+
if existing.prefix().lower() == prefix:
|
|
178
|
+
cls._sources.insert(index, source_class)
|
|
179
|
+
logger.info(f"Source {source_class.prefix()} overrides the built-in source")
|
|
180
|
+
return source_class
|
|
181
|
+
return cls.register(source_class)
|
|
182
|
+
|
|
141
183
|
@classmethod
|
|
142
184
|
def get_source(cls, reference_id: str) -> Optional[type[ReferenceSource]]:
|
|
143
185
|
"""Find a source that can handle the given reference ID.
|
|
@@ -368,5 +368,7 @@ def register_json_api_source(source_config: JSONAPISourceConfig) -> type[Referen
|
|
|
368
368
|
DynamicJSONAPISource.__name__ = class_name
|
|
369
369
|
DynamicJSONAPISource.__qualname__ = class_name
|
|
370
370
|
|
|
371
|
-
|
|
371
|
+
# A project's own definition of a prefix the validator also ships (such as
|
|
372
|
+
# WIKIPEDIA) is what the project asked for, so it goes ahead of the built-in.
|
|
373
|
+
ReferenceSourceRegistry.register_override(DynamicJSONAPISource)
|
|
372
374
|
return DynamicJSONAPISource
|
|
@@ -203,6 +203,10 @@ class PMIDSource(ReferenceSource):
|
|
|
203
203
|
# A failed refresh must not overwrite useful cached text with just
|
|
204
204
|
# summary metadata. None also enables ReferenceFetcher's stale fallback.
|
|
205
205
|
return None
|
|
206
|
+
if not title.strip() and article_xml:
|
|
207
|
+
# A whole-book record (an AHRQ evidence report, say) has an empty
|
|
208
|
+
# summary Title; its title is the BookDocument's BookTitle.
|
|
209
|
+
title = self._parse_book_title(article_xml) or ""
|
|
206
210
|
abstract = self._parse_abstract(article_xml) if article_xml else None
|
|
207
211
|
keywords = self._parse_mesh_terms(article_xml) if article_xml else None
|
|
208
212
|
publication_types = (
|
|
@@ -487,6 +491,44 @@ class PMIDSource(ReferenceSource):
|
|
|
487
491
|
# for str.
|
|
488
492
|
return BeautifulSoup(xml_content, "xml")
|
|
489
493
|
|
|
494
|
+
@staticmethod
|
|
495
|
+
def _parse_book_title(soup: BeautifulSoup) -> Optional[str]:
|
|
496
|
+
"""Return the title of a Bookshelf record from its PubMed XML.
|
|
497
|
+
|
|
498
|
+
PubMed's summary leaves ``Title`` empty for a record that is a whole
|
|
499
|
+
book rather than a chapter. The article XML still names it: a chapter
|
|
500
|
+
by its ``ArticleTitle``, a whole book by ``Book/BookTitle``.
|
|
501
|
+
|
|
502
|
+
Args:
|
|
503
|
+
soup: Parsed PubMed article XML
|
|
504
|
+
|
|
505
|
+
Returns:
|
|
506
|
+
The record's title, or None if this is not a Bookshelf record
|
|
507
|
+
|
|
508
|
+
Examples:
|
|
509
|
+
>>> from bs4 import BeautifulSoup
|
|
510
|
+
>>> xml = '''<PubmedBookArticle><BookDocument>
|
|
511
|
+
... <Book><BookTitle book="cer86">Treatment for Restless Legs Syndrome</BookTitle></Book>
|
|
512
|
+
... </BookDocument></PubmedBookArticle>'''
|
|
513
|
+
>>> PMIDSource._parse_book_title(BeautifulSoup(xml, "xml"))
|
|
514
|
+
'Treatment for Restless Legs Syndrome'
|
|
515
|
+
>>> xml = '''<PubmedBookArticle><BookDocument>
|
|
516
|
+
... <Book><BookTitle book="gene">GeneReviews</BookTitle></Book>
|
|
517
|
+
... <ArticleTitle book="gene" part="men1">Multiple Endocrine Neoplasia Type 1</ArticleTitle>
|
|
518
|
+
... </BookDocument></PubmedBookArticle>'''
|
|
519
|
+
>>> PMIDSource._parse_book_title(BeautifulSoup(xml, "xml"))
|
|
520
|
+
'Multiple Endocrine Neoplasia Type 1'
|
|
521
|
+
>>> PMIDSource._parse_book_title(BeautifulSoup("<PubmedArticle/>", "xml")) is None
|
|
522
|
+
True
|
|
523
|
+
"""
|
|
524
|
+
document = soup.find("BookDocument")
|
|
525
|
+
if document is None:
|
|
526
|
+
return None
|
|
527
|
+
for element in (document.find("ArticleTitle"), document.find("BookTitle")):
|
|
528
|
+
if element is not None and element.get_text().strip():
|
|
529
|
+
return element.get_text().strip()
|
|
530
|
+
return None
|
|
531
|
+
|
|
490
532
|
@staticmethod
|
|
491
533
|
def _parse_bookshelf_chapter(soup: BeautifulSoup) -> Optional[tuple[str, str]]:
|
|
492
534
|
"""Return ``(NBK accession, "<book>/<part>")`` for a Bookshelf chapter.
|