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

Pipe a notebook to black using jupytext #154

Closed
mwouts opened this issue Jan 15, 2019 · 1 comment
Closed

Pipe a notebook to black using jupytext #154

mwouts opened this issue Jan 15, 2019 · 1 comment
Milestone

Comments

@mwouts
Copy link
Owner

mwouts commented Jan 15, 2019

One can reformat a notebook with black and jupytext with, for instance,

jupytext notebook.ipynb --to py:light -o - | black - | jupytext --from py:light -o notebook.ipynb 

But this is not perfect!

Possible improvements would be

  • preserve the output cells (and fix the --update flag which does not seems to work in this context)
  • export to a default format ('auto:light'), and detect the text format automatically auto-detect input format #148
  • remove jupytext's comment when input is taken from the stdin
[jupytext] Converting '<_io.TextIOWrapper name='<stdin>' mode='r' encoding='UTF-8'>' to 'notebook.ipynb' (destination file replaced)
  • make sure Jupytext does not add too much metadata to the notebook. Especially, the transformation should not add a Jupytext entry in the metadata. Also, I would prefer not to get 'lines_to_end_of_cell_marker' metadata on code cells.
@mwouts mwouts added this to the v1.0.0 milestone Jan 15, 2019
mwouts added a commit that referenced this issue Jan 22, 2019
mwouts added a commit that referenced this issue Jan 27, 2019
Many new arguments: pipe, exec, quiet. #154 #142
mwouts added a commit that referenced this issue Jan 27, 2019
Standard input '-' argument is automatically added by Jupytext #154 #142
@mwouts
Copy link
Owner Author

mwouts commented Feb 5, 2019

Made available in version 1.0-rc.

@mwouts mwouts closed this as completed Feb 5, 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