Skip to content

Add FileDocumentLoader for local file: URLs - #301

Open
anatoly-scherbakov wants to merge 12 commits into
masterfrom
file-document-loader
Open

Add FileDocumentLoader for local file: URLs#301
anatoly-scherbakov wants to merge 12 commits into
masterfrom
file-document-loader

Conversation

@anatoly-scherbakov

Copy link
Copy Markdown
Collaborator

Summary

  • Add FileDocumentLoader to load local JSON-LD from file: URLs, scheme-less paths, and pathlib.Path, with optional root confinement
  • Document the loader (reference page, examples, content-type table macro) and export it from the package root
  • Switch FrozenDocumentLoader docs to mkdocstrings autodoc and clean Sphinx roles from its docstrings for MkDocs rendering

Test plan

  • pytest tests/test_file_document_loader.py
  • make docs-build (strict)
  • CI green on the PR

Related: prerequisite for #151; scheme dispatch tracked in #300

@github-actions

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
lib/pyld
   canon.py218498%27, 180, 565–566
   context_resolver.py103892%78, 137, 151, 197, 203–205, 229
   iri_resolver.py141398%311–312, 322
   jsonld.py251316693%258–262, 311, 348, 353, 363, 380–395, 431–432, 474, 482, 502, 510–511, 619–624, 704–705, 720–721, 781–786, 811–812, 827–828, 838–839, 865, 906, 916, 922–926, 937–938, 981, 988, 1053, 1076, 1098–1100, 1110–1113, 1128, 1151, 1163–1166, 1262, 1274–1277, 1297, 1326, 1359, 1363, 1400, 1443, 1462–1465, 1478, 1527, 1630–1637, 1664–1666, 1692–1695, 1871, 1909, 2215, 2346, 2355–2362, 2456, 2483, 2507, 2515, 3106, 3151, 3170, 3235, 3288, 3291, 3354, 3439, 3473, 3481, 3759, 3764, 3766, 3952–3956, 4060, 4102, 4165, 4400, 4688, 4820, 4854, 4883–4886, 4912–4913, 5096, 5160, 5187, 5261, 5263, 5281, 5379, 5428, 5660, 5662, 5701, 5703, 5712, 5854, 5982, 6069, 6189–6203, 6265, 6267, 6335, 6548, 6554–6558, 6597, 6600, 6690–6691, 6700
lib/pyld/documentloader
   aiohttp.py712269%29–39, 68, 74, 86, 98–106, 118–121, 138, 153–156
   file.py36197%49
   requests.py51590%56, 70, 82–90
TOTAL346020994% 

Tests Skipped Failures Errors Time
1725 38 💤 0 ❌ 0 🔥 2m 56s ⏱️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant