first stab at mkdocs migration
refactor CSCS and Meg content add merlin6 quick start update merlin6 nomachine docs give the userdoc its own color scheme we use the Materials default one refactored slurm general docs merlin6 add merlin6 JB docs add software support m6 docs add all files to nav vibed changes #1 add missing pages further vibing #2 vibe #3 further fixes
This commit is contained in:
52
docs/merlin6/jupyterhub/jupytext.md
Normal file
52
docs/merlin6/jupyterhub/jupytext.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# Jupytext - efficient editing
|
||||
|
||||
[Jupytext](https://github.com/mwouts/jupytext) is a Jupyter serverextension
|
||||
that allows creating a text file from a notebook that can be kept in sync with
|
||||
it **with the aim of using more efficient editors or IDEs on it**. The file can
|
||||
be created in a number of formats, e.g. *markdown, *.py (light Script)*, and
|
||||
others. `Jupytext` will keep the both the notebook and this **paired** file in
|
||||
sync: If you save the paired file, changes will be carried over into the
|
||||
notebook, and vice versa. This pairing will persist also in new sessions of
|
||||
your notebook until you explicitely remove it again.
|
||||
|
||||
The paired file contains only the cell contents and not the output. Therefore
|
||||
it also is **much better suited for revision control**, since the differences
|
||||
between versions are limited to the cells and these file formats yield more
|
||||
meaningful text differences than the default notebook storage format.
|
||||
|
||||
## Creating a paired file in python format for efficient refactoring
|
||||
|
||||
From your notebook, go to the `file` menu and navigate to the `jupytext`
|
||||
submenu. Select the **light script** pairing option. This will create a `*.py`
|
||||
file version with the same basename as your notebook file.
|
||||
|
||||

|
||||
/// caption
|
||||
///
|
||||
|
||||
You can edit that file separately in your favourite python editor. The markdown
|
||||
text parts will be conserved in the file in the form of python comments.
|
||||
|
||||
When you save the file and do a browser page reload of your jupyter notebook,
|
||||
you will see all the changes carried over into your jupyter notebook.
|
||||
|
||||
## Creating a paired file in mardown format for efficient text authoring
|
||||
|
||||
If you want to efficiently work on the descriptive text base of your notebook,
|
||||
just pair it using the `Pair notebook with Markdown` menu item and edit the
|
||||
generated `*.md` file with your favourite Markdown editor.
|
||||
|
||||
## Disable autosaving when working on the paired file
|
||||
|
||||
Your notebooks usually auto save every 2 min (default). Turn this feature off
|
||||
when working with the paired file. Otherwise Jupyter will continue to save the
|
||||
state while you are editing the paired file, and the changes will be synced to
|
||||
the disk version of the paired file. You can disable the autosave by unchecking
|
||||
the `Autosave notebook` menu item in the Juytext menu (see above image).
|
||||
|
||||
## Further information
|
||||
|
||||
Please refer to:
|
||||
|
||||
* [the Jupytext FAQ](https://jupytext.readthedocs.io/en/latest/faq.html)
|
||||
* [the Jupytext documentation](https://jupytext.readthedocs.io/en/latest/index.html)
|
||||
Reference in New Issue
Block a user