Graphinate 0.8.2__tar.gz → 0.8.3__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 (122) hide show
  1. {graphinate-0.8.2 → graphinate-0.8.3}/PKG-INFO +1 -1
  2. {graphinate-0.8.2 → graphinate-0.8.3}/examples/math/graph_atlas.py +1 -2
  3. {graphinate-0.8.2 → graphinate-0.8.3}/examples/math/materializers.py +5 -4
  4. {graphinate-0.8.2 → graphinate-0.8.3}/examples/math/polygonal_graph.py +12 -3
  5. {graphinate-0.8.2 → graphinate-0.8.3}/pyproject.toml +1 -1
  6. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/renderers/graphql.py +1 -1
  7. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/viewer/index.html +5 -6
  8. {graphinate-0.8.2 → graphinate-0.8.3}/.coveragerc +0 -0
  9. {graphinate-0.8.2 → graphinate-0.8.3}/.github/dependabot.yml +0 -0
  10. {graphinate-0.8.2 → graphinate-0.8.3}/.github/workflows/codeql.yml +0 -0
  11. {graphinate-0.8.2 → graphinate-0.8.3}/.github/workflows/publish-docs.yaml +0 -0
  12. {graphinate-0.8.2 → graphinate-0.8.3}/.github/workflows/publish.yml +0 -0
  13. {graphinate-0.8.2 → graphinate-0.8.3}/.github/workflows/test-beta.yml +0 -0
  14. {graphinate-0.8.2 → graphinate-0.8.3}/.github/workflows/test.yml +0 -0
  15. {graphinate-0.8.2 → graphinate-0.8.3}/.gitignore +0 -0
  16. {graphinate-0.8.2 → graphinate-0.8.3}/.sonarcloud.properties +0 -0
  17. {graphinate-0.8.2 → graphinate-0.8.3}/LICENSE +0 -0
  18. {graphinate-0.8.2 → graphinate-0.8.3}/README.md +0 -0
  19. {graphinate-0.8.2 → graphinate-0.8.3}/docs/.dates_cache.json +0 -0
  20. {graphinate-0.8.2 → graphinate-0.8.3}/docs/acknowledge.md +0 -0
  21. {graphinate-0.8.2 → graphinate-0.8.3}/docs/assets/badge/v0.json +0 -0
  22. {graphinate-0.8.2 → graphinate-0.8.3}/docs/assets/images/logo-128.png +0 -0
  23. {graphinate-0.8.2 → graphinate-0.8.3}/docs/assets/images/network_graph.png +0 -0
  24. {graphinate-0.8.2 → graphinate-0.8.3}/docs/assets/stylesheets/extra.css +0 -0
  25. {graphinate-0.8.2 → graphinate-0.8.3}/docs/examples/code.md +0 -0
  26. {graphinate-0.8.2 → graphinate-0.8.3}/docs/examples/github.md +0 -0
  27. {graphinate-0.8.2 → graphinate-0.8.3}/docs/examples/math.md +0 -0
  28. {graphinate-0.8.2 → graphinate-0.8.3}/docs/examples/social.md +0 -0
  29. {graphinate-0.8.2 → graphinate-0.8.3}/docs/examples/system.md +0 -0
  30. {graphinate-0.8.2 → graphinate-0.8.3}/docs/examples/web.md +0 -0
  31. {graphinate-0.8.2 → graphinate-0.8.3}/docs/gen_ref_pages.py +0 -0
  32. {graphinate-0.8.2 → graphinate-0.8.3}/docs/index.md +0 -0
  33. {graphinate-0.8.2 → graphinate-0.8.3}/docs/intro.md +0 -0
  34. {graphinate-0.8.2 → graphinate-0.8.3}/docs/start.md +0 -0
  35. {graphinate-0.8.2 → graphinate-0.8.3}/docs/tutorial.md +0 -0
  36. {graphinate-0.8.2 → graphinate-0.8.3}/docs/usage/cli.md +0 -0
  37. {graphinate-0.8.2 → graphinate-0.8.3}/docs/usage/lib.md +0 -0
  38. {graphinate-0.8.2 → graphinate-0.8.3}/examples/code/git_commits.py +0 -0
  39. {graphinate-0.8.2 → graphinate-0.8.3}/examples/code/python_ast.py +0 -0
  40. {graphinate-0.8.2 → graphinate-0.8.3}/examples/code/python_dependencies.py +0 -0
  41. {graphinate-0.8.2 → graphinate-0.8.3}/examples/code/requirements.txt +0 -0
  42. {graphinate-0.8.2 → graphinate-0.8.3}/examples/code/tokens.py +0 -0
  43. {graphinate-0.8.2 → graphinate-0.8.3}/examples/github/_client.py +0 -0
  44. {graphinate-0.8.2 → graphinate-0.8.3}/examples/github/commits_visibilty_graph.py +0 -0
  45. {graphinate-0.8.2 → graphinate-0.8.3}/examples/github/followers.graphql +0 -0
  46. {graphinate-0.8.2 → graphinate-0.8.3}/examples/github/followers.py +0 -0
  47. {graphinate-0.8.2 → graphinate-0.8.3}/examples/github/graphql.config.yml +0 -0
  48. {graphinate-0.8.2 → graphinate-0.8.3}/examples/github/repositories.graphql +0 -0
  49. {graphinate-0.8.2 → graphinate-0.8.3}/examples/github/repositories.py +0 -0
  50. {graphinate-0.8.2 → graphinate-0.8.3}/examples/github/requirements.txt +0 -0
  51. {graphinate-0.8.2 → graphinate-0.8.3}/examples/math/__init__.py +0 -0
  52. {graphinate-0.8.2 → graphinate-0.8.3}/examples/math/_test_materializers.py +0 -0
  53. {graphinate-0.8.2 → graphinate-0.8.3}/examples/math/graphs.py +0 -0
  54. {graphinate-0.8.2 → graphinate-0.8.3}/examples/math/gui.py +0 -0
  55. {graphinate-0.8.2 → graphinate-0.8.3}/examples/math/requirements.txt +0 -0
  56. {graphinate-0.8.2 → graphinate-0.8.3}/examples/social/cache/13/dd/73ce25face7beb30b69b64feeb77.val +0 -0
  57. {graphinate-0.8.2 → graphinate-0.8.3}/examples/social/cache/21/9e/00846f323987ba16cfbe0127d8eb.val +0 -0
  58. {graphinate-0.8.2 → graphinate-0.8.3}/examples/social/cache/70/b6/2aefb0269adce7fedf877fa0d267.val +0 -0
  59. {graphinate-0.8.2 → graphinate-0.8.3}/examples/social/cache/87/f5/ec1739bc369e84c3fcb302bf532a.val +0 -0
  60. {graphinate-0.8.2 → graphinate-0.8.3}/examples/social/cache/ba/fe/3aca7b2c38abff60e7ce5eb486a8.val +0 -0
  61. {graphinate-0.8.2 → graphinate-0.8.3}/examples/social/cache/c7/9e/ce82b0288020b7152779df09bd73.val +0 -0
  62. {graphinate-0.8.2 → graphinate-0.8.3}/examples/social/cache/cache.db +0 -0
  63. {graphinate-0.8.2 → graphinate-0.8.3}/examples/social/cache/d2/53/3b88f2fc162561cfdbbe9abc352a.val +0 -0
  64. {graphinate-0.8.2 → graphinate-0.8.3}/examples/social/cache/e2/d5/5d079f200eabf9b625b0473f6fbe.val +0 -0
  65. {graphinate-0.8.2 → graphinate-0.8.3}/examples/social/gui.py +0 -0
  66. {graphinate-0.8.2 → graphinate-0.8.3}/examples/social/music_artists.py +0 -0
  67. {graphinate-0.8.2 → graphinate-0.8.3}/examples/social/requirements.txt +0 -0
  68. {graphinate-0.8.2 → graphinate-0.8.3}/examples/system/.ignore +0 -0
  69. {graphinate-0.8.2 → graphinate-0.8.3}/examples/system/files.py +0 -0
  70. {graphinate-0.8.2 → graphinate-0.8.3}/examples/system/processes.py +0 -0
  71. {graphinate-0.8.2 → graphinate-0.8.3}/examples/system/requirements.txt +0 -0
  72. {graphinate-0.8.2 → graphinate-0.8.3}/examples/web/html_dom.py +0 -0
  73. {graphinate-0.8.2 → graphinate-0.8.3}/examples/web/page_links.py +0 -0
  74. {graphinate-0.8.2 → graphinate-0.8.3}/examples/web/requirements.txt +0 -0
  75. {graphinate-0.8.2 → graphinate-0.8.3}/mkdocs.yml +0 -0
  76. {graphinate-0.8.2 → graphinate-0.8.3}/playground/ethernet/traceroute.py +0 -0
  77. {graphinate-0.8.2 → graphinate-0.8.3}/playground/genric_graph.graphql +0 -0
  78. {graphinate-0.8.2 → graphinate-0.8.3}/playground/graphql.config.yml +0 -0
  79. {graphinate-0.8.2 → graphinate-0.8.3}/playground/house_of_graphs.py +0 -0
  80. {graphinate-0.8.2 → graphinate-0.8.3}/playground/science/caffeine.py +0 -0
  81. {graphinate-0.8.2 → graphinate-0.8.3}/playground/social/albums.json +0 -0
  82. {graphinate-0.8.2 → graphinate-0.8.3}/playground/social/musicisians.py +0 -0
  83. {graphinate-0.8.2 → graphinate-0.8.3}/playground/text/nlp_graph.py +0 -0
  84. {graphinate-0.8.2 → graphinate-0.8.3}/playground/text/requirements.txt +0 -0
  85. {graphinate-0.8.2 → graphinate-0.8.3}/playground/time_series/requirements.txt +0 -0
  86. {graphinate-0.8.2 → graphinate-0.8.3}/playground/time_series/visibility_graph.py +0 -0
  87. {graphinate-0.8.2 → graphinate-0.8.3}/sonar-project.properties +0 -0
  88. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/__init__.py +0 -0
  89. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/__main__.py +0 -0
  90. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/builders.py +0 -0
  91. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/cli.py +0 -0
  92. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/color.py +0 -0
  93. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/constants.py +0 -0
  94. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/converters.py +0 -0
  95. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/modeling.py +0 -0
  96. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/renderers/__init__.py +0 -0
  97. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/renderers/matplotlib.py +0 -0
  98. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/__init__.py +0 -0
  99. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/starlette/__init__.py +0 -0
  100. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/starlette/views.py +0 -0
  101. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/__init__.py +0 -0
  102. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/elements/__init__.py +0 -0
  103. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/elements/index.html +0 -0
  104. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/graphiql/__init__.py +0 -0
  105. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/graphiql/index.html +0 -0
  106. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/rapidoc/__init__.py +0 -0
  107. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/rapidoc/index.html +0 -0
  108. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/static/images/logo-128.png +0 -0
  109. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/static/images/logo.svg +0 -0
  110. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/static/images/network_graph.png +0 -0
  111. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/viewer/__init__.py +0 -0
  112. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/voyager/__init__.py +0 -0
  113. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/server/web/voyager/index.html +0 -0
  114. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/tools.py +0 -0
  115. {graphinate-0.8.2 → graphinate-0.8.3}/src/graphinate/typing.py +0 -0
  116. {graphinate-0.8.2 → graphinate-0.8.3}/tests/conftest.py +0 -0
  117. {graphinate-0.8.2 → graphinate-0.8.3}/tests/graphinate/test_builders.py +0 -0
  118. {graphinate-0.8.2 → graphinate-0.8.3}/tests/graphinate/test_cli.py +0 -0
  119. {graphinate-0.8.2 → graphinate-0.8.3}/tests/graphinate/test_color.py +0 -0
  120. {graphinate-0.8.2 → graphinate-0.8.3}/tests/graphinate/test_converters.py +0 -0
  121. {graphinate-0.8.2 → graphinate-0.8.3}/tests/graphinate/test_modeling.py +0 -0
  122. {graphinate-0.8.2 → graphinate-0.8.3}/tests/graphinate/test_server.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Graphinate
