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

Version 1.16-dev #1147

Merged
merged 9 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![](https://github.com/mwouts/jupytext/blob/17aea37c612f33a4e27eeee4b81966f1506920fd/docs/images/logo_large.png?raw=true)

![CI](https://github.com/mwouts/jupytext/actions/workflows/continuous-integration.yml/badge.svg?branch=main)
![CI](https://github.com/mwouts/jupytext/actions/workflows/ci.yml/badge.svg?branch=main)
[![Documentation Status](https://readthedocs.org/projects/jupytext/badge/?version=latest)](https://jupytext.readthedocs.io/en/latest/?badge=latest)
[![codecov.io](https://codecov.io/github/mwouts/jupytext/coverage.svg?branch=main)](https://codecov.io/gh/mwouts/jupytext/branch/main)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
Expand Down
8 changes: 8 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Jupytext ChangeLog
==================

1.16.0-dev (2023-10-??)
Copy link
Contributor

@LecrisUT LecrisUT Oct 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this to top-level Changelog.md and use include to link to it? Here's an example of using include.

The idea is to have it in keep-a-changelog form so it is easier to incrementally add changelog

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh great! Actually I could use that for the README.md too (index.md is almost a verbatim copy of ../README.md)

-------------------

**Changed**
- Jupytext is now configured with `pyproject.toml` and built with `hatch`. The layout has been reorganised to follow `src-layout` ([#1140](https://github.com/mwouts/jupytext/issues/1140)). This outstanding update was contributed by [Mahendra Paipuri](https://github.com/mahendrapaipuri).
- The extension for Jupyter Notebook (the Jupytext Menu) has been removed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe specifying Notebook version is more clear.

Suggested change
- The extension for Jupyter Notebook (the Jupytext Menu) has been removed.
- The legacy extension for Jupyter Notebook <=6 (the Jupytext Menu) has been removed.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sure! I've added this change to CHANGELOG.md (the file has been moved at the root now)



1.15.2 (2023-09-16)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The `notebook/` prefix above is matched with the top-most parent folder of the m

## Global pairing vs individual pairing

Alternatively, notebooks can be paired individually using either the Jupytext commands in Jupyter Lab, the Jupyter Menu in Jupyter Notebook, or the command line interface:
Alternatively, notebooks can be paired individually using either the Jupytext commands in Jupyter Lab, or the command line interface:

```bash
jupytext --set-formats ipynb,py:percent notebook.ipynb
Expand Down
18 changes: 7 additions & 11 deletions docs/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ If you want to test a feature that has been integrated in `main` but not deliver
pip install git+https://github.com/mwouts/jupytext.git
```

If you want to test Jupytext in JupyterLab 3 then you will have to build the extension for JupyterLab. To do so, make sure that you have a recent version of `node`, and prefix the command above with `BUILD_JUPYTERLAB_EXTENSION=1`.
If you want only to build Jupytext core (e.g. not the JupyterLab extension) you can prefix the
above with `HATCH_BUILD_HOOKS_ENABLE=false`.

Finally, if you want to test a development branch, use
```
pip install git+https://github.com/mwouts/jupytext.git@branch
```
where `branch` is the name of the branch you want to test (again, prefix the command above with `BUILD_JUPYTERLAB_EXTENSION=1` if you want to use Jupytext within JupyterLab 3).
where `branch` is the name of the branch you want to test.

## Install and develop Jupytext locally

Expand All @@ -36,24 +37,19 @@ Tests are executed with `pytest`. You can run them in parallel with for instance
pytest -n 5
```

We also have a `tox.ini` file available if you wish to test your contribution on multiple version of Python before making a PR - just run `tox`.

Build the `jupytext` package and install it with
```
BUILD_JUPYTERLAB_EXTENSION=1 python setup.py sdist bdist_wheel
pip install -U build wheel
python -m build
pip install dist/jupytext-x.x.x-py3-none-any.whl
```

or with
```
BUILD_JUPYTERLAB_EXTENSION=1 pip install .
pip install .
```

Finally, note that you can remove `BUILD_JUPYTERLAB_EXTENSION=1` if you don't need the lab extension - the build time will be much shorter.

## Jupytext's extension for Jupyter Notebook

Our extension for Jupyter Notebook adds a Jupytext entry to Jupyter Notebook Menu. The code is found at `jupytext/nbextension/index.js`. Instructions to develop that extension are at `jupytext/nbextension/README.md`.
Finally, note that you can use `HATCH_BUILD_HOOKS_ENABLE=false` if you don't need the lab extension - the build time will be slightly shorter.

## Jupytext's extension for JupyterLab

Expand Down
8 changes: 3 additions & 5 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The text representation only contains the part of the notebook that you wrote (n

## How do I use Jupytext?

Open the notebook that you want to version control. _Pair_ the notebook to a script or a Markdown file using either the [Jupytext Commands](install.md#jupytext-commands-in-jupyterlab) in JupyterLab or the [Jupytext Menu](install.md#jupytext-menu-in-jupyter-notebook) in Jupyter Notebook.
Open the notebook that you want to version control. _Pair_ the notebook to a script or a Markdown file using the [Jupytext Commands](install.md#jupytext-commands-in-jupyterlab) in JupyterLab.

Save the notebook, and you get two copies of the notebook: the original `*.ipynb` file, together with its paired text representation.

Expand Down Expand Up @@ -38,9 +38,7 @@ The `.ipynb` file contains the full notebook. The paired text file only contains

## Can I create a notebook from a text file?

Certainly. Open your pre-existing scripts or Markdown files as notebooks with a click in Jupyter Notebook, and with the _Open as Notebook_ menu in JupyterLab.

In Jupyter Notebook you can also create text notebooks with the _New Text Notebook_ menu.
Certainly. Open your pre-existing scripts or Markdown files as notebooks with the _Open as Notebook_ menu in JupyterLab.

Output cells appear in the browser when you execute the notebook, but they are not written to the disk when you save the notebook.

Expand Down Expand Up @@ -94,7 +92,7 @@ In this case, a manual action is requested. Remove the paired `.md` or `.py` fil

Jupytext is compatible with JupyterHub (execute `pip install jupytext --user` to install it in user mode) and with Binder (add `jupytext` to the project requirements).

If you use another editor than Jupyter Notebook, Lab or Hub, you probably can't get Jupytext there. However you can still use Jupytext at the command line to manually sync the two representations of the notebook:
If you use another editor than Jupyter Lab, you probably can't get Jupytext there. However, you can still use Jupytext at the command line to manually sync the two representations of the notebook:
```shell
jupytext --set-formats ipynb,py:light notebook.ipynb # Pair a notebook to a light script
jupytext --sync notebook.ipynb # Sync the two representations
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![CI](https://github.com/mwouts/jupytext/actions/workflows/continuous-integration.yml/badge.svg?branch=main)
![CI](https://github.com/mwouts/jupytext/actions/workflows/ci.yml/badge.svg?branch=main)
[![Documentation Status](https://readthedocs.org/projects/jupytext/badge/?version=latest)](https://jupytext.readthedocs.io/en/latest/?badge=latest)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully this one reports as passed. If not we can look at how to report only the las job in the CI

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it does! CI

[![codecov.io](https://codecov.io/github/mwouts/jupytext/coverage.svg?branch=main)](https://codecov.io/gh/mwouts/jupytext/branch/main)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
Expand Down
13 changes: 8 additions & 5 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,25 @@ jupyter labextension enable jupyterlab-jupytext
jupyter labextension disable jupyterlab-jupytext
```

From Jupytext 1.9.0 on, the version of the extension is compatible with JupyterLab 3.x only. If you wish to use Jupytext with JupyterLab 2.x or 1.x, please
From Jupytext 1.16.0 on, the version of the extension is compatible with JupyterLab 4.x only. If you wish to use Jupytext with JupyterLab 3.x or older, please
- install the `jupytext` package using `pip` or `conda`
- and then, install the last version of the `jupyterlab-jupytext` extension that is compatible with your version of JupyterLab, i.e.
```
jupyter labextension install jupyterlab-jupytext@1.3.11 # for JupyterLab 3.x
jupyter labextension install jupyterlab-jupytext@1.2.2 # for JupyterLab 2.x
jupyter labextension install jupyterlab-jupytext@1.1.1 # for JupyterLab 1.x
```

## Jupytext menu in Jupyter Notebook

*Note*: as of this writing (version 1.15.1) this section **applies only to
notebook classic**, i.e. Jupyter Notebook 6.x and below. See [PR
#1095](https://github.com/mwouts/jupytext/issues/1095) where we discuss how to
Please note that
- this section **applies only to notebook classic**, i.e. Jupyter Notebook 6.x and below
- the Jupytext menu was removed in `jupytext==1.16`.

See [PR #1095](https://github.com/mwouts/jupytext/issues/1095) where we discuss how to
mwouts marked this conversation as resolved.
Show resolved Hide resolved
add a Jupytext menu to Jupyter Lab and Notebook 7.x.

Jupytext includes an extensions for Jupyter Notebook that adds a Jupytext section in the File menu.
Jupytext (in versions `<1.16`) includes an extensions for Jupyter Notebook that adds a Jupytext section in the File menu.

![](images/jupytext_menu.png)

Expand Down
6 changes: 1 addition & 5 deletions docs/paired-notebooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ In JupyterLab, pair your notebook to one or more text formats with the [Jupytext

![](images/pair_commands.png)

In Jupyter Notebook, use the [Jupytext menu](install.md#jupytext-menu-in-jupyter-notebook):

![](https://raw.githubusercontent.com/mwouts/jupytext/main/jupytext/nbextension/jupytext_menu.png)

These command simply add a `"jupytext": {"formats": "ipynb,md"}` entry to the notebook metadata.
These commands simply add a `"jupytext": {"formats": "ipynb,md"}` entry to the notebook metadata.

You can also configure the notebook pairing [globally](config.md) for all your notebooks.

Expand Down
2 changes: 1 addition & 1 deletion src/jupytext/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Jupytext's version number"""

__version__ = "1.15.2"
__version__ = "1.16.0-dev"
Loading