anywidget-graph 0.4.3__tar.gz → 0.4.4__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 (63) hide show
  1. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/CHANGELOG.md +7 -0
  2. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/PKG-INFO +1 -1
  3. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/pyproject.toml +1 -1
  4. anywidget_graph-0.4.4/scripts/vendor/build.mjs +40 -0
  5. anywidget_graph-0.4.4/scripts/vendor/entry.mjs +7 -0
  6. anywidget_graph-0.4.4/scripts/vendor/package-lock.json +642 -0
  7. anywidget_graph-0.4.4/scripts/vendor/package.json +19 -0
  8. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/__init__.py +1 -1
  9. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/__init__.py +6 -7
  10. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/index.js +2 -3
  11. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/neo4j.js +9 -1
  12. anywidget_graph-0.4.4/src/anywidget_graph/ui/vendor/graph-libs.LICENSES.txt +201 -0
  13. anywidget_graph-0.4.4/src/anywidget_graph/ui/vendor/graph-libs.min.js +312 -0
  14. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/tests/test_ui.py +36 -4
  15. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/uv.lock +2 -2
  16. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/.github/workflows/ci.yml +0 -0
  17. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/.github/workflows/grafeo-latest.yml +0 -0
  18. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/.github/workflows/pypi.yml +0 -0
  19. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/.gitignore +0 -0
  20. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/.python-version +0 -0
  21. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/LICENSE +0 -0
  22. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/README.md +0 -0
  23. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/assets/demo.png +0 -0
  24. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/examples/demo.py +0 -0
  25. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/examples/test_hierarchy.py +0 -0
  26. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/examples/test_large_graph.py +0 -0
  27. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/backends/__init__.py +0 -0
  28. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/backends/arango.py +0 -0
  29. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/backends/cosmosdb.py +0 -0
  30. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/backends/grafeo.py +0 -0
  31. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/backends/ladybug.py +0 -0
  32. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/backends/neo4j.py +0 -0
  33. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/converters/__init__.py +0 -0
  34. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/converters/base.py +0 -0
  35. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/converters/common.py +0 -0
  36. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/converters/cypher.py +0 -0
  37. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/converters/gql.py +0 -0
  38. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/converters/graphql.py +0 -0
  39. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/converters/gremlin.py +0 -0
  40. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/converters/sparql.py +0 -0
  41. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/demo.py +0 -0
  42. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/py.typed +0 -0
  43. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/defaults.js +0 -0
  44. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/grafeo-embed.js +0 -0
  45. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/grafeo-result.js +0 -0
  46. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/grafeo.js +0 -0
  47. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/icons.js +0 -0
  48. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/lanes.js +0 -0
  49. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/properties.js +0 -0
  50. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/results.js +0 -0
  51. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/schema.js +0 -0
  52. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/settings.js +0 -0
  53. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/styles.css +0 -0
  54. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/ui/toolbar.js +0 -0
  55. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/src/anywidget_graph/widget.py +0 -0
  56. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/tests/__init__.py +0 -0
  57. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/tests/conftest.py +0 -0
  58. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/tests/js/grafeo-result.test.mjs +0 -0
  59. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/tests/js/lanes.test.mjs +0 -0
  60. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/tests/test_backends_grafeo.py +0 -0
  61. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/tests/test_demo.py +0 -0
  62. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/tests/test_grafeo_contract.py +0 -0
  63. {anywidget_graph-0.4.3 → anywidget_graph-0.4.4}/tests/test_graph.py +0 -0
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.4 2026-10-19
4
+
5
+ ### Bug Fixes
6
+
7
+ - **The widget loads without a CDN**: graphology, sigma, graphology-layout, graphology-layout-forceatlas2 and d3-force are bundled with the widget (`ui/vendor/graph-libs.min.js`, built from pinned npm versions by `scripts/vendor`, licenses in `ui/vendor/graph-libs.LICENSES.txt`) instead of loaded from esm.sh on every render. A page that could not reach esm.sh or cdn.jsdelivr.net (offline, a network filter, a blocker, a CDN outage) showed "Failed to fetch dynamically imported module" instead of the graph
8
+ - **neo4j-driver loads when a Neo4j connection is made**: it was imported from cdn.jsdelivr.net with the widget, so every host needed the CDN even without Neo4j. The Neo4j backend and the Grafeo WASM backend are now the only parts that load code from the network, and only when they connect
9
+
3
10
  ## 0.4.3 2026-10-12
4
11
 
5
12
  ### Improvements
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: anywidget-graph
3
- Version: 0.4.3
3
+ Version: 0.4.4
4
4
  Summary: Interactive graph visualization for Python notebooks using anywidget
5
5
  Project-URL: Homepage, https://grafeo.dev/
6
6
  Project-URL: Repository, https://github.com/GrafeoDB/anywidget-graph
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "anywidget-graph"
3
- version = "0.4.3"
3
+ version = "0.4.4"
4
4
  description = "Interactive graph visualization for Python notebooks using anywidget"
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -0,0 +1,40 @@
1
+ // Bundle the graph libraries into one script the widget inlines, and collect the licenses of every bundled package.
2
+ // Run after `npm ci` in this folder: npm run build
3
+ import { build } from "esbuild";
4
+ import { readFileSync, readdirSync, writeFileSync } from "node:fs";
5
+ import { dirname, join } from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+
8
+ const here = dirname(fileURLToPath(import.meta.url));
9
+ const out = join(here, "..", "..", "src", "anywidget_graph", "ui", "vendor");
10
+
11
+ const result = await build({
12
+ entryPoints: [join(here, "entry.mjs")],
13
+ bundle: true,
14
+ format: "iife",
15
+ globalName: "anywidgetGraphVendor",
16
+ minify: true,
17
+ legalComments: "none",
18
+ target: "es2020",
19
+ metafile: true,
20
+ outfile: join(out, "graph-libs.min.js"),
21
+ });
22
+
23
+ // Every package that ended up in the bundle, with its license text
24
+ const packages = new Map();
25
+ for (const input of Object.keys(result.metafile.inputs)) {
26
+ const match = /node_modules[\\/]((?:@[^\\/]+[\\/])?[^\\/]+)/.exec(input);
27
+ if (match) packages.set(match[1].replace("\\", "/"), true);
28
+ }
29
+ const sections = [...packages.keys()].sort().map((name) => {
30
+ const folder = join(here, "node_modules", name);
31
+ const { version, license } = JSON.parse(readFileSync(join(folder, "package.json"), "utf8"));
32
+ const file = readdirSync(folder).find((f) => /^licen[cs]e/i.test(f));
33
+ const text = file ? readFileSync(join(folder, file), "utf8").trim() : `(no license file; package.json says ${license})`;
34
+ return `== ${name}@${version} (${license})\n\n${text}\n`;
35
+ });
36
+ writeFileSync(
37
+ join(out, "graph-libs.LICENSES.txt"),
38
+ `Licenses of the packages bundled in graph-libs.min.js (built by scripts/vendor)\n\n${sections.join("\n")}`,
39
+ );
40
+ console.log(`graph-libs.min.js: ${[...packages.keys()].sort().join(", ")}`);
@@ -0,0 +1,7 @@
1
+ // The libraries the widget uses, under the names its modules expect (see ui/__init__.py)
2
+ export { default as Graph } from "graphology";
3
+ export { default as Sigma } from "sigma";
4
+ export { default as circular } from "graphology-layout/circular.js";
5
+ export { default as random } from "graphology-layout/random.js";
6
+ export { default as forceAtlas2 } from "graphology-layout-forceatlas2";
7
+ export * as d3Force from "d3-force";