Skip to content

Reject non-string keys in YAML-LD mappings - #369

Draft
anatoly-scherbakov wants to merge 4 commits into
expand-yaml-null-documentsfrom
reject-yaml-nonstring-keys
Draft

anatoly-scherbakov wants to merge 4 commits into
expand-yaml-null-documentsfrom
reject-yaml-nonstring-keys

Conversation

@anatoly-scherbakov

Copy link
Copy Markdown
Collaborator

Summary

Builds on #364.

  • Reject YAML-LD mapping keys unless they are string scalars, including nested and unhashable keys.
  • Report mapping-key-error through JsonLdError and enable the five passing conformance cases.

Validation

  • YAML-LD suite: 64 passed, 29 skipped with each document loader; audited all 34 previously skipped cases.
  • Expansion tests: 51 passed, including 18 new cases.
  • Broader suite: 2,028 passed, 56 skipped, 1 deselected, 1 xfailed. Deselected the unchanged schema.org network test after it stalled locally for over two minutes; CI runs it.
  • make lint and git diff --check passed.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Coverage

Coverage Report
FileStmtsMissCoverMissing
lib/pyld
   canon.py2901296%36, 47, 51, 55, 85–86, 530, 552, 616, 626, 680–681
   context_resolver.py103892%78, 137, 151, 197, 203–205, 229
   iri_resolver.py141398%311–312, 322
   jsonld.py250915994%255–259, 308, 345, 350, 360, 377–392, 428–429, 471, 479, 499, 507–508, 703–704, 719–720, 783–788, 813–814, 829–830, 840–841, 867, 915, 929–930, 953–954, 996, 1003, 1010, 1078, 1103, 1125–1127, 1137–1140, 1155, 1178, 1190–1193, 1289, 1298–1301, 1321, 1350, 1383, 1387, 1421, 1438–1440, 1450–1452, 1495, 1514–1517, 1530, 1579, 1682–1689, 1716–1718, 1744–1747, 1923, 1961, 2267, 2398, 2407–2414, 2508, 2535, 2559, 2567, 3161, 3211, 3230, 3295, 3348, 3351, 3414, 3499, 3533, 3820, 3825, 3827, 4022–4024, 4173, 4236, 4475, 4763, 4895, 4929, 4958–4961, 4983–4984, 5167, 5231, 5258, 5332, 5334, 5352, 5450, 5499, 5731, 5733, 5772, 5774, 5783, 5925, 6053, 6140, 6260–6274, 6408, 6635, 6641–6645, 6684, 6778–6779, 6788
   util.py87495%15, 64, 137, 157
lib/pyld/cli
   app.py44295%77, 80
   entry.py12375%9–11, 24
   input.py52198%57
lib/pyld/documentloader
   aiohttp.py712269%29–39, 68, 74, 86, 98–106, 118–121, 138, 153–156
   requests.py52590%57, 71, 83–91
   requests_sqlite_cache.py25196%19
   scheme_directed.py15193%38
   type_directed.py15193%41
TOTAL384822294% 

Tests Skipped Failures Errors Time
2086 57 💤 0 ❌ 0 🔥 1m 24s ⏱️

This branch has not been deployed

No deployments
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