A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
fix: remove unexpected completed-run messages (#122)
Akshay Agrawal4d0b35a89232
diff --git a/frontend/src/core/RuntimeState.ts b/frontend/src/core/RuntimeState.tsindex 305b3ecb7b..8ad324f867 100644--- a/frontend/src/core/RuntimeState.ts+++ b/frontend/src/core/RuntimeState.ts@@ -49,7 +49,9 @@ export class RuntimeState {}registerRunEnd(): void {- this.runningCount -= 1;+ // Threshold runningCount to 0 for resiliency. Won't be needed once+ // we merge UI component updates in Python+ this.runningCount = Math.max(this.runningCount - 1, 0);}running(): boolean {diff --git a/marimo/_runtime/runtime.py b/marimo/_runtime/runtime.pyindex 6eb85057b6..46c4bf952f 100644--- a/marimo/_runtime/runtime.py+++ b/marimo/_runtime/runtime.py@@ -518,7 +518,6 @@ class Kernel:self.graph, cells_with_stale_state)LOGGER.debug("Finished run.")- write_completed_run()def _run_cells_internal(self, cell_ids: set[CellId_t]) -> set[CellId_t]:"""Run cells, send outputs to frontends@@ -870,7 +869,6 @@ class Kernel:if self.graph.cells:del requestLOGGER.debug("App already instantiated.")- write_completed_run()else:self.reset_ui_initializers()for (@@ -957,12 +955,15 @@ def launch_kernel(LOGGER.debug("received request %s", request)if isinstance(request, CreationRequest):kernel.instantiate(request)+ write_completed_run()elif isinstance(request, ExecuteMultipleRequest):kernel.run(request.execution_requests)+ write_completed_run()elif isinstance(request, SetCellConfigRequest):kernel.set_cell_config(request)elif isinstance(request, SetUIElementValueRequest):kernel.set_ui_element_value(request)+ write_completed_run()elif isinstance(request, DeleteRequest):kernel.delete(request)elif isinstance(request, CompletionRequest):diff --git a/marimo/_tutorials/intro.py b/marimo/_tutorials/intro.pyindex 73ce418792..18bb578877 100644--- a/marimo/_tutorials/intro.py+++ b/marimo/_tutorials/intro.py@@ -1,3 +1,4 @@+# Copyright 2023 Marimo. All rights reserved.import marimo__generated_with = "0.1.8"