Skip to content

Add store-too functionality for magic commands #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -97,7 +97,16 @@ jobs:
--pattern "*network*.py" \
--cfn-stack-name ${{ needs.generate-stack-name.outputs.stack-name }} \
--aws-region ${{ secrets.AWS_REGION }}
- name: Run Notebook Tests
run: |
python test/integration/NeptuneIntegrationWorkflowSteps.py \
run-tests \
--pattern "*graph_notebook.py" \
--cfn-stack-name ${{ needs.generate-stack-name.outputs.stack-name }} \
--aws-region ${{ secrets.AWS_REGION }}
- name: Run IAM Tests
env:
GRAPH_NOTEBOK_CONFIG: /tmp/graph_notebook_config_integration_test.json
run: |
python test/integration/NeptuneIntegrationWorkflowSteps.py \
run-tests \
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -24,4 +24,5 @@ src/graph_notebook/widgets/lib/

# npm
node_modules/
node_modules/.package-lock.json
node_modules/.package-lock.json
src/graph_notebook/widgets/package-lock.json
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -4,12 +4,13 @@ networkx==2.4
Jinja2==2.10.1
jupyter
notebook==5.7.10
ipywidgets
ipywidgets==7.5.1
jupyter-contrib-nbextensions
widgetsnbextension
gremlinpython
requests
requests==2.24.0

# requirements for testing
boto3==1.15.15
botocore==1.18.18
ipython==7.16.1
2 changes: 1 addition & 1 deletion setupbase.py
Original file line number Diff line number Diff line change
@@ -374,7 +374,7 @@ def run(self):
if force or is_stale(node_modules, pjoin(node_package, 'package.json')):
log.info('Installing build dependencies with npm. This may '
'take a while...')
run(npm_cmd + ['ci'], cwd=node_package)
run(npm_cmd + ['install'], cwd=node_package)
if build_dir and source_dir and not force:
should_build = is_stale(build_dir, source_dir)
else:
2 changes: 1 addition & 1 deletion src/graph_notebook/__init__.py
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@
SPDX-License-Identifier: Apache-2.0
"""

__version__ = '1.33.0'
__version__ = '1.34.0'
7 changes: 7 additions & 0 deletions src/graph_notebook/decorators/decorators.py
Original file line number Diff line number Diff line change
@@ -21,18 +21,25 @@ def display_exceptions(func):
def do_display_exceptions(*args, **kwargs):
clear_output()
tab = widgets.Tab()

try:
return func(*args, **kwargs)
except KeyboardInterrupt:
print('Keyboard interrupt detected.')
return # we must return since we have halted the kernel interrupt here. Otherwise the interrupt will not work.
except HTTPError as http_ex:
caught_ex = http_ex
raw_html = http_ex_to_html(http_ex)
except GremlinServerError as gremlin_ex:
caught_ex = gremlin_ex
raw_html = gremlin_server_error_to_html(gremlin_ex)
except Exception as e:
caught_ex = e
raw_html = exception_to_html(e)

if 'local_ns' in kwargs:
kwargs['local_ns']['graph_notebook_error'] = caught_ex

html = HTML(raw_html)
html_output = widgets.Output(layout={'overflow': 'scroll'})
with html_output:
6 changes: 6 additions & 0 deletions src/graph_notebook/loader/load.py
Original file line number Diff line number Diff line change
@@ -11,7 +11,13 @@
FORMAT_RDFXML = 'rdfxml'
FORMAT_TURTLE = 'turtle'

PARALLELISM_LOW = 'LOW'
PARALLELISM_MEDIUM = 'MEDIUM'
PARALLELISM_HIGH = 'HIGH'
PARALLELISM_OVERSUBSCRIBE = 'OVERSUBSCRIBE'

VALID_FORMATS = [FORMAT_CSV, FORMAT_NTRIPLE, FORMAT_NQUADS, FORMAT_RDFXML, FORMAT_TURTLE]
PARALLELISM_OPTIONS = [PARALLELISM_LOW, PARALLELISM_MEDIUM, PARALLELISM_HIGH, PARALLELISM_OVERSUBSCRIBE]
LOADER_ACTION = 'loader'


Loading