-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #3114 Closes #2675 Closes #1511 This adds support for `marimo edit --watch`. You can do ```python marimo edit --watch # will watch notebooks as they are opened # or marimo edit nb.py --watch # will watch just this notebook ``` This doesn't support a few edge case: - handle renaming files - handle naming files (for first time)
- Loading branch information
Showing
19 changed files
with
758 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Watching notebooks | ||
|
||
marimo's `--watch` flag enables a file watcher that automatically sync your | ||
notebook file with the marimo editor or running application. | ||
|
||
This allows you to edit your notebook file in the editor of your choice, and | ||
have the changes automatically reflected in the running editor or application. | ||
|
||
!!! tip "Install watchdog for better file watching" | ||
For better file watching performance, install watchdog with `pip install watchdog`. Without watchdog, marimo will poll for file changes which is less efficient. | ||
|
||
## `marimo run --watch` | ||
|
||
When you run a notebook with the `--watch` flag, whenever the file watcher | ||
detects a change to the notebook file, the application will be refreshed. | ||
The browser will trigger a page refresh to ensure your notebook starts from a fresh state. | ||
|
||
## `marimo watch --watch` | ||
|
||
When you edit a notebook file with the `--watch` flag, whenever the file watcher | ||
detects a change to the notebook file, the new cells and code changes will be streamed to | ||
the browser editor. | ||
|
||
This code will not be executed until you run the cell, and instead marked as stale. | ||
|
||
## Watching for data changes | ||
|
||
!!! note | ||
Support for watching data files and automatically refreshing cells that depend on them is coming soon. Follow along at <https://github.com/marimo-team/marimo/issues/3258> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.