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

Code-cell reading from files using :load: should not use cache if the file has changed #621

Open
gibberblot opened this issue Sep 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@gibberblot
Copy link

Describe the bug

I use the :load: tags for code-cells so much in my book; e.g.:

:load: <path>

This is documented as an experimental feature.

When I change the file as , I expect that this cell should be executed instead of reading from the cache.

But instead, it reads from the cache.

This means I have to force execution, or change the cell just to get it to re-execute.

Thanks!
Tim

p.s. I love this functionality!

Reproduce the bug

In any jupyterbook, create the file test.py with the following:

print("1")

Load it in a code cell:

:load: test.py

and build the book.

Now change test.py to:

print("2")

and re-build. You will still get the output ("1"), and it is clear from the execution log that this was cached.

List your environment

Jupyter Book : 1.0.0
External ToC : 1.0.1
MyST-Parser : 2.0.0
MyST-NB : 1.0.0
Sphinx Book Theme : 1.1.2
Jupyter-Cache : 0.6.1
NbClient : 0.7.4

Python 3.10.12

WSL on Windows 11

@gibberblot gibberblot added the bug Something isn't working label Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant