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

Code cells with just one bash command are converted to markdown #181

Closed
mwouts opened this issue Feb 18, 2019 · 0 comments
Closed

Code cells with just one bash command are converted to markdown #181

mwouts opened this issue Feb 18, 2019 · 0 comments

Comments

@mwouts
Copy link
Owner

mwouts commented Feb 18, 2019

While testing jupytext==1.0.0-rc5 on Jake Vanderplas' notebooks for data-science (see also #99) with commands

git clone https://github.com/jakevdp/PythonDataScienceHandbook.git
cd PythonDataScienceHandbook/notebooks

# Update nbformat
jupytext --from ipynb --to ipynb *.ipynb
git commit -am "nbformat version"

# Test command
jupytext --to py:light --test *.ipynb

# Convert to a specific format, update
jupytext --to python/light//py:light *.ipynb
jupytext --from python/light//py:light --to ipynb --update python/light/*

# Show diffs
git diff

we observe that

  • --quiet instruction in --test mode removes all output - it should still show the differences
  • cells with only one magic instruction like %load_ext line_profiler gain a lines_to_next_cell cell metadata (both in light and percent formats)
  • cells with just one bash instruction like !head -4 data/president_heights.csv are incorrectly converted from code to markdown (only in the light format)
mwouts added a commit that referenced this issue Feb 18, 2019
@mwouts mwouts closed this as completed Feb 18, 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

1 participant