3
- Version: 0.8.2
3
+ Version: 0.8.3
4
4
  Summary: Graphinate. Data to Graphs.
5
5
  Project-URL: Homepage, https://erivlis.github.io/graphinate
6
6
  Project-URL: Documentation, https://erivlis.github.io/graphinate
@@ -2,11 +2,10 @@ import operator
2
2
 
3
3
  import graphs
4
4
  import networkx as nx
5
+ from materializers import Materializers, materialize
5
6
 
6
7
  import graphinate
7
8
 
8
- from .materializers import Materializers, materialize
9
-
10
9
 
11
10
  def model(items: list[tuple[str, nx.Graph]]) -> graphinate.GraphModel:
12
11
  """
@@ -4,7 +4,7 @@ from collections.abc import Callable, Mapping
4
4
  from enum import Enum
5
5
  from typing import Optional
6
6
 
7
- from graphinate import GraphModel, GraphType, builders, graphql, plot
7
+ from graphinate import GraphModel, GraphType, builders, graphql, matplotlib
8
8
 
9
9
 
10
10
  class Materializers(Enum):
@@ -17,9 +17,10 @@ class Materializers(Enum):
17
17
  NetworkX_with_edge_labels: create a NetworkX Graph and plot+show it with matplotlib
18
18
  """
19
19
  D3Graph: tuple = (builders.D3Builder, lambda d: print(json.dumps(d, indent=2, default=str)))
20
- GraphQL: tuple = (builders.GraphQLBuilder, graphql)
21
- NetworkX: tuple = (builders.NetworkxBuilder, plot)
22
- NetworkX_with_edge_labels: tuple = (builders.NetworkxBuilder, functools.partial(plot, with_edge_labels=True))
20
+ GraphQL: tuple = (builders.GraphQLBuilder, graphql.server)
21
+ NetworkX: tuple = (builders.NetworkxBuilder, matplotlib.plot)
22
+ NetworkX_with_edge_labels: tuple = (builders.NetworkxBuilder,
23
+ functools.partial(matplotlib.plot, with_edge_labels=True))
23
24
  Mermaid: tuple = (builders.MermaidBuilder, print)
24
25
 
25
26
 
@@ -34,12 +34,13 @@ def polygonal_graph_model(name: str, number_of_sides: int) -> graphinate.GraphMo
34
34
 
35
35
  return graph_model
36
36
 
37
-
37
+ # instantiated here to be used to cli serving
38
38
  model = polygonal_graph_model("Octagonal Graph", 8)
39
39
 
40
40
  if __name__ == '__main__':
41
+
41
42
  # 1. Define Graph Builder
42
- builder = graphinate.builders.NetworkxBuilder(model=model)
43
+ builder = graphinate.builders.NetworkxBuilder(model)
43
44
 
44
45
  # Then
45
46
  # 2. Build the Graph object
@@ -51,4 +52,12 @@ if __name__ == '__main__':
51
52
 
52
53
  # Or
53
54
  # 3. Option B - Output as a plot
54
- graphinate.materializers.plot(graph)
55
+ graphinate.renderers.matplotlib.plot(graph)
56
+
57
+ # Alternatively,
58
+ # 4. Define a GraphQL Builder
59
+ builder = graphinate.builders.GraphQLBuilder(model)
60
+
61
+ schema = builder.build()
62
+
63
+ graphinate.graphql.server(schema, port=9077)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "Graphinate"
3
- version = "0.8.2"
3
+ version = "0.8.3"
4
4
  description = "Graphinate. Data to Graphs."
5
5
  authors = [
6
6
  { name = "Eran Rivlis", email = "eran@rivlis.info" },
@@ -29,7 +29,7 @@ def _openapi_schema(request: Request) -> ASGIApp:
29
29
  """
30
30
  schema_data = {
31
31
  'openapi': '3.0.0',
32
- 'info': {'title': 'Graphinate API', 'version': '0.8.2'},
32
+ 'info': {'title': 'Graphinate API', 'version': '0.8.3'},
33
33
  'paths': {
34
34
  '/graphql': {'get': {'responses': {200: {'description': 'GraphQL'}}}},
35
35
  '/graphiql': {'get': {'responses': {200: {'description': 'GraphiQL UI.'}}}},
@@ -19,13 +19,12 @@
19
19
  window.Tweakpane = Tweakpane;
20
20
  window.TweakpaneEssentialsPlugin = TweakpaneEssentialsPlugin;
21
21
  </script>
22
- <script src="https://unpkg.com/3d-force-graph@1.76.1/dist/3d-force-graph.min.js"
23
- integrity="sha384-hNwCF3Cb+c2HRg4oybw2YGB80Ytiml/p9GEMz87Ac4SiSMF4lZ/uywlTqHH+zWx0"
22
+ <script src="https://cdn.jsdelivr.net/npm/3d-force-graph@1.76.2/dist/3d-force-graph.min.js"
23
+ integrity="sha384-zSKZ615fogcuRjUjE+0YstAo3N/t7PzUvtQu5KGA1iqkmHXsTRst7zP+6573D+hK"
24
24
  crossorigin="anonymous"></script>
25
- <script src="https://unpkg.com/murmurhash-js@1.0.0/murmurhash3_gc.js"
26
- integrity="sha384-g+j9YCPmBDu4mlFm1UGyQFBh5P7x/xYGJvqbX/WFbzJC2V/wwBRCorSlQ1UaAED0"
25
+ <script src="https://cdn.jsdelivr.net/npm/murmurhash-js@1.0.0/murmurhash3_gc.min.js"
26
+ integrity="sha384-RTcg9S2mr/vVW+vsvQZB7G2cYWnhkBdsMvqKzHxL41KG4zTgrMSzGfm7mzw0aYU2"
27
27
  crossorigin="anonymous"></script>
28
-
29
28
  <!-- Append this element into the head element to apply the theme -->
30
29
  <style>
31
30
  body {
@@ -319,7 +318,7 @@
319
318
  return `<div style="color: ${gEl.color}; font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; outline-color: ${gEl.color}">${gEl.type}<br>'${gEl.label}'</div>`
320
319
  }
321
320
 
322
- const Graph = ForceGraph3D()(document.getElementById('3d-graph'))
321
+ const Graph = new ForceGraph3D(document.getElementById('3d-graph'))
323
322
  .nodeColor('color')
324
323
  .nodeVal(node => graphParams.nodeVal)
325
324
  .nodeLabel(node => createLabel(node))
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes