added Jupytext documentation

This commit is contained in:
2019-09-30 08:35:56 +02:00
parent 2ef7ec367c
commit f797225522
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
---
title: Jupytext - efficient editing
#tags:
#keywords:
last_updated: 30 September 2019
#summary: ""
sidebar: merlin6_sidebar
permalink: /merlin6/jupytext.html
---
[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. The file can be created in a number of formats, e.g. *markdown, *.py (light Script)*, and others. You can then efficiently work on that file using an IDE or text editor. `Jupytext` will keep the both the notebook and this **paired** file in sync.
## 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.
{% include image.html file="jupytext_menu.png" caption="Jupytext menu" max-width=501 %}
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 caried over into your jupyter notebook.
## 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)