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

Paired notebook cannot be opened in Jupyter following "jupytext --to ipynb" #335

Closed
mwouts opened this issue Sep 20, 2019 · 2 comments · Fixed by #390
Closed

Paired notebook cannot be opened in Jupyter following "jupytext --to ipynb" #335

mwouts opened this issue Sep 20, 2019 · 2 comments · Fixed by #390
Milestone

Comments

@mwouts
Copy link
Owner

mwouts commented Sep 20, 2019

We already saw this at #254 - Jupytext in Jupyter checks that the .md file is more recent than the .ipynb file, to avoid overwriting an .ipynb file with the possible out-of-date content of the .md file.

However, when the .ipynb file is written by Jupytext itself (and is the dual of the source .md file), we know that the content there does match that of the .md file.

So maybe when one executes jupytext --to ipynb notebook.md, Jupytext should also update the timestamp of the input notebook.md? Before that, one should check the impact of changing the timestamp on editors like Jupyter notebook, VS Code or PyCharm - will they infer that the file content has changed?

mwouts added a commit that referenced this issue Sep 21, 2019
To allow paired notebooks to be opened in Jupyter later on.
Closes #254 #335
@mwouts
Copy link
Owner Author

mwouts commented Sep 21, 2019

Updating the timestamp of a Python script does not seem to create issues with PyCharm nor VS code (at least on Windows). So there's a chance that implementing this won't cause more trouble than it solves!

The corresponding fix is available on branch 1.3.0.

@mwouts mwouts added this to the 1.3.0 milestone Sep 21, 2019
@mwouts mwouts closed this as completed Sep 22, 2019
mwouts added a commit that referenced this issue Oct 12, 2019
To allow paired notebooks to be opened in Jupyter later on.
Closes #254 #335
@mwouts mwouts reopened this Nov 20, 2019
@mwouts
Copy link
Owner Author

mwouts commented Nov 20, 2019

The timestamp update could be limited to the cases when

  • output is .ipynb
  • and the notebook is a paired notebook.

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.

1 participant