Graphinate 0.8.1__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.1 → graphinate-0.8.3}/.github/workflows/test-beta.yml +1 -1
  2. {graphinate-0.8.1 → graphinate-0.8.3}/PKG-INFO +1 -1
  3. {graphinate-0.8.1 → graphinate-0.8.3}/examples/math/graph_atlas.py +1 -2
  4. {graphinate-0.8.1 → graphinate-0.8.3}/examples/math/materializers.py +5 -4
  5. {graphinate-0.8.1 → graphinate-0.8.3}/examples/math/polygonal_graph.py +12 -3
  6. {graphinate-0.8.1 → graphinate-0.8.3}/pyproject.toml +1 -1
  7. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/renderers/graphql.py +31 -18
  8. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/viewer/index.html +14 -11
  9. {graphinate-0.8.1 → graphinate-0.8.3}/.coveragerc +0 -0
  10. {graphinate-0.8.1 → graphinate-0.8.3}/.github/dependabot.yml +0 -0
  11. {graphinate-0.8.1 → graphinate-0.8.3}/.github/workflows/codeql.yml +0 -0
  12. {graphinate-0.8.1 → graphinate-0.8.3}/.github/workflows/publish-docs.yaml +0 -0
  13. {graphinate-0.8.1 → graphinate-0.8.3}/.github/workflows/publish.yml +0 -0
  14. {graphinate-0.8.1 → graphinate-0.8.3}/.github/workflows/test.yml +0 -0
  15. {graphinate-0.8.1 → graphinate-0.8.3}/.gitignore +0 -0
  16. {graphinate-0.8.1 → graphinate-0.8.3}/.sonarcloud.properties +0 -0
  17. {graphinate-0.8.1 → graphinate-0.8.3}/LICENSE +0 -0
  18. {graphinate-0.8.1 → graphinate-0.8.3}/README.md +0 -0
  19. {graphinate-0.8.1 → graphinate-0.8.3}/docs/.dates_cache.json +0 -0
  20. {graphinate-0.8.1 → graphinate-0.8.3}/docs/acknowledge.md +0 -0
  21. {graphinate-0.8.1 → graphinate-0.8.3}/docs/assets/badge/v0.json +0 -0
  22. {graphinate-0.8.1 → graphinate-0.8.3}/docs/assets/images/logo-128.png +0 -0
  23. {graphinate-0.8.1 → graphinate-0.8.3}/docs/assets/images/network_graph.png +0 -0
  24. {graphinate-0.8.1 → graphinate-0.8.3}/docs/assets/stylesheets/extra.css +0 -0
  25. {graphinate-0.8.1 → graphinate-0.8.3}/docs/examples/code.md +0 -0
  26. {graphinate-0.8.1 → graphinate-0.8.3}/docs/examples/github.md +0 -0
  27. {graphinate-0.8.1 → graphinate-0.8.3}/docs/examples/math.md +0 -0
  28. {graphinate-0.8.1 → graphinate-0.8.3}/docs/examples/social.md +0 -0
  29. {graphinate-0.8.1 → graphinate-0.8.3}/docs/examples/system.md +0 -0
  30. {graphinate-0.8.1 → graphinate-0.8.3}/docs/examples/web.md +0 -0
  31. {graphinate-0.8.1 → graphinate-0.8.3}/docs/gen_ref_pages.py +0 -0
  32. {graphinate-0.8.1 → graphinate-0.8.3}/docs/index.md +0 -0
  33. {graphinate-0.8.1 → graphinate-0.8.3}/docs/intro.md +0 -0
  34. {graphinate-0.8.1 → graphinate-0.8.3}/docs/start.md +0 -0
  35. {graphinate-0.8.1 → graphinate-0.8.3}/docs/tutorial.md +0 -0
  36. {graphinate-0.8.1 → graphinate-0.8.3}/docs/usage/cli.md +0 -0
  37. {graphinate-0.8.1 → graphinate-0.8.3}/docs/usage/lib.md +0 -0
  38. {graphinate-0.8.1 → graphinate-0.8.3}/examples/code/git_commits.py +0 -0
  39. {graphinate-0.8.1 → graphinate-0.8.3}/examples/code/python_ast.py +0 -0
  40. {graphinate-0.8.1 → graphinate-0.8.3}/examples/code/python_dependencies.py +0 -0
  41. {graphinate-0.8.1 → graphinate-0.8.3}/examples/code/requirements.txt +0 -0
  42. {graphinate-0.8.1 → graphinate-0.8.3}/examples/code/tokens.py +0 -0
  43. {graphinate-0.8.1 → graphinate-0.8.3}/examples/github/_client.py +0 -0
  44. {graphinate-0.8.1 → graphinate-0.8.3}/examples/github/commits_visibilty_graph.py +0 -0
  45. {graphinate-0.8.1 → graphinate-0.8.3}/examples/github/followers.graphql +0 -0
  46. {graphinate-0.8.1 → graphinate-0.8.3}/examples/github/followers.py +0 -0
  47. {graphinate-0.8.1 → graphinate-0.8.3}/examples/github/graphql.config.yml +0 -0
  48. {graphinate-0.8.1 → graphinate-0.8.3}/examples/github/repositories.graphql +0 -0
  49. {graphinate-0.8.1 → graphinate-0.8.3}/examples/github/repositories.py +0 -0
  50. {graphinate-0.8.1 → graphinate-0.8.3}/examples/github/requirements.txt +0 -0
  51. {graphinate-0.8.1 → graphinate-0.8.3}/examples/math/__init__.py +0 -0
  52. {graphinate-0.8.1 → graphinate-0.8.3}/examples/math/_test_materializers.py +0 -0
  53. {graphinate-0.8.1 → graphinate-0.8.3}/examples/math/graphs.py +0 -0
  54. {graphinate-0.8.1 → graphinate-0.8.3}/examples/math/gui.py +0 -0
  55. {graphinate-0.8.1 → graphinate-0.8.3}/examples/math/requirements.txt +0 -0
  56. {graphinate-0.8.1 → graphinate-0.8.3}/examples/social/cache/13/dd/73ce25face7beb30b69b64feeb77.val +0 -0
  57. {graphinate-0.8.1 → graphinate-0.8.3}/examples/social/cache/21/9e/00846f323987ba16cfbe0127d8eb.val +0 -0
  58. {graphinate-0.8.1 → graphinate-0.8.3}/examples/social/cache/70/b6/2aefb0269adce7fedf877fa0d267.val +0 -0
  59. {graphinate-0.8.1 → graphinate-0.8.3}/examples/social/cache/87/f5/ec1739bc369e84c3fcb302bf532a.val +0 -0
  60. {graphinate-0.8.1 → graphinate-0.8.3}/examples/social/cache/ba/fe/3aca7b2c38abff60e7ce5eb486a8.val +0 -0
  61. {graphinate-0.8.1 → graphinate-0.8.3}/examples/social/cache/c7/9e/ce82b0288020b7152779df09bd73.val +0 -0
  62. {graphinate-0.8.1 → graphinate-0.8.3}/examples/social/cache/cache.db +0 -0
  63. {graphinate-0.8.1 → graphinate-0.8.3}/examples/social/cache/d2/53/3b88f2fc162561cfdbbe9abc352a.val +0 -0
  64. {graphinate-0.8.1 → graphinate-0.8.3}/examples/social/cache/e2/d5/5d079f200eabf9b625b0473f6fbe.val +0 -0
  65. {graphinate-0.8.1 → graphinate-0.8.3}/examples/social/gui.py +0 -0
  66. {graphinate-0.8.1 → graphinate-0.8.3}/examples/social/music_artists.py +0 -0
  67. {graphinate-0.8.1 → graphinate-0.8.3}/examples/social/requirements.txt +0 -0
  68. {graphinate-0.8.1 → graphinate-0.8.3}/examples/system/.ignore +0 -0
  69. {graphinate-0.8.1 → graphinate-0.8.3}/examples/system/files.py +0 -0
  70. {graphinate-0.8.1 → graphinate-0.8.3}/examples/system/processes.py +0 -0
  71. {graphinate-0.8.1 → graphinate-0.8.3}/examples/system/requirements.txt +0 -0
  72. {graphinate-0.8.1 → graphinate-0.8.3}/examples/web/html_dom.py +0 -0
  73. {graphinate-0.8.1 → graphinate-0.8.3}/examples/web/page_links.py +0 -0
  74. {graphinate-0.8.1 → graphinate-0.8.3}/examples/web/requirements.txt +0 -0
  75. {graphinate-0.8.1 → graphinate-0.8.3}/mkdocs.yml +0 -0
  76. {graphinate-0.8.1 → graphinate-0.8.3}/playground/ethernet/traceroute.py +0 -0
  77. {graphinate-0.8.1 → graphinate-0.8.3}/playground/genric_graph.graphql +0 -0
  78. {graphinate-0.8.1 → graphinate-0.8.3}/playground/graphql.config.yml +0 -0
  79. {graphinate-0.8.1 → graphinate-0.8.3}/playground/house_of_graphs.py +0 -0
  80. {graphinate-0.8.1/examples → graphinate-0.8.3/playground}/science/caffeine.py +0 -0
  81. {graphinate-0.8.1 → graphinate-0.8.3}/playground/social/albums.json +0 -0
  82. {graphinate-0.8.1 → graphinate-0.8.3}/playground/social/musicisians.py +0 -0
  83. {graphinate-0.8.1 → graphinate-0.8.3}/playground/text/nlp_graph.py +0 -0
  84. {graphinate-0.8.1 → graphinate-0.8.3}/playground/text/requirements.txt +0 -0
  85. {graphinate-0.8.1 → graphinate-0.8.3}/playground/time_series/requirements.txt +0 -0
  86. {graphinate-0.8.1 → graphinate-0.8.3}/playground/time_series/visibility_graph.py +0 -0
  87. {graphinate-0.8.1 → graphinate-0.8.3}/sonar-project.properties +0 -0
  88. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/__init__.py +0 -0
  89. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/__main__.py +0 -0
  90. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/builders.py +0 -0
  91. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/cli.py +0 -0
  92. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/color.py +0 -0
  93. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/constants.py +0 -0
  94. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/converters.py +0 -0
  95. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/modeling.py +0 -0
  96. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/renderers/__init__.py +0 -0
  97. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/renderers/matplotlib.py +0 -0
  98. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/__init__.py +0 -0
  99. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/starlette/__init__.py +0 -0
  100. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/starlette/views.py +0 -0
  101. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/__init__.py +0 -0
  102. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/elements/__init__.py +0 -0
  103. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/elements/index.html +0 -0
  104. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/graphiql/__init__.py +0 -0
  105. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/graphiql/index.html +0 -0
  106. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/rapidoc/__init__.py +0 -0
  107. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/rapidoc/index.html +0 -0
  108. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/static/images/logo-128.png +0 -0
  109. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/static/images/logo.svg +0 -0
  110. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/static/images/network_graph.png +0 -0
  111. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/viewer/__init__.py +0 -0
  112. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/voyager/__init__.py +0 -0
  113. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/server/web/voyager/index.html +0 -0
  114. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/tools.py +0 -0
  115. {graphinate-0.8.1 → graphinate-0.8.3}/src/graphinate/typing.py +0 -0
  116. {graphinate-0.8.1 → graphinate-0.8.3}/tests/conftest.py +0 -0
  117. {graphinate-0.8.1 → graphinate-0.8.3}/tests/graphinate/test_builders.py +0 -0
  118. {graphinate-0.8.1 → graphinate-0.8.3}/tests/graphinate/test_cli.py +0 -0
  119. {graphinate-0.8.1 → graphinate-0.8.3}/tests/graphinate/test_color.py +0 -0
  120. {graphinate-0.8.1 → graphinate-0.8.3}/tests/graphinate/test_converters.py +0 -0
  121. {graphinate-0.8.1 → graphinate-0.8.3}/tests/graphinate/test_modeling.py +0 -0
  122. {graphinate-0.8.1 → graphinate-0.8.3}/tests/graphinate/test_server.py +0 -0
