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

Testing Jupytext Markdown Without Updating #908

Closed
saulshanabrook opened this issue Jan 26, 2022 · 3 comments · Fixed by #918
Closed

Testing Jupytext Markdown Without Updating #908

saulshanabrook opened this issue Jan 26, 2022 · 3 comments · Fixed by #918
Milestone

Comments

@saulshanabrook
Copy link

Hey! I was curious if it is possible to execute a notebook without updating it? I am trying to test execute some markdown jupytext documents, but I don't want it to save the changes. It was updating the jupytext_version and adding the kernel name to the code cells.

@mwouts
Copy link
Owner

mwouts commented Jan 26, 2022

Hey @saulshanabrook , thanks for the interesting question!

I guess you've not clicked on "Save" in Jupyter, right ?
So maybe what is happening is that you have the autosave activated in Jupyter.
In the documentation we have a few hints on how to deactivate the autosave in this Q&A.

Let me know if that helps (and if you think we should add this to the FAQ). Thanks!

@saulshanabrook
Copy link
Author

Hey @mwouts! I meant via the CLI, sorry, I wasn't clear here, like jupytext --execute notebook.md.

@mwouts
Copy link
Owner

mwouts commented Jan 27, 2022

Oh I see... Well I would have suggested then to use

cat notebook.md | jupytext --execute

but at the moment (jupytext==1.13.6) that does not work (I'll try to fix that with the next release, please leave this issue open).

Meanwhile you might want to use something like this?

cat test.md | jupytext --to ipynb | jupyter nbconvert --execute --stdin --to html --stdout

Also I'd like to double check with you what you want to achieve by executing the .md notebook - do I understand correctly that it is a standalone text notebook? Are you interested in the ipynb notebook with output cells or you just want the result of executing the notebook in e.g. files generated by the notebook?

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

Successfully merging a pull request may close this issue.

2 participants