Skip to content

Roundtrip conversion ipynb to python inserts a newline #164

Closed
@goerz

Description

This is using https://github.com/qucontrol/krotov/blob/f1082fe129abd609ecac25e57e0737066a599cd7/docs/notebooks/01_example_simple_state_to_state.ipynb, which is a notebook that contains no jupytext metadata:

> jupytext --to=py 01_example_simple_state_to_state.ipynb
  [jupytext] Reading 01_example_simple_state_to_state.ipynb
  [jupytext] Writing 01_example_simple_state_to_state.py
> jupytext --to=notebook --update 01_example_simple_state_to_state.py
  [jupytext] Reading 01_example_simple_state_to_state.py
  [jupytext] Writing 01_example_simple_state_to_state.ipynb (destination file updated)
> git diff 01_example_simple_state_to_state.ipynb
  nbdiff /var/folders/ll/rgszt4s525s2xtv8rr60lqz40000gn/T//Fjbgla_01_example_simple_state_to_state.ipynb docs/notebooks/01_example_simple_state_to_state.ipynb
  --- /var/folders/ll/rgszt4s525s2xtv8rr60lqz40000gn/T//Fjbgla_01_example_simple_state_to_state.ipynb  2019-01-29 22:31:01.546437
  +++ docs/notebooks/01_example_simple_state_to_state.ipynb  2019-01-29 22:30:54.699366
  ## modified /cells/26/source:
  @@ -5,4 +5,4 @@ def plot_population(result):
       ax.legend()
       ax.set_xlabel('time')
       ax.set_ylabel('population')
  -    plt.show(fig)

  +    plt.show(fig)

I would expect this roundtrip conversion to leave the notebook completely unchanged.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions