linked-data-python 0.6.0__tar.gz → 0.6.1__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 (71) hide show
  1. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/PKG-INFO +1 -1
  2. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/linked_data_python.egg-info/PKG-INFO +1 -1
  3. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/pyproject.toml +1 -1
  4. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_docs.py +21 -1
  5. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/LICENSE.md +0 -0
  6. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/README.md +0 -0
  7. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/__init__.py +0 -0
  8. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/__main__.py +0 -0
  9. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/backend.py +0 -0
  10. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/build.py +0 -0
  11. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/console.py +0 -0
  12. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/debug.py +0 -0
  13. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/formatter.py +0 -0
  14. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/importer.py +0 -0
  15. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/lsp/__init__.py +0 -0
  16. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/lsp/__main__.py +0 -0
  17. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/lsp/backend.py +0 -0
  18. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/lsp/hover.py +0 -0
  19. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/lsp/islanddoc.py +0 -0
  20. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/lsp/rpc.py +0 -0
  21. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/lsp/server.py +0 -0
  22. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/lsp/translate.py +0 -0
  23. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/pygments_lexer.py +0 -0
  24. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/runtime.py +0 -0
  25. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/sparql.py +0 -0
  26. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/transpiler/__init__.py +0 -0
  27. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/transpiler/core.py +0 -0
  28. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/transpiler/errors.py +0 -0
  29. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/ldpy/transpiler/linemap.py +0 -0
  30. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/linked_data_python.egg-info/SOURCES.txt +0 -0
  31. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/linked_data_python.egg-info/dependency_links.txt +0 -0
  32. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/linked_data_python.egg-info/entry_points.txt +0 -0
  33. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/linked_data_python.egg-info/requires.txt +0 -0
  34. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/linked_data_python.egg-info/top_level.txt +0 -0
  35. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/setup.cfg +0 -0
  36. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_bench.py +0 -0
  37. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_bindings.py +0 -0
  38. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_build.py +0 -0
  39. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_call_suffix.py +0 -0
  40. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_charsets.py +0 -0
  41. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_coercion.py +0 -0
  42. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_console.py +0 -0
  43. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_current_graph.py +0 -0
  44. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_debug.py +0 -0
  45. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_debug_stepping.py +0 -0
  46. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_disambiguation.py +0 -0
  47. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_docstrings.py +0 -0
  48. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_examples.py +0 -0
  49. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_formatter.py +0 -0
  50. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_generator.py +0 -0
  51. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_graphs.py +0 -0
  52. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_hover_parts.py +0 -0
  53. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_identity.py +0 -0
  54. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_import_hook.py +0 -0
  55. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_islanddoc.py +0 -0
  56. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_islands_terms.py +0 -0
  57. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_linemap.py +0 -0
  58. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_lsp_rpc.py +0 -0
  59. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_lsp_server.py +0 -0
  60. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_lsp_translate.py +0 -0
  61. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_match_island.py +0 -0
  62. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_micropython_subset.py +0 -0
  63. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_prefix_import.py +0 -0
  64. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_prefix_scoping.py +0 -0
  65. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_pygments_lexer.py +0 -0
  66. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_scope_modifiers.py +0 -0
  67. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_semantics.py +0 -0
  68. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_sourcemap_v3.py +0 -0
  69. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_sparql_expr.py +0 -0
  70. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_sparql_island.py +0 -0
  71. {linked_data_python-0.6.0 → linked_data_python-0.6.1}/tests/test_target_micropython.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: linked-data-python
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Python extended with Semantic Web primitives: IRIs, RDF literals and Turtle-notation graphs as expressions, transpiled by island parsing.
5
5
  Author-email: Maxime Lefrançois <maxime.lefrancois@emse.fr>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: linked-data-python
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Python extended with Semantic Web primitives: IRIs, RDF literals and Turtle-notation graphs as expressions, transpiled by island parsing.
5
5
  Author-email: Maxime Lefrançois <maxime.lefrancois@emse.fr>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "linked-data-python"
7
- version = "0.6.0"
7
+ version = "0.6.1"
8
8
  description = "Python extended with Semantic Web primitives: IRIs, RDF literals and Turtle-notation graphs as expressions, transpiled by island parsing."
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -20,13 +20,21 @@ def blocks(lang):
20
20
  for path in DOCS:
21
21
  text = open(path, encoding="utf-8").read()
22
22
  for i, m in enumerate(FENCE.finditer(text)):
23
- if m.group(1) == lang:
23
+ if m.group(1) == lang and not _is_snippet(m.group(2)):
24
24
  out.append(pytest.param(
25
25
  m.group(2),
26
26
  id="%s#%d" % (os.path.relpath(path, REPO), i)))
27
27
  return out
28
28
 
29
29
 
30
+ def _is_snippet(code):
31
+ """A block that only includes a file (``--8<-- "..."``) has no code of its
32
+ own: mkdocs substitutes the file at build time, and that file is tested
33
+ where it lives — see ``test_the_tour_runs``."""
34
+ return all(line.strip().startswith("--8<--") or not line.strip()
35
+ for line in code.split("\n"))
36
+
37
+
30
38
  def test_docs_exist_and_cover_diataxis():
31
39
  rels = {os.path.relpath(p, os.path.join(REPO, "docs")) for p in DOCS}
32
40
  assert "README.md" in rels
@@ -46,6 +54,18 @@ def test_python_snippets_run(code):
46
54
  exec(compile(code, "<docs>", "exec"), {"__name__": "docs"})
47
55
 
48
56
 
57
+ def test_the_tour_runs():
58
+ """``docs/tutorials/tour.ldpy`` is a tutorial in the shape of a program:
59
+ its comments teach, and each section asserts what it claims. Running it is
60
+ therefore the whole check — and the page that shows it includes this very
61
+ file, so the two cannot drift."""
62
+ from ldpy.transpiler import transpile
63
+ path = os.path.join(REPO, "docs", "tutorials", "tour.ldpy")
64
+ source = open(path, encoding="utf-8").read()
65
+ exec(compile(transpile(source, path).code, path, "exec"),
66
+ {"__name__": "tour"})
67
+
68
+
49
69
  # --------------------------------------------------------------------------
50
70
  # The same snippets, typed into the interactive console.
51
71
  #