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

pair without change to notebook.ipynb? #598

Closed
huangyingw opened this issue Aug 29, 2020 · 3 comments · Fixed by #600
Closed

pair without change to notebook.ipynb? #598

huangyingw opened this issue Aug 29, 2020 · 3 comments · Fixed by #600
Milestone

Comments

@huangyingw
Copy link

currently, after I run

jupytext --set-formats ipynb,py notebook.ipynb

it will make a small change to noteboo.ipynb file

+   "formats": "ipynb,py",

is it possible that, to pair an ipynb file without changing it ?

@mwouts mwouts added this to the 1.6.0 milestone Aug 30, 2020
@mwouts
Copy link
Owner

mwouts commented Aug 30, 2020

Hello @huangyingw , that is a good question.

Pairing a notebook means that Jupytext needs to be aware somehow that the file belongs to a pair. As you mention this information is by default inserted in the notebook itself.

Maybe it is possible to use a configuration file for this. However, all the notebook in the configuration file directory and subdirectory will be paired. Would that be OK for you?

On my side I'll had a test that pairing notebooks through the config file does not change the notebook itself, that's a good test to have.

@huangyingw
Copy link
Author

thanks for quick response. yes, a configuration definitely is ok for me.
I will try to use the configuration file option.

@mwouts
Copy link
Owner

mwouts commented Aug 30, 2020

Excellent! I forgot to mention that I did add the tests, and they seem to work as expected, cf. https://github.com/mwouts/jupytext/pull/600/files

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

Successfully merging a pull request may close this issue.

2 participants