Skip to content

Commit

Permalink
improve: always add marimo in sandbox
Browse files Browse the repository at this point in the history
Necessary so sandboxed notebooks can be run as scripts with uv run nb.py.
  • Loading branch information
akshayka committed Jan 14, 2025
1 parent b8a0442 commit cb81134
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions marimo/_runtime/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,12 @@ def _update_runtime_from_user_config(self, config: MarimoConfig) -> None:
):
self.package_manager = create_package_manager(package_manager)

if self._should_update_script_metadata():
# All marimo notebooks depend on the marimo package; if the
# notebook already has an optional dependency group with marimo,
# such as marimo[sql], this is a NOOP.
self._update_script_metadata(["marimo"])

if (
autoreload_mode == "lazy" or autoreload_mode == "autorun"
# Pyodide doesn't support hot module reloading
Expand Down

0 comments on commit cb81134

Please sign in to comment.