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

Different notebook cells to different script files #454

Closed
kikejimenez opened this issue Mar 13, 2020 · 3 comments
Closed

Different notebook cells to different script files #454

kikejimenez opened this issue Mar 13, 2020 · 3 comments

Comments

@kikejimenez
Copy link

Is it possible to go from various script files to one notebook file and vice-versa?
The purpose is to run sequentially those scripts on the notebook and sync their updating.
From the documentation, it is unclear to me if this is possible

@mwouts
Copy link
Owner

mwouts commented Mar 14, 2020

Hello @kikejimenez , well no sorry, this is not possible. Jupytext always converts, or pair, a single notebook, to a single text file.

Of course, if you'd like to concatenate the multiple scripts yourself, then Jupytext can easily turn the concatenated script into a notebook, but I don't think this is was you are looking for, right?

Also, have you seen the %load magic command? In a notebook, it creates a cell with the content taken from the script in argument.

@kikejimenez
Copy link
Author

Thanks for your reply @mwouts, I'll take a look at your suggestions and work for some intermediate solution that takes:
many scripts --> one script --> notebook (and vice-versa)
Again, many thanks!

@mwouts
Copy link
Owner

mwouts commented Mar 18, 2020

You're welcome! And please keep us posted!

By the way

  1. I've seen a (non-Jupyter) notebook system in which the cell content is stored in scripts: cf. the dotnet/try iteractive Markdown files, used by Microsoft for C# and F# notebooks (these are not supported by Jupytext at the moment, see Open dotnet/try Markdown files as notebooks in Jupyter #438)
  2. And, maybe your question is related to child documents. We have been working recently on a new Markdown format that includes some Sphinx directives A book publishing project interested in extending jupytext code  #447, maybe this new format will soon offer the possibility to have child document? (cc @chrisjsewell)

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

No branches or pull requests

2 participants