@@ -16,7 +16,7 @@ jobs:
16
16
  fail-fast: false
17
17
  matrix:
18
18
  # https://github.com/actions/python-versions/blob/main/versions-manifest.json
19
- python-version: [ "3.14.0-alpha.5" ]
19
+ python-version: [ "3.14.0-alpha.6" ]
20
20
  steps:
21
21
  - uses: actions/checkout@v4
22
22
  - name: Set up Python ${{ matrix.python-version }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Graphinate
3
- Version: 0.8.1
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.1"
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.6.0'},
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.'}}}},
@@ -43,45 +43,58 @@ def _openapi_schema(request: Request) -> ASGIApp:
43
43
  return schema.OpenAPIResponse(request=request)
44
44
 
45
45
 
46
- def server(graphql_schema: strawberry.Schema, port: int = DEFAULT_PORT, **kwargs):
47
- """
48
- Args:
49
- graphql_schema: The Strawberry GraphQL schema.
50
- port: The port number to run the server on. Defaults to 8072.
51
-
52
- Returns:
53
- """
46
+ def _graphql_app(graphql_schema: strawberry.Schema) -> strawberry.asgi.GraphQL:
54
47
  graphql_schema.extensions.append(OpenTelemetryExtension)
48
+ graphql_app = GraphQL(graphql_schema, graphiql=True)
49
+ return graphql_app
50
+
55
51
 
56
- def open_url():
57
- for app_name in ('viewer',):
58
- webbrowser.open(f'http://localhost:{port}/{app_name}')
52
+ def _starlette_app(graphql_app: strawberry.asgi.GraphQL | None = None, port: int = DEFAULT_PORT, **kwargs) -> Starlette:
53
+ def open_url(endpoint):
54
+ webbrowser.open(f'http://localhost:{port}/{endpoint}')
59
55
 
60
56
  @contextlib.asynccontextmanager
61
57
  async def lifespan(app: Starlette): # pragma: no cover
62
58
  if kwargs.get('browse'):
63
- open_url()
59
+ open_url('viewer')
64
60
  yield
65
61
 
66
- graphql_app = GraphQL(graphql_schema, graphiql=True, graphql_ide='pathfinder')
67
62
  app = Starlette(
68
63
  lifespan=lifespan,
69
64
  routes=routes()
70
65
  )
71
- app.add_route(GRAPHQL_ROUTE_PATH, graphql_app)
72
- app.add_websocket_route(GRAPHQL_ROUTE_PATH, graphql_app)
73
66
 
74
67
  from starlette_prometheus import PrometheusMiddleware, metrics
75
68
  app.add_middleware(PrometheusMiddleware)
76
69
  app.add_route("/metrics", metrics)
77
- app.add_route("/schema", route=_openapi_schema, include_in_schema=False)
78
- app.add_route("/openapi.json", route=_openapi_schema, include_in_schema=False)
70
+
71
+ if graphql_app:
72
+ app.add_route(GRAPHQL_ROUTE_PATH, graphql_app)
73
+ app.add_websocket_route(GRAPHQL_ROUTE_PATH, graphql_app)
74
+ app.add_route("/schema", route=_openapi_schema, include_in_schema=False)
75
+ app.add_route("/openapi.json", route=_openapi_schema, include_in_schema=False)
79
76
 
80
77
  async def redirect_to_viewer(request):
81
78
  return RedirectResponse(url='/viewer')
82
79
 
83
80
  app.add_route('/', redirect_to_viewer)
84
81
 
82
+ return app
83
+
84
+
85
+ def server(graphql_schema: strawberry.Schema, port: int = DEFAULT_PORT, **kwargs):
86
+ """
87
+ Args:
88
+ graphql_schema: The Strawberry GraphQL schema.
89
+ port: The port number to run the server on. Defaults to 8072.
90
+
91
+ Returns:
92
+ """
93
+
94
+ graphql_app = _graphql_app(graphql_schema)
95
+
96
+ app = _starlette_app(graphql_app, port=port, **kwargs)
97
+
85
98
  import uvicorn
86
99
  uvicorn.run(app, host='0.0.0.0', port=port)
87
100
 
@@ -2,9 +2,15 @@
2
2
  <html lang="">
3
3
  <head>
4
4
  <title>Graphinate Viewer</title>
5
- <script type="module"
6
- integrity="sha384-Dt9sd/AA7KNs3M8XRJs7rNwUZ9bRWhsKjVz4UpCle+pCI/lqdylOH3mcYcKRBPKF"
7
- crossorigin="anonymous">
5
+ <link rel="modulepreload"
6
+ href="https://unpkg.com/tweakpane@4.0.5/dist/tweakpane.min.js"
7
+ integrity="sha384-Dt9sd/AA7KNs3M8XRJs7rNwUZ9bRWhsKjVz4UpCle+pCI/lqdylOH3mcYcKRBPKF"
8
+ crossorigin="anonymous">
9
+ <link rel="modulepreload"
10
+ href="https://unpkg.com/@tweakpane/plugin-essentials@0.2.1/dist/tweakpane-plugin-essentials.min.js"
11
+ integrity="sha384-q0QZoZn8RhBcEJYEcp7qn991YSevEjaL/GJwbQyuY0FlicmHWZmA384DCVgumN4u"
12
+ crossorigin="anonymous">
13
+ <script type="module">
8
14
  // Import ES module
9
15
  import * as Tweakpane from 'https://unpkg.com/tweakpane@4.0.5/dist/tweakpane.min.js';
10
16
  import * as TweakpaneEssentialsPlugin
@@ -13,15 +19,12 @@
13
19
  window.Tweakpane = Tweakpane;
14
20
  window.TweakpaneEssentialsPlugin = TweakpaneEssentialsPlugin;
15
21
  </script>
16
-
17
-
18
- <script src="https://unpkg.com/3d-force-graph@1.76.1/dist/3d-force-graph.min.js"
19
- integrity="sha384-7PiolihqoWLaY+8+zoccK5LLtWiGzovYvg5gjpKkQYhL51yq4JYt6owMj3bzQFBc"
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"
20
24
  crossorigin="anonymous"></script>
21
- <script src="https://unpkg.com/murmurhash-js@1.0.0/murmurhash3_gc.js"
22
- 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"
23
27
  crossorigin="anonymous"></script>
24
-
25
28
  <!-- Append this element into the head element to apply the theme -->
26
29
  <style>
27
30
  body {
@@ -315,7 +318,7 @@
315
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>`
316
319
  }
317
320
 
318
- const Graph = ForceGraph3D()(document.getElementById('3d-graph'))
321
+ const Graph = new ForceGraph3D(document.getElementById('3d-graph'))
319
322
  .nodeColor('color')
320
323
  .nodeVal(node => graphParams.nodeVal)
321
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