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

Renaming notebook bug #190

Closed
Atcold opened this issue Feb 25, 2019 · 6 comments
Closed

Renaming notebook bug #190

Atcold opened this issue Feb 25, 2019 · 6 comments

Comments

@Atcold
Copy link

Atcold commented Feb 25, 2019

If I select a notebook (in the Home interface of Jupyter) and click on rename, the associated py won't be renamed.
Renaming an open notebook by clicking on the header, where the name is located, instead does work.

@mwouts
Copy link
Owner

mwouts commented Feb 25, 2019

Hi @Atcold . What happens here is that Jupyter only knows about the pairing information once it has opened the notebook. One way to correct what you see would be to have the Jupytext contents manager open a notebook before renaming it, but maybe that's too much for a simple renaming operation?

@Atcold
Copy link
Author

Atcold commented Feb 25, 2019

Hmm, I'm providing user feedback. Meaning, I'm trying to use the software / plug-in, and report unexpected behaviour.
As long as I know what's the way of doing things, then I guess the pros outweigh the cons.

Is there a way to wrap Jupyter's renaming function adding the additional file renaming?

@mwouts
Copy link
Owner

mwouts commented Feb 26, 2019

@Atcold , we can achieve the desired behavior with this simple change: fdc32ea. With this change, Jupytext would read the notebook and extract the pairing information before renaming it. Do you confirm the convenience of renaming files in pairs is worth the potentially large time required to read the notebook?

@Atcold
Copy link
Author

Atcold commented Feb 26, 2019

@mwouts, I think renaming is not a frequent operation. Therefore, its longer execution time would go unnoticed, IMHO. Furthermore, faster renaming can still be achieved by using a command line.

@mwouts mwouts added this to the 1.0.2 milestone Feb 27, 2019
@mwouts
Copy link
Owner

mwouts commented Feb 27, 2019

I agree - we will include this in the next release.

@mwouts
Copy link
Owner

mwouts commented Feb 27, 2019

Available in version 1.0.2

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