Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Ability To Save Outputs in the source file #701

Open
jlewi opened this issue Nov 20, 2024 · 2 comments
Open

Feature Request: Ability To Save Outputs in the source file #701

jlewi opened this issue Nov 20, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@jlewi
Copy link
Contributor

jlewi commented Nov 20, 2024

It would be nice to have an option to save the output of the code cell in the source markdown. As a consequence of this, execution outputs would persist across kernel sessions.

Right now the auto-save feature saves output in a separate markdown document timestamped with a ULID extension.
https://docs.runme.dev/usage/auto-save

This makes sense when a markdown document is intended to be a reusable document (e.g. a README) that gets run multiple times.

Its much less useful when the goal is to use Runme to perform a set of operations and produce a log of all the commands that was run. For example, if I'm performing an operational task; e.g. "spin up a new AKS cluster" I want to produce a single file that is a record of everything that happened before. Right now with the auto-save feature this often gets spread across multiple output markdown files because a new file is created each time the session is restarted. In the course of performing a task I will often create multiple sessions (e.g. as a side effect of saving/closing the file).

The other problem in this case with storing the output of previous cells in a separate file is that the output provides important context for the cells that come after it. So if the outputs get saved in a separate file the document is no longer readable.

To work around this; I often find myself copying the output of code cells into a markdown cell to preserve the record in a readable way.

@sourishkrout sourishkrout self-assigned this Nov 20, 2024
@sourishkrout sourishkrout added the enhancement New feature or request label Nov 20, 2024
@sourishkrout
Copy link
Member

Makes sense. One question, @jlewi, when you run a single cell multiple times, would you expect the only latest output to be preserved or all of the previous runs to be preserved?

I'm getting the sense that in this mode, the notebook should work a lot like a like a terminal session.

@jlewi
Copy link
Contributor Author

jlewi commented Nov 20, 2024

That's exactly right. My current thinking is that if i don't want to overwrite I create a new cell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants