Skip to content

Commit

Permalink
new launcher img
Browse files Browse the repository at this point in the history
  • Loading branch information
smacke committed Jan 6, 2024
1 parent 031caca commit d2e3122
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,18 @@ IPyflow ships with extensions that bring reactivity to JupyterLab and Notebook
[Pluto.jl](https://github.com/fonsp/Pluto.jl), and
[Marimo](https://github.com/marimo-team/marimo).

When you execute cell `C` with IPyflow, `C`'s output, the output of the cells
`C` depends on, and the output of the cells that depend on `C` all appear as
they would if the notebook were executed from top to bottom (e.g. via "restart
and run-all"). By persisting the cell dependency information to the notebook
metadata, this invariant is enforced even across restarts of the notebook.
IPyflow's reactivity behaves a little bit differently from the above, however,
as it was designed to meet the needs of Jupyter users in particular. When you
execute cell `C` with IPyflow, `C`'s output, the output of the cells `C`
depends on, and the output of the cells that depend on `C` all appear as they
would if the notebook were executed from top to bottom (e.g. via "restart and
run-all"). When you select some cell `C`, all the cells that would re-execute
when `C` is executed have an orange dot next to them, and cells that `C`
depends on but that are up-to-date and will not re-execute have purple dots:

The cell dependency information is persisted to the notebook metadata, so that
you can jump to any cell after starting a fresh kernel session, run it, and be
confident that the output is what was intended by the notebook author:


### Opting out of reactivity
Expand All @@ -91,13 +98,13 @@ nonreactive to reactive):

To reenable reactive execution as the default, you can run `%flow mode normal`.

If you'd like to prevent the dfeault reactive behavior for every new kernel
If you'd like to prevent the default reactive behavior for every new kernel
session, you can add this to your IPython profile (default location typically
at `~/.ipython/profile_default/ipython_config.py`):

```python
c = get_config()
c.ipyflow.exec_mode = "normal"
c.ipyflow.exec_mode = "normal" # defaults to "reactive"
```


Expand All @@ -109,20 +116,16 @@ orange color (similar to the color for dirty cells), and cells that
with a purple output just means that the output may be out-of-sync.) When using
reactive execution, you usually won't see these, since out-of-sync dependent
cells will be rerun automatically, though you may see them if using
ctrl+shift+enter to temporarily opt out of reactivity, or if some ancillary
cells to the one you executed end up referencing updated data:

<p align="center">
<img src="https://raw.githubusercontent.com/ipyflow/ipyflow/new-readme/img/suggestions.gif" />
</p>
ctrl+shift+enter to temporarily opt out of reactivity, or if you change which
data the cell updates (thereby overwriting previous edges between cells).

If you'd like to let IPyflow fix these up for you, you can press "Space" when
in command mode to automatically resolve all stale or dirty cells. This
operation may introduce more stale cells, in which case you can continue
pressing "Space" until all inconsistencies are resolved, if desired:

<p align="center">
<img src="https://raw.githubusercontent.com/ipyflow/ipyflow/new-readme/img/resolve-inconsistencies.gif" />
<img src="https://raw.githubusercontent.com/ipyflow/ipyflow/new-readme/img/resolve-inconsistencies.gif" width="450" />
</p>


Expand Down
Binary file modified img/ipyflow-launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d2e3122

Please sign in to comment.