From a34235b7d01f85ac840d9d715972c3957cc268c4 Mon Sep 17 00:00:00 2001 From: Michael Chin Date: Mon, 6 Jun 2022 19:43:20 -0700 Subject: [PATCH 1/2] Remove deprecated Gremlin operations from samples and code --- .../magics/completers/graph_completer.py | 4 ---- .../02-Using-Gremlin-to-Access-the-Graph.ipynb | 12 ++++++------ ...Social-Network-Recommendations-with-Gremlin.ipynb | 4 ++-- .../01-Building-a-Knowledge-Graph-Application.ipynb | 6 +++--- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/graph_notebook/magics/completers/graph_completer.py b/src/graph_notebook/magics/completers/graph_completer.py index e3f4a3d8..f81d66d8 100644 --- a/src/graph_notebook/magics/completers/graph_completer.py +++ b/src/graph_notebook/magics/completers/graph_completer.py @@ -133,10 +133,6 @@ '.T.label', '.T.key', '.T.value', - '.incr', - '.Order.incr', - '.decr', - '.Order.decr', '.asc', '.Order.asc', '.desc', diff --git a/src/graph_notebook/notebooks/01-Getting-Started/02-Using-Gremlin-to-Access-the-Graph.ipynb b/src/graph_notebook/notebooks/01-Getting-Started/02-Using-Gremlin-to-Access-the-Graph.ipynb index 1f0b9004..e4f23ff9 100644 --- a/src/graph_notebook/notebooks/01-Getting-Started/02-Using-Gremlin-to-Access-the-Graph.ipynb +++ b/src/graph_notebook/notebooks/01-Getting-Started/02-Using-Gremlin-to-Access-the-Graph.ipynb @@ -162,8 +162,8 @@ "source": [ "%%gremlin\n", "\n", - "g.V('1').addE('knows').to(g.V('2')).property('weight', 0.5).next()\n", - "g.addE('knows').from(g.V('1')).to(g.V('4')).property('weight', 1.0) " + "g.V('1').addE('knows').to(__.V('2')).property('weight', 0.5).next()\n", + "g.addE('knows').from(__.V('1')).to(__.V('4')).property('weight', 1.0)" ] }, { @@ -183,10 +183,10 @@ "source": [ "%%gremlin\n", "\n", - "g.V('1').addE('created').to(g.V('3')).property('weight', 0.4).next()\n", - "g.V('4').addE('created').to(g.V('5')).property('weight', 1.0).next()\n", - "g.V('4').addE('knows').to(g.V('3')).property('weight', 0.4).next()\n", - "g.V('6').addE('created').to(g.V('3')).property('weight', 0.2)" + "g.V('1').addE('created').to(__.V('3')).property('weight', 0.4).next()\n", + "g.V('4').addE('created').to(__.V('5')).property('weight', 1.0).next()\n", + "g.V('4').addE('knows').to(__.V('3')).property('weight', 0.4).next()\n", + "g.V('6').addE('created').to(__.V('3')).property('weight', 0.2)" ] }, { diff --git a/src/graph_notebook/notebooks/01-Getting-Started/04-Social-Network-Recommendations-with-Gremlin.ipynb b/src/graph_notebook/notebooks/01-Getting-Started/04-Social-Network-Recommendations-with-Gremlin.ipynb index 463f18f4..094a2ff9 100644 --- a/src/graph_notebook/notebooks/01-Getting-Started/04-Social-Network-Recommendations-with-Gremlin.ipynb +++ b/src/graph_notebook/notebooks/01-Getting-Started/04-Social-Network-Recommendations-with-Gremlin.ipynb @@ -190,7 +190,7 @@ " both('FRIEND').\n", " where(P.neq('user')).where(P.without('friends')). \n", " groupCount().by('name'). \n", - " order(Scope.local).by(values, Order.decr).\n", + " order(Scope.local).by(values, Order.desc).\n", " next()" ] }, @@ -223,7 +223,7 @@ " .has('strength', P.gt(1)).otherV()\n", " .where(P.neq('user')).where(P.without('friends'))\n", " .groupCount().by('name')\n", - " .order(Scope.local).by(values, Order.decr)\n", + " .order(Scope.local).by(values, Order.desc)\n", " .next()\n" ] }, diff --git a/src/graph_notebook/notebooks/03-Sample-Applications/02-Knowledge-Graphs/01-Building-a-Knowledge-Graph-Application.ipynb b/src/graph_notebook/notebooks/03-Sample-Applications/02-Knowledge-Graphs/01-Building-a-Knowledge-Graph-Application.ipynb index 80e83dee..60b61677 100644 --- a/src/graph_notebook/notebooks/03-Sample-Applications/02-Knowledge-Graphs/01-Building-a-Knowledge-Graph-Application.ipynb +++ b/src/graph_notebook/notebooks/03-Sample-Applications/02-Knowledge-Graphs/01-Building-a-Knowledge-Graph-Application.ipynb @@ -347,7 +347,7 @@ "g.V('Dave Bechberger').\n", " in('written_by').\n", " out('found_in').groupCount().by('text').order(local).\n", - " by(values, Order.decr).unfold()" + " by(values, Order.desc).unfold()" ] }, { @@ -378,7 +378,7 @@ " in('written_by').\n", " out('found_in').\n", " groupCount().by('text').\n", - " order(local).by(values, Order.decr).\n", + " order(local).by(values, Order.desc).\n", " unfold()" ] }, @@ -408,7 +408,7 @@ " out('found_in').\n", " has('text', without('AWS', 'Amazon', 'Neptune')).\n", " groupCount().by('text').\n", - " order(local).by(values, Order.decr).\n", + " order(local).by(values, Order.desc).\n", " unfold()" ] }, From 78a0893cf855933c778b5709e5f412e15cddf823 Mon Sep 17 00:00:00 2001 From: Michael Chin Date: Mon, 6 Jun 2022 19:51:53 -0700 Subject: [PATCH 2/2] Update Changelog --- ChangeLog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog.md b/ChangeLog.md index dda37e98..61ac1693 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -15,6 +15,7 @@ Starting with v1.31.6, this file will contain a record of major features and upd - Fixed rendering of openCypher widgets for empty result sets ([Link to PR](https://github.com/aws/graph-notebook/pull/286)) - Fixed graph search overriding physics setting ([Link to PR](https://github.com/aws/graph-notebook/pull/282)) - Fixed browser-specific bug in results pagination options menu ([Link to PR](https://github.com/aws/graph-notebook/pull/290)) +- Fixed invalid queries in Gremlin sample notebooks ([Link to PR](https://github.com/aws/graph-notebook/pull/308)) - Removed `requests-aws4auth` requirement ([Link to PR](https://github.com/aws/graph-notebook/pull/291)) ## Release 3.3.0 (March 28, 2022)