diff --git a/docs/coverage.txt b/docs/coverage.txt index c5a5e8c..32ff6d5 100644 --- a/docs/coverage.txt +++ b/docs/coverage.txt @@ -6,10 +6,12 @@ github.com/janpfeifer/gonb/main.go UniqueIDFilter.Filter 100.0% github.com/janpfeifer/gonb/main.go UniqueIDFilter.FilterF 100.0% github.com/janpfeifer/gonb/main.go UniqueIDFilter.FilterS 0.0% github.com/janpfeifer/gonb/main.go SetUpKlog 66.7% +github.com/janpfeifer/gonb/version.go must 50.0% +github.com/janpfeifer/gonb/version.go init 100.0% github.com/janpfeifer/gonb/cache/cache.go New 75.0% github.com/janpfeifer/gonb/cache/cache.go AssertNoError 50.0% github.com/janpfeifer/gonb/cache/cache.go MustNew 100.0% -github.com/janpfeifer/gonb/cache/cache.go NewInTmp 68.2% +github.com/janpfeifer/gonb/cache/cache.go NewInTmp 72.7% github.com/janpfeifer/gonb/cache/cache.go MustNewInTmp 100.0% github.com/janpfeifer/gonb/cache/cache.go NewHidden 80.0% github.com/janpfeifer/gonb/cache/cache.go MustNewHidden 100.0% @@ -147,8 +149,8 @@ github.com/janpfeifer/gonb/internal/comms/comms.go New 100.0% github.com/janpfeifer/gonb/internal/comms/comms.go getFromJson 62.5% github.com/janpfeifer/gonb/internal/comms/comms.go *State.InstallWebSocket 100.0% github.com/janpfeifer/gonb/internal/comms/comms.go *State.installWebSocketLocked 79.5% -github.com/janpfeifer/gonb/internal/comms/comms.go *State.HandleOpen 64.4% -github.com/janpfeifer/gonb/internal/comms/comms.go *State.HandleMsg 63.6% +github.com/janpfeifer/gonb/internal/comms/comms.go *State.HandleOpen 68.9% +github.com/janpfeifer/gonb/internal/comms/comms.go *State.HandleMsg 69.7% github.com/janpfeifer/gonb/internal/comms/comms.go *State.Close 100.0% github.com/janpfeifer/gonb/internal/comms/comms.go *State.closeLocked 100.0% github.com/janpfeifer/gonb/internal/comms/comms.go *State.Send 100.0% @@ -165,7 +167,7 @@ github.com/janpfeifer/gonb/internal/comms/namedpipes.go *State.ProgramReadValu github.com/janpfeifer/gonb/internal/comms/namedpipes.go *State.ProgramSubscribeRequest 54.5% 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/comms.go handleComms 66.7% github.com/janpfeifer/gonb/internal/dispatcher/dispatcher.go RunKernel 80.0% github.com/janpfeifer/gonb/internal/dispatcher/dispatcher.go handleShellMsg 78.4% github.com/janpfeifer/gonb/internal/dispatcher/dispatcher.go handleBusyMessage 47.8% @@ -183,7 +185,8 @@ github.com/janpfeifer/gonb/internal/goexec/composer.go *WriterWithCursor.Write github.com/janpfeifer/gonb/internal/goexec/composer.go *WriterWithCursor.Write 76.9% github.com/janpfeifer/gonb/internal/goexec/composer.go *Declarations.RenderImports 100.0% github.com/janpfeifer/gonb/internal/goexec/composer.go *Declarations.RenderVariables 91.2% -github.com/janpfeifer/gonb/internal/goexec/composer.go *Declarations.RenderFunctions 100.0% +github.com/janpfeifer/gonb/internal/goexec/composer.go *Declarations.RenderFunctions 94.1% +github.com/janpfeifer/gonb/internal/goexec/composer.go *Comments.Render 90.0% github.com/janpfeifer/gonb/internal/goexec/composer.go *Declarations.RenderTypes 100.0% github.com/janpfeifer/gonb/internal/goexec/composer.go *Declarations.RenderConstants 100.0% github.com/janpfeifer/gonb/internal/goexec/composer.go *Constant.Render 100.0% @@ -202,7 +205,7 @@ github.com/janpfeifer/gonb/internal/goexec/execcode.go *State.executeCellImpl github.com/janpfeifer/gonb/internal/goexec/execcode.go *State.PostExecuteCell 85.7% github.com/janpfeifer/gonb/internal/goexec/execcode.go *State.BinaryPath 100.0% github.com/janpfeifer/gonb/internal/goexec/execcode.go *State.CodePath 100.0% -github.com/janpfeifer/gonb/internal/goexec/execcode.go *State.RemoveCode 83.3% +github.com/janpfeifer/gonb/internal/goexec/execcode.go *State.RemoveGeneratedCode 83.3% github.com/janpfeifer/gonb/internal/goexec/execcode.go *State.AlternativeDefinitionsPath 0.0% github.com/janpfeifer/gonb/internal/goexec/execcode.go *State.Execute 85.7% github.com/janpfeifer/gonb/internal/goexec/execcode.go *State.Compile 70.0% @@ -247,10 +250,11 @@ github.com/janpfeifer/gonb/internal/goexec/inspect.go adjustCursorForFunctionI github.com/janpfeifer/gonb/internal/goexec/parser.go *parseInfo.getCursor 100.0% github.com/janpfeifer/gonb/internal/goexec/parser.go *parseInfo.calculateCellLines 100.0% github.com/janpfeifer/gonb/internal/goexec/parser.go *parseInfo.extractContentOfNode 83.3% -github.com/janpfeifer/gonb/internal/goexec/parser.go *State.parseFromGoCode 79.1% +github.com/janpfeifer/gonb/internal/goexec/parser.go *State.parseFromGoCode 77.3% github.com/janpfeifer/gonb/internal/goexec/parser.go NewImport 88.9% github.com/janpfeifer/gonb/internal/goexec/parser.go *parseInfo.ParseImportEntry 100.0% github.com/janpfeifer/gonb/internal/goexec/parser.go *parseInfo.ParseFuncEntry 100.0% +github.com/janpfeifer/gonb/internal/goexec/parser.go *parseInfo.ParseComments 100.0% github.com/janpfeifer/gonb/internal/goexec/parser.go *parseInfo.ParseVarEntry 84.6% github.com/janpfeifer/gonb/internal/goexec/parser.go *parseInfo.ParseConstEntry 100.0% github.com/janpfeifer/gonb/internal/goexec/parser.go *parseInfo.ParseTypeEntry 100.0% @@ -411,11 +415,11 @@ github.com/janpfeifer/gonb/internal/specialcmd/definitions.go removeDefinitionI github.com/janpfeifer/gonb/internal/specialcmd/definitions.go removeDefinitions 91.7% github.com/janpfeifer/gonb/internal/specialcmd/specialcmd.go Parse 84.6% github.com/janpfeifer/gonb/internal/specialcmd/specialcmd.go joinLine 87.5% -github.com/janpfeifer/gonb/internal/specialcmd/specialcmd.go execSpecialConfig 58.2% +github.com/janpfeifer/gonb/internal/specialcmd/specialcmd.go execSpecialConfig 55.1% github.com/janpfeifer/gonb/internal/specialcmd/specialcmd.go execShell 100.0% github.com/janpfeifer/gonb/internal/specialcmd/specialcmd.go splitCmd 97.0% 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.6% +total (statements) 64.8% diff --git a/examples/tests/bash_script.ipynb b/examples/tests/bash_script.ipynb index c566335..90a61ee 100644 --- a/examples/tests/bash_script.ipynb +++ b/examples/tests/bash_script.ipynb @@ -34,7 +34,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "/tmp/gonb_d300f5a2\n" + "/tmp/gonb_8e54badc\n" ] } ], @@ -59,7 +59,7 @@ "output_type": "stream", "text": [ "/home/janpf/Projects/gonb/examples/tests\n", - "/tmp/gonb_d300f5a2\n", + "/tmp/gonb_8e54badc\n", "/home/janpf/Projects/gonb\n", "/home/janpf/Projects/gonb\n" ] diff --git a/examples/tests/dom.ipynb b/examples/tests/dom.ipynb index a30c750..775e8da 100644 --- a/examples/tests/dom.ipynb +++ b/examples/tests/dom.ipynb @@ -88,7 +88,7 @@ { "data": { "text/html": [ - "
" + "
" ] }, "metadata": {}, @@ -152,7 +152,7 @@ { "data": { "text/html": [ - "
" + "
" ] }, "metadata": {}, diff --git a/examples/tests/goflags.ipynb b/examples/tests/goflags.ipynb index 78b36b5..62efddf 100644 --- a/examples/tests/goflags.ipynb +++ b/examples/tests/goflags.ipynb @@ -153,9 +153,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "gonb_ae2bcb52/main.go:8:\tA\t\t100.0%\n", - "gonb_ae2bcb52/main.go:12:\tB\t\t0.0%\n", - "gonb_ae2bcb52/main.go:17:\tmain\t\t100.0%\n", + "gonb_a636feef/main.go:8:\tA\t\t100.0%\n", + "gonb_a636feef/main.go:12:\tB\t\t0.0%\n", + "gonb_a636feef/main.go:17:\tmain\t\t100.0%\n", "total\t\t\t\t(statements)\t75.0%\n" ] } @@ -238,7 +238,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "# gonb_ae2bcb52\n", + "# gonb_a636feef\n", "./main.go:10:6: can inline (*Point).ManhattanLen\n", "./main.go:16:12: inlining call to flag.Parse\n", "./main.go:18:27: inlining call to (*Point).ManhattanLen\n", diff --git a/examples/tests/gonbui.ipynb b/examples/tests/gonbui.ipynb index c830f2a..fd1157a 100644 --- a/examples/tests/gonbui.ipynb +++ b/examples/tests/gonbui.ipynb @@ -22,7 +22,7 @@ "output_type": "stream", "text": [ "%goflags=[\"--cover\" \"--covermode=set\"]\n", - "GOCOVERDIR=/tmp/gonb_nbtests_gocoverdir_4129479306\n" + "GOCOVERDIR=/tmp/gonb_test_coverage.KXrPgksOg4\n" ] } ], diff --git a/examples/tests/gotest.ipynb b/examples/tests/gotest.ipynb index 681d879..bc893c6 100644 --- a/examples/tests/gotest.ipynb +++ b/examples/tests/gotest.ipynb @@ -287,12 +287,12 @@ "text": [ "goos: linux\n", "goarch: amd64\n", - "pkg: gonb_74e427f6\n", + "pkg: gonb_348f5fd7\n", "cpu: 12th Gen Intel(R) Core(TM) i9-12900K\n", "BenchmarkFibonacciA32\n", - "BenchmarkFibonacciA32-24 \t 178\t 6602828 ns/op\n", + "BenchmarkFibonacciA32-24 \t 181\t 6584232 ns/op\n", "BenchmarkFibonacciB32\n", - "BenchmarkFibonacciB32-24 \t298555876\t 4.021 ns/op\n", + "BenchmarkFibonacciB32-24 \t301803614\t 3.994 ns/op\n", "PASS\n", "coverage: [no statements]\n" ] @@ -334,10 +334,10 @@ "text": [ "goos: linux\n", "goarch: amd64\n", - "pkg: gonb_74e427f6\n", + "pkg: gonb_348f5fd7\n", "cpu: 12th Gen Intel(R) Core(TM) i9-12900K\n", - "BenchmarkFibonacciA32-24 \t 180\t 6574007 ns/op\n", - "BenchmarkFibonacciB32-24 \t308328156\t 3.930 ns/op\n", + "BenchmarkFibonacciA32-24 \t 177\t 6570735 ns/op\n", + "BenchmarkFibonacciB32-24 \t341224015\t 3.960 ns/op\n", "PASS\n", "coverage: [no statements]\n" ] diff --git a/examples/tests/gowork.ipynb b/examples/tests/gowork.ipynb index bf3ea23..c419406 100644 --- a/examples/tests/gowork.ipynb +++ b/examples/tests/gowork.ipynb @@ -36,7 +36,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "/tmp/gonb_tests_gowork_173uIYjd" + "/tmp/gonb_tests_gowork_k5qMEYlN" ] } ], @@ -64,7 +64,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Temporary test package: /tmp/gonb_tests_gowork_173uIYjd\n" + "Temporary test package: /tmp/gonb_tests_gowork_k5qMEYlN\n" ] } ], @@ -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_173uIYjd\".\n" + "\t- Added replace rule for module \"a.com/a/pkg\" to local directory \"/tmp/gonb_tests_gowork_k5qMEYlN\".\n" ] } ], @@ -155,7 +155,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "module gonb_b978d03f\n", + "module gonb_c5afeb93\n", "\n", "go 1.23.5\n", "\n", @@ -186,7 +186,7 @@ "text/html": [ "List of files/directories being tracked:\n", "\n" ] }, @@ -208,7 +208,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "module gonb_b978d03f\n", + "module gonb_c5afeb93\n", "\n", "go 1.23.5\n" ] diff --git a/examples/tests/input_boxes.ipynb b/examples/tests/input_boxes.ipynb index 24c98a3..c5840b1 100644 --- a/examples/tests/input_boxes.ipynb +++ b/examples/tests/input_boxes.ipynb @@ -22,7 +22,7 @@ "output_type": "stream", "text": [ "%goflags=[\"--cover\" \"--covermode=set\"]\n", - "GOCOVERDIR=/tmp/gonb_nbtests_gocoverdir_4129479306\n" + "GOCOVERDIR=/tmp/gonb_test_coverage.KXrPgksOg4\n" ] } ], diff --git a/examples/tests/vartuple.ipynb b/examples/tests/vartuple.ipynb index 0bd084f..4b48c9e 100644 --- a/examples/tests/vartuple.ipynb +++ b/examples/tests/vartuple.ipynb @@ -45,7 +45,7 @@ "text/html": [ "

Variables

\n", "" diff --git a/examples/tests/widgets.ipynb b/examples/tests/widgets.ipynb index 74beb85..345a788 100644 --- a/examples/tests/widgets.ipynb +++ b/examples/tests/widgets.ipynb @@ -95,7 +95,7 @@ { "data": { "text/html": [ - "
" + "
" ] }, "metadata": {}, @@ -189,7 +189,7 @@ { "data": { "text/html": [ - "
" + "
" ] }, "metadata": {}, @@ -304,7 +304,7 @@ { "data": { "text/html": [ - "
" + "
" ] }, "metadata": {}, diff --git a/examples/tests/writefile.ipynb b/examples/tests/writefile.ipynb index f3a3cb1..bf6d5cf 100644 --- a/examples/tests/writefile.ipynb +++ b/examples/tests/writefile.ipynb @@ -10,7 +10,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "Cell contents written to \"/tmp/gonb_nbtests_writefile_2206415683/poetry.txt\".\n" + "Cell contents written to \"/tmp/gonb_nbtests_writefile_42543885/poetry.txt\".\n" ] } ], @@ -32,7 +32,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "Cell contents appended to \"/tmp/gonb_nbtests_writefile_2206415683/poetry.txt\".\n" + "Cell contents appended to \"/tmp/gonb_nbtests_writefile_42543885/poetry.txt\".\n" ] } ],