MyST-NB icon indicating copy to clipboard operation
MyST-NB copied to clipboard

execute with cache does not restore cache outputs for jupytext

Open itcarroll opened this issue 1 year ago • 0 comments

Describe the bug

context When I do jupyter-book build src on a book with jupytext content, then jcache notebook -p src/_build/.jupyter_cache list prints a result with the wrong Reader.

  ID  URI                                              Reader    Added             Status
----  -----------------------------------------------  --------  ----------------  --------
   1  example.py                                       nbformat  2024-08-04 02:43  ❗️ (unreadable)

expectation

I expected the Reader to be jupytext.

bug

I think this is a bug, because on subsequent builds, when the cached outputs are supposed to be copied into the notebook, they are not. The build just quietly leaves outputs empty.

Reproduce the bug

Included in _config.yml:

sphinx:
  config:
    nb_custom_formats:
      .py:
        - jupytext.reads
        - fmt: py

List your environment

Jupyter Book      : 1.0.2
External ToC      : 1.0.1
MyST-Parser       : 1.0.0
MyST-NB           : 1.1.1
Sphinx Book Theme : 1.1.3
Jupyter-Cache     : 1.0.0
NbClient          : 0.10.0

itcarroll avatar Aug 04 '24 02:08 itcarroll