Skip to content

Commit

Permalink
Merge pull request #91 from janpfeifer/plotly
Browse files Browse the repository at this point in the history
Added support for Plotly
  • Loading branch information
janpfeifer authored Feb 18, 2024
2 parents 73aec64 + 5acc2a3 commit 008799c
Show file tree
Hide file tree
Showing 21 changed files with 398 additions and 158 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ RUN apt-get install --yes --no-install-recommends git
#######################################################################################################
# Go and GoNB Libraries
#######################################################################################################
ENV GO_VERSION=1.21.6
ENV GONB_VERSION="v0.9.5"
ENV GO_VERSION=1.22
ENV GONB_VERSION="v0.9.6"
ENV GOROOT=/usr/local/go
ENV GOPATH=/opt/go
ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin
Expand Down
6 changes: 4 additions & 2 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# GoNB Changelog

## Next
## 0.9.6, 2024/02/18

* Fixed some typos in klog formatting.
* Updated dependencies.
* Updated gopls dependencies: new jsonrpc2 API.
* Added `LoadScriptModuleAndRun`.
* Added [Plotly Javascript](https://plotly.com/javascript/) support, in `gonbui.plotly` package. Also added example in tutorial.

## 0.9.5, 2023/01/10
## 0.9.5, 2024/01/10

* Added instrumentation to Jupyter input boxes in `nbexec`.
* Added functional tests for input boxes created with `%with_inputs`, `%with_password` or `gonbui.RequestInput`.
Expand Down
9 changes: 5 additions & 4 deletions docs/coverage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ github.com/janpfeifer/gonb/gonbui/gonbui.go DisplayImage 0.0%
github.com/janpfeifer/gonb/gonbui/gonbui.go DisplaySvg 0.0%
github.com/janpfeifer/gonb/gonbui/gonbui.go DisplaySVG 0.0%
github.com/janpfeifer/gonb/gonbui/gonbui.go RequestInput 75.0%
github.com/janpfeifer/gonb/gonbui/gonbui.go ScriptJavascript 0.0%
github.com/janpfeifer/gonb/gonbui/gonbui.go EmbedImageAsPNGSrc 0.0%
github.com/janpfeifer/gonb/gonbui/javascript.go ScriptJavascript 0.0%
github.com/janpfeifer/gonb/gonbui/javascript.go LoadScriptModuleAndRun 0.0%
github.com/janpfeifer/gonb/gonbui/comms/comms.go init 100.0%
github.com/janpfeifer/gonb/gonbui/comms/comms.go Start 0.0%
github.com/janpfeifer/gonb/gonbui/comms/comms.go Send 100.0%
Expand Down Expand Up @@ -158,7 +159,7 @@ github.com/janpfeifer/gonb/internal/comms/namedpipes.go *State.ProgramSubscrib
github.com/janpfeifer/gonb/internal/comms/namedpipes.go *State.ProgramUnsubscribeRequest 57.1%
github.com/janpfeifer/gonb/internal/comms/namedpipes.go *State.deliverProgramSubscriptionsLocked 62.5%
github.com/janpfeifer/gonb/internal/dispatcher/comms.go handleComms 55.6%
github.com/janpfeifer/gonb/internal/dispatcher/dispatcher.go RunKernel 77.1%
github.com/janpfeifer/gonb/internal/dispatcher/dispatcher.go RunKernel 80.0%
github.com/janpfeifer/gonb/internal/dispatcher/dispatcher.go handleShellMsg 71.0%
github.com/janpfeifer/gonb/internal/dispatcher/dispatcher.go handleBusyMessage 47.8%
github.com/janpfeifer/gonb/internal/dispatcher/dispatcher.go handleShutdownRequest 83.3%
Expand Down Expand Up @@ -253,7 +254,7 @@ github.com/janpfeifer/gonb/internal/goexec/parser.go *State.SetCellTests 10
github.com/janpfeifer/gonb/internal/goexec/parser.go *State.DefaultCellTestArgs 100.0%
github.com/janpfeifer/gonb/internal/goexec/tracking.go newTrackingInfo 100.0%
github.com/janpfeifer/gonb/internal/goexec/tracking.go *State.Track 100.0%
github.com/janpfeifer/gonb/internal/goexec/tracking.go *State.lockedTrack 54.8%
github.com/janpfeifer/gonb/internal/goexec/tracking.go *State.lockedTrack 69.4%
github.com/janpfeifer/gonb/internal/goexec/tracking.go *State.Untrack 85.7%
github.com/janpfeifer/gonb/internal/goexec/tracking.go *State.lockedUntrackEntry 66.7%
github.com/janpfeifer/gonb/internal/goexec/tracking.go *State.ListTracked 80.0%
Expand Down Expand Up @@ -396,4 +397,4 @@ github.com/janpfeifer/gonb/internal/specialcmd/track.go execTrack 27.3%
github.com/janpfeifer/gonb/internal/specialcmd/track.go execUntrack 54.5%
github.com/janpfeifer/gonb/internal/specialcmd/track.go showTrackedList 91.7%
github.com/janpfeifer/gonb/internal/websocket/websocket.go Javascript 83.3%
total (statements) 64.1%
total (statements) 64.2%
6 changes: 3 additions & 3 deletions examples/tests/bash_script.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"/tmp/gonb_2f6c813c\n"
"/tmp/gonb_9dda40ab\n"
]
}
],
Expand All @@ -59,7 +59,7 @@
"output_type": "stream",
"text": [
"/home/janpf/Projects/gonb/examples/tests\n",
"/tmp/gonb_2f6c813c\n",
"/tmp/gonb_9dda40ab\n",
"/home/janpf/Projects/gonb\n",
"/home/janpf/Projects/gonb\n"
]
Expand All @@ -86,7 +86,7 @@
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
"version": "go1.21.6"
"version": "go1.22.0"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion examples/tests/comms.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
"version": "go1.21.6"
"version": "go1.22.0"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions examples/tests/dom.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
{
"data": {
"text/html": [
"<div id=\"dom.transient_div_daab7823\"></div>"
"<div id=\"dom.transient_div_86d0ec90\"></div>"
]
},
"metadata": {},
Expand Down Expand Up @@ -152,7 +152,7 @@
{
"data": {
"text/html": [
"<div id=\"dom.transient_div_e607ce12\"></div>"
"<div id=\"dom.transient_div_9113427e\"></div>"
]
},
"metadata": {},
Expand Down Expand Up @@ -197,7 +197,7 @@
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
"version": "go1.21.6"
"version": "go1.22.0"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion examples/tests/functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
"version": "go1.21.6"
"version": "go1.22.0"
}
},
"nbformat": 4,
Expand Down
12 changes: 6 additions & 6 deletions examples/tests/goflags.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"gonb_020f1df5/main.go:8:\tA\t\t100.0%\n",
"gonb_020f1df5/main.go:12:\tB\t\t0.0%\n",
"gonb_020f1df5/main.go:17:\tmain\t\t100.0%\n",
"gonb_bc1385f7/main.go:8:\tA\t\t100.0%\n",
"gonb_bc1385f7/main.go:12:\tB\t\t0.0%\n",
"gonb_bc1385f7/main.go:17:\tmain\t\t100.0%\n",
"total\t\t\t\t(statements)\t75.0%\n"
]
}
Expand Down Expand Up @@ -238,14 +238,14 @@
"name": "stderr",
"output_type": "stream",
"text": [
"# gonb_020f1df5\n",
"# gonb_bc1385f7\n",
"./main.go:10:6: can inline (*Point).ManhattanLen\n",
"./main.go:16:12: inlining call to flag.Parse\n",
"./main.go:18:28: inlining call to (*Point).ManhattanLen\n",
"./main.go:18:13: inlining call to fmt.Println\n",
"./main.go:10:7: p does not escape\n",
"./main.go:18:13: ... argument does not escape\n",
"./main.go:18:28: ~R0 escapes to heap\n"
"./main.go:18:28: ~r0 escapes to heap\n"
]
}
],
Expand All @@ -267,7 +267,7 @@
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
"version": "go1.21.6"
"version": "go1.22.0"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions examples/tests/gonbui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"output_type": "stream",
"text": [
"%goflags=[\"--cover\" \"--covermode=set\"]\n",
"GOCOVERDIR=/tmp/gonb_test_coverage.4btcckxYms\n"
"GOCOVERDIR=/tmp/gonb_test_coverage.4mPvyGK2OJ\n"
]
}
],
Expand Down Expand Up @@ -133,7 +133,7 @@
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
"version": "go1.21.6"
"version": "go1.22.0"
}
},
"nbformat": 4,
Expand Down
18 changes: 9 additions & 9 deletions examples/tests/gotest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,12 @@
"text": [
"goos: linux\n",
"goarch: amd64\n",
"pkg: gonb_ce0aec45\n",
"cpu: 12th Gen Intel(R) Core(TM) i9-12900K\n",
"pkg: gonb_36f3efc5\n",
"cpu: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz\n",
"BenchmarkFibonacciA32\n",
"BenchmarkFibonacciA32-24 \t 157\t 7665168 ns/op\n",
"BenchmarkFibonacciA32-8 \t 50\t 22759741 ns/op\n",
"BenchmarkFibonacciB32\n",
"BenchmarkFibonacciB32-24 \t298868374\t 3.914 ns/op\n",
"BenchmarkFibonacciB32-8 \t28774705\t 39.85 ns/op\n",
"PASS\n",
"coverage: [no statements]\n"
]
Expand Down Expand Up @@ -334,10 +334,10 @@
"text": [
"goos: linux\n",
"goarch: amd64\n",
"pkg: gonb_ce0aec45\n",
"cpu: 12th Gen Intel(R) Core(TM) i9-12900K\n",
"BenchmarkFibonacciA32-24 \t 156\t 7601541 ns/op\n",
"BenchmarkFibonacciB32-24 \t302442891\t 3.894 ns/op\n",
"pkg: gonb_36f3efc5\n",
"cpu: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz\n",
"BenchmarkFibonacciA32-8 \t 52\t 22831751 ns/op\n",
"BenchmarkFibonacciB32-8 \t31159093\t 40.49 ns/op\n",
"PASS\n",
"coverage: [no statements]\n"
]
Expand All @@ -361,7 +361,7 @@
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
"version": "go1.21.6"
"version": "go1.22.0"
}
},
"nbformat": 4,
Expand Down
18 changes: 9 additions & 9 deletions examples/tests/gowork.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"/tmp/gonb_tests_gowork_6mPoRnnx"
"/tmp/gonb_tests_gowork_0srvuOWg"
]
}
],
Expand Down Expand Up @@ -64,7 +64,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Temporary test package: /tmp/gonb_tests_gowork_6mPoRnnx\n"
"Temporary test package: /tmp/gonb_tests_gowork_0srvuOWg\n"
]
}
],
Expand Down Expand Up @@ -136,7 +136,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\t- Added replace rule for module \"a.com/a/pkg\" to local directory \"/tmp/gonb_tests_gowork_6mPoRnnx\".\n"
"\t- Added replace rule for module \"a.com/a/pkg\" to local directory \"/tmp/gonb_tests_gowork_0srvuOWg\".\n"
]
}
],
Expand All @@ -155,9 +155,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"module gonb_19fe2324\n",
"module gonb_5cff895d\n",
"\n",
"go 1.21.6\n",
"go 1.22.0\n",
"\n",
"replace a.com/a/pkg => TMP_PKG\n"
]
Expand Down Expand Up @@ -186,7 +186,7 @@
"text/html": [
"<b>List of files/directories being tracked:</b>\n",
"<ul>\n",
"<li>/tmp/gonb_tests_gowork_6mPoRnnx</li>\n",
"<li>/tmp/gonb_tests_gowork_0srvuOWg</li>\n",
"</ul>\n"
]
},
Expand All @@ -208,9 +208,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"module gonb_19fe2324\n",
"module gonb_5cff895d\n",
"\n",
"go 1.21.6\n"
"go 1.22.0\n"
]
}
],
Expand Down Expand Up @@ -280,7 +280,7 @@
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
"version": "go1.21.6"
"version": "go1.22.0"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion examples/tests/hello.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
"version": "go1.21.6"
"version": "go1.22.0"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion examples/tests/init.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
"version": "go1.21.6"
"version": "go1.22.0"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions examples/tests/input_boxes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"output_type": "stream",
"text": [
"%goflags=[\"--cover\" \"--covermode=set\"]\n",
"GOCOVERDIR=/tmp/gonb_test_coverage.4btcckxYms\n"
"GOCOVERDIR=/tmp/gonb_test_coverage.4mPvyGK2OJ\n"
]
}
],
Expand Down Expand Up @@ -196,7 +196,7 @@
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
"version": "go1.21.6"
"version": "go1.22.0"
}
},
"nbformat": 4,
Expand Down
8 changes: 4 additions & 4 deletions examples/tests/widgets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
{
"data": {
"text/html": [
"<div id=\"dom.transient_div_d906e85f\"></div>"
"<div id=\"dom.transient_div_7a011154\"></div>"
]
},
"metadata": {},
Expand Down Expand Up @@ -189,7 +189,7 @@
{
"data": {
"text/html": [
"<div id=\"dom.transient_div_25dd0c8e\"></div>"
"<div id=\"dom.transient_div_c8e4fb59\"></div>"
]
},
"metadata": {},
Expand Down Expand Up @@ -304,7 +304,7 @@
{
"data": {
"text/html": [
"<div id=\"dom.transient_div_71edbbb5\"></div>"
"<div id=\"dom.transient_div_6885693d\"></div>"
]
},
"metadata": {},
Expand Down Expand Up @@ -416,7 +416,7 @@
"name": "go",
"nbconvert_exporter": "",
"pygments_lexer": "",
"version": "go1.21.6"
"version": "go1.22.0"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 008799c

Please sign in to comment.