Skip to content

Complete PyLD CLI transformations - #330

Open
anatoly-scherbakov wants to merge 32 commits into
command-line-interfacefrom
306-complete-pyld-cli
Open

Complete PyLD CLI transformations#330
anatoly-scherbakov wants to merge 32 commits into
command-line-interfacefrom
306-complete-pyld-cli

Conversation

@anatoly-scherbakov

Copy link
Copy Markdown
Collaborator

Summary

  • Add compact, flatten, frame, to-rdf, and from-rdf commands.
  • Split the CLI into an application module, shared helpers, and per-command modules.
  • Add runnable command documentation and deterministic fixtures.

CLI contract

  • JSON-LD inputs accept a local path, HTTP(S) URL, or - for standard input.
  • Context and frame operands accept a local path, HTTP(S) URL, or -; only one operand may read standard input.
  • N-Quads input accepts a local path or -; N-Quads output is written without terminal styling.
  • The CLI supports JSON-LD 1.1 only.

Validation

  • pytest -q tests/test_cli.py (76 passed)
  • make lint

@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.py252115994%260–264, 313, 350, 355, 365, 382–397, 433–434, 476, 484, 504, 512–513, 621–626, 709–710, 725–726, 789–794, 819–820, 835–836, 846–847, 873, 916, 926, 947–948, 991, 998, 1066, 1089, 1111–1113, 1123–1126, 1141, 1164, 1176–1179, 1275, 1287–1290, 1310, 1339, 1372, 1376, 1413, 1456, 1475–1478, 1491, 1540, 1643–1650, 1677–1679, 1705–1708, 1884, 1922, 2228, 2359, 2368–2375, 2469, 2496, 2520, 2528, 3119, 3164, 3183, 3248, 3301, 3304, 3367, 3452, 3486, 3494, 3772, 3777, 3779, 3964–3968, 4079, 4121, 4184, 4419, 4707, 4839, 4873, 4902–4905, 4931–4932, 5115, 5179, 5206, 5280, 5282, 5300, 5398, 5447, 5679, 5681, 5720, 5722, 5731, 5873, 6001, 6088, 6208–6222, 6354, 6567, 6573–6577, 6616, 6619, 6709–6710, 6719
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
   file.py36197%49
   requests.py52590%57, 71, 83–91
   requests_sqlite_cache.py25196%19
   scheme_directed.py15193%38
   type_directed.py15193%41
TOTAL376721194% 

Tests Skipped Failures Errors Time
1822 37 💤 0 ❌ 0 🔥 3m 5s ⏱️

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