From d8b8360086fd696c471a7aa24458ff0605ea77ec Mon Sep 17 00:00:00 2001 From: dgelessus <dgelessus@users.noreply.github.com> Date: Thu, 28 Jun 2018 15:44:36 +0200 Subject: [PATCH] Stop displaying machine dependency graph when loading --- notebooks/tests/animate.ipynb | 14 +++++----- notebooks/tests/external_functions.ipynb | 26 +++++++++++++++---- notebooks/tests/load_cell.ipynb | 4 +-- notebooks/tests/load_file.ipynb | 4 +-- notebooks/tests/show.ipynb | 4 +-- .../jupyter/commands/LoadCellCommand.java | 2 +- .../jupyter/commands/LoadFileCommand.java | 2 +- 7 files changed, 36 insertions(+), 20 deletions(-) diff --git a/notebooks/tests/animate.ipynb b/notebooks/tests/animate.ipynb index 4c62bf7..0e242f6 100644 --- a/notebooks/tests/animate.ipynb +++ b/notebooks/tests/animate.ipynb @@ -179,7 +179,7 @@ { "data": { "text/plain": [ - "Loaded machine: Counter : []\n" + "Loaded machine: Counter" ] }, "execution_count": 6, @@ -384,11 +384,11 @@ "outputs": [ { "ename": "ProBError", - "evalue": "ProB reported Errors\nProB returned error messages:\nError: INITIALISATION FAILS (/Users/Shared/Uni/SHK/ProB2/prob2-jupyter-kernel/notebooks/tests:6:15 to 6:44)", + "evalue": "ProB reported Errors\nProB returned error messages:\nError: INITIALISATION FAILS (/Users/Shared/Uni/SHK/ProB2/prob2-jupyter-kernel/notebooks/tests/from_string.mch:6:15 to 6:44)", "output_type": "error", "traceback": [ "\u001b[1m\u001b[30mError from ProB: \u001b[0m\u001b[1m\u001b[31mProB reported Errors\u001b[0m", - "\u001b[1m\u001b[31mError: INITIALISATION FAILS (/Users/Shared/Uni/SHK/ProB2/prob2-jupyter-kernel/notebooks/tests:6:15 to 6:44)\u001b[0m" + "\u001b[1m\u001b[31mError: INITIALISATION FAILS (/Users/Shared/Uni/SHK/ProB2/prob2-jupyter-kernel/notebooks/tests/from_string.mch:6:15 to 6:44)\u001b[0m" ] } ], @@ -691,7 +691,7 @@ { "data": { "text/plain": [ - "Loaded machine: NoConstants : []\n" + "Loaded machine: NoConstants" ] }, "execution_count": 29, @@ -733,11 +733,11 @@ "outputs": [ { "ename": "ProBError", - "evalue": "ProB reported Errors\nProB returned error messages:\nError: INITIALISATION FAILS (/Users/Shared/Uni/SHK/ProB2/prob2-jupyter-kernel/notebooks/tests:4:15 to 4:26)", + "evalue": "ProB reported Errors\nProB returned error messages:\nError: INITIALISATION FAILS (/Users/Shared/Uni/SHK/ProB2/prob2-jupyter-kernel/notebooks/tests/from_string.mch:4:15 to 4:26)", "output_type": "error", "traceback": [ "\u001b[1m\u001b[30mError from ProB: \u001b[0m\u001b[1m\u001b[31mProB reported Errors\u001b[0m", - "\u001b[1m\u001b[31mError: INITIALISATION FAILS (/Users/Shared/Uni/SHK/ProB2/prob2-jupyter-kernel/notebooks/tests:4:15 to 4:26)\u001b[0m" + "\u001b[1m\u001b[31mError: INITIALISATION FAILS (/Users/Shared/Uni/SHK/ProB2/prob2-jupyter-kernel/notebooks/tests/from_string.mch:4:15 to 4:26)\u001b[0m" ] } ], @@ -760,7 +760,7 @@ { "data": { "text/plain": [ - "Loaded machine: Foo : []\n" + "Loaded machine: Foo" ] }, "execution_count": 32, diff --git a/notebooks/tests/external_functions.ipynb b/notebooks/tests/external_functions.ipynb index f2b1c01..5b57952 100644 --- a/notebooks/tests/external_functions.ipynb +++ b/notebooks/tests/external_functions.ipynb @@ -8,7 +8,7 @@ { "data": { "text/plain": [ - "Loaded machine: Jupyter : []\n" + "Loaded machine: Jupyter" ] }, "execution_count": 1, @@ -30,8 +30,11 @@ "outputs": [ { "data": { + "text/markdown": [ + "$\\text{\"1.8.1-beta5\"}$" + ], "text/plain": [ - "\"1.8.1-beta4\"" + "\"1.8.1-beta5\"" ] }, "execution_count": 2, @@ -50,6 +53,9 @@ "outputs": [ { "data": { + "text/markdown": [ + "$\\text{\"1.8.0_172-b11\"}$" + ], "text/plain": [ "\"1.8.0_172-b11\"" ] @@ -70,8 +76,11 @@ "outputs": [ { "data": { + "text/markdown": [ + "$\\text{\"6cab2e5307bb683bbd71b9482804663da21d9ba7\"}$" + ], "text/plain": [ - "\"c6264c505a07e8df7a9f0a7631c9d503c125bd8e\"" + "\"6cab2e5307bb683bbd71b9482804663da21d9ba7\"" ] }, "execution_count": 4, @@ -90,6 +99,9 @@ "outputs": [ { "data": { + "text/markdown": [ + "$1$" + ], "text/plain": [ "1" ] @@ -110,8 +122,11 @@ "outputs": [ { "data": { + "text/markdown": [ + "$150833600$" + ], "text/plain": [ - "150627280" + "150833600" ] }, "execution_count": 6, @@ -163,8 +178,9 @@ "name": "prob2" }, "language_info": { + "codemirror_mode": "prob2_jupyter_repl", "file_extension": ".prob", - "mimetype": "text/x-prob", + "mimetype": "text/x-prob2-jupyter-repl", "name": "prob" } }, diff --git a/notebooks/tests/load_cell.ipynb b/notebooks/tests/load_cell.ipynb index 6f2d327..26d949f 100644 --- a/notebooks/tests/load_cell.ipynb +++ b/notebooks/tests/load_cell.ipynb @@ -60,7 +60,7 @@ { "data": { "text/plain": [ - "Loaded machine: things : []\n" + "Loaded machine: things" ] }, "execution_count": 2, @@ -113,7 +113,7 @@ { "data": { "text/plain": [ - "Loaded machine: prefs : []\n" + "Loaded machine: prefs" ] }, "execution_count": 4, diff --git a/notebooks/tests/load_file.ipynb b/notebooks/tests/load_file.ipynb index 83549e1..1fdbfea 100644 --- a/notebooks/tests/load_file.ipynb +++ b/notebooks/tests/load_file.ipynb @@ -54,7 +54,7 @@ { "data": { "text/plain": [ - "Loaded machine: things : []\n" + "Loaded machine: things" ] }, "execution_count": 2, @@ -104,7 +104,7 @@ { "data": { "text/plain": [ - "Loaded machine: things : []\n" + "Loaded machine: things" ] }, "execution_count": 4, diff --git a/notebooks/tests/show.ipynb b/notebooks/tests/show.ipynb index 2c29599..75c21d1 100644 --- a/notebooks/tests/show.ipynb +++ b/notebooks/tests/show.ipynb @@ -43,7 +43,7 @@ { "data": { "text/plain": [ - "Loaded machine: Hanoi : []\n" + "Loaded machine: Hanoi" ] }, "execution_count": 2, @@ -409,7 +409,7 @@ { "data": { "text/plain": [ - "Loaded machine: CrosswordPuzzle : []\n" + "Loaded machine: CrosswordPuzzle" ] }, "execution_count": 14, diff --git a/src/main/java/de/prob2/jupyter/commands/LoadCellCommand.java b/src/main/java/de/prob2/jupyter/commands/LoadCellCommand.java index c9ceb7e..c59dd89 100644 --- a/src/main/java/de/prob2/jupyter/commands/LoadCellCommand.java +++ b/src/main/java/de/prob2/jupyter/commands/LoadCellCommand.java @@ -57,7 +57,7 @@ public final class LoadCellCommand implements Command { final Map<String, String> preferences = CommandUtils.parsePreferences(args); this.animationSelector.changeCurrentAnimation(new Trace(this.classicalBFactory.create(body).load(preferences))); - return new DisplayData("Loaded machine: " + this.animationSelector.getCurrentTrace().getModel()); + return new DisplayData("Loaded machine: " + this.animationSelector.getCurrentTrace().getStateSpace().getMainComponent()); } @Override diff --git a/src/main/java/de/prob2/jupyter/commands/LoadFileCommand.java b/src/main/java/de/prob2/jupyter/commands/LoadFileCommand.java index 6efaf70..2e2600d 100644 --- a/src/main/java/de/prob2/jupyter/commands/LoadFileCommand.java +++ b/src/main/java/de/prob2/jupyter/commands/LoadFileCommand.java @@ -73,7 +73,7 @@ public final class LoadFileCommand implements Command { } catch (IOException | ModelTranslationError e) { throw new RuntimeException(e); } - return new DisplayData("Loaded machine: " + this.animationSelector.getCurrentTrace().getModel()); + return new DisplayData("Loaded machine: " + this.animationSelector.getCurrentTrace().getStateSpace().getMainComponent()); } @Override -- GitLab