mwouts / jupytext

Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
https://jupytext.readthedocs.io
MIT License
6.65k stars 386 forks source link

Ensure we set jupytext metadata to model #1197

Closed mahendrapaipuri closed 10 months ago

mahendrapaipuri commented 11 months ago

The bug shows up when the user unpairs all the formats. It is reproducible in both notebook and JupyterLab.

Fixes #1191

github-actions[bot] commented 11 months ago

Thank you for making this pull request.

Did you know? You can try it on Binder: Binder:lab or Binder:notebook.

Also, the version of Jupytext developed in this PR can be installed with pip:

pip install git+https://github.com/mahendrapaipuri/jupytext.git@bugfix_nb_unpair

(this requires nodejs, see more at Developing Jupytext)

mahendrapaipuri commented 11 months ago

@mwouts Could you please test this patch and see if it fixes the bug? Cheers!!

codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (81d4d33) 97.73% compared to head (c61cb04) 97.73%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1197 +/- ## ======================================= Coverage 97.73% 97.73% ======================================= Files 29 29 Lines 4456 4456 ======================================= Hits 4355 4355 Misses 101 101 ``` | [Flag](https://app.codecov.io/gh/mwouts/jupytext/pull/1197/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Wouts) | Coverage Δ | | |---|---|---| | [external](https://app.codecov.io/gh/mwouts/jupytext/pull/1197/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Wouts) | `75.05% <ø> (-0.12%)` | :arrow_down: | | [functional](https://app.codecov.io/gh/mwouts/jupytext/pull/1197/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Wouts) | `88.56% <ø> (ø)` | | | [integration](https://app.codecov.io/gh/mwouts/jupytext/pull/1197/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Wouts) | `77.31% <ø> (ø)` | | | [unit](https://app.codecov.io/gh/mwouts/jupytext/pull/1197/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Wouts) | `66.56% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Marc+Wouts#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mahendrapaipuri commented 10 months ago

@mwouts Just a gentle reminder in case you missed it during the holidays. If confirm that this patch fixes the bug, we can go for a merge!

mwouts commented 10 months ago

Thank you @mahendrapaipuri !

Yes I have finally tested this PR on Binder - sorry for the long delay - and I can confirm that it works. I will take it tomorrow (after #1204 or #1190 which I need to fix the CI).