Skip to content

Commit

Permalink
Bump to version 2.1.2 (#123)
Browse files Browse the repository at this point in the history
- Bump to version 2.1.2
- Pin version of gremlinpython to <3.5.*
- address lodash vulnerability
- variable injection handling a dict should inject valid json
  • Loading branch information
austinkline authored May 11, 2021
1 parent 912692c commit 3f16435
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Starting with v1.31.6, this file will contain a record of major features and updates made in each release of graph-notebook.

## Upcoming

## Release 2.1.2 (May 10, 2021)

- Pin gremlinpython to `<3.5.*` ([Link to PR](https://github.com/aws/graph-notebook/pull/123))
- Add support for notebook variables in Sparql/Gremlin magic queries ([Link to PR](https://github.com/aws/graph-notebook/pull/113))
- Add support for grouping by different properties per label in Gremlin ([Link to PR](https://github.com/aws/graph-notebook/pull/115))
- Fix missing Boto3 dependency in setup.py ([Link to PR](https://github.com/aws/graph-notebook/pull/118))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def get_version():
package_dir={'': 'src'},
include_package_data=True,
install_requires=[
'gremlinpython',
'gremlinpython<3.5.*',
'SPARQLWrapper==1.8.4',
'tornado==4.5.3',
'requests',
Expand Down
2 changes: 1 addition & 1 deletion src/graph_notebook/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
SPDX-License-Identifier: Apache-2.0
"""

__version__ = '2.1.1'
__version__ = '2.1.2'
2 changes: 1 addition & 1 deletion src/graph_notebook/decorators/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def use_magic_variables(*args, **kwargs):
# args[1] = variable_regex.sub(lambda m: str(local_ns[m.group(1)]), line_string)
if len(args) > 2:
cell_string = args[2]
args[2] = variable_regex.sub(lambda m: str(local_ns[m.group(1)]), cell_string)
args[2] = variable_regex.sub(lambda m: json.dumps(local_ns[m.group(1)]) if type(local_ns[m.group(1)]) is dict else str(local_ns[m.group(1)]), cell_string)
return func(*args, **kwargs)
except KeyError as key_error:
print(f'Terminated query due to undefined variable: {key_error}')
Expand Down
8 changes: 2 additions & 6 deletions src/graph_notebook/magics/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import datetime
import logging
import time

from IPython.core.display import display
from botocore.session import get_session
from ipywidgets import widgets

from graph_notebook.magics.parsing import str_to_namespace_var
from graph_notebook.neptune.client import Client, ClientBuilder

logger = logging.getLogger("neptune_ml_magic_handler")
Expand Down Expand Up @@ -249,7 +249,7 @@ def wait_for_dataprocessing(job_id: str, client: Client, output: widgets.Output,
time.sleep(wait_interval)


def neptune_ml_dataprocessing(args: argparse.Namespace, client, output: widgets.Output, params: dict = None):
def neptune_ml_dataprocessing(args: argparse.Namespace, client, output: widgets.Output, params):
if args.which_sub == 'start':
if params is None or params == '' or params == {}:
params = {
Expand Down Expand Up @@ -382,10 +382,6 @@ def neptune_ml_endpoint(args: argparse.Namespace, client: Client, output: widget


def neptune_ml_magic_handler(args, client: Client, output: widgets.Output, cell: str = '', local_ns: dict = None):
if local_ns is None:
local_ns = {}
cell = str_to_namespace_var(cell, local_ns)

if args.which == 'export':
return neptune_ml_export(args, client, output, cell)
elif args.which == 'dataprocessing':
Expand Down
4 changes: 2 additions & 2 deletions src/graph_notebook/widgets/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "graph_notebook_widgets",
"version": "2.1.1",
"version": "2.1.2",
"author": "amazon",
"description": "A Custom Jupyter Library for rendering NetworkX MultiDiGraphs using vis-network",
"dependencies": {
"@jupyter-widgets/base": "2.0.2",
"feather-icons": "4.28.0",
"jquery": "3.5.1",
"jqueryui": "1.11.1",
"lodash": "4.17.19",
"lodash": "4.17.21",
"vis-data": "6.5.1",
"vis-network": "7.6.3",
"vis-util": "4.0.0"
Expand Down

0 comments on commit 3f16435

Please sign in to comment.