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

Roundtrip conversion ipynb to python inserts a newline #164

Closed
goerz opened this issue Jan 30, 2019 · 2 comments
Closed

Roundtrip conversion ipynb to python inserts a newline #164

goerz opened this issue Jan 30, 2019 · 2 comments

Comments

@goerz
Copy link

goerz commented Jan 30, 2019

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.

mwouts added a commit that referenced this issue Jan 30, 2019
@mwouts
Copy link
Owner

mwouts commented Jan 31, 2019

This should be OK now in 1.0.0-rc1. Can you please confirm @goerz ? Thanks

@goerz
Copy link
Author

goerz commented Feb 2, 2019

Same as #165: the bug seems fixed, by the json has a stripped newline. I'll close here, but leave #165 open.

@goerz goerz closed this as completed Feb 2, 2019
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