question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jupyter-book watch command

See original GitHub issue

Description / Summary

It would be nice if jupyter books automatically rebuilt upon changing a file, and fresh files were served over a development server.

Value / benefit

You need to keep several windows open to develop a jupyterbook - vscode, a terminal, a browser window, maybe the inspector. On a laptop, it’s a lot of windows to keep around. It would be nice not to have to look at one of those windows. It would be nice to always be one Ctrl+R away from seeing the latest build of the docs.

Implementation details

The sphinx book theme has support for live building using the tox -e docs-live command. I presume this would be substantially similar to this.

Tasks to complete

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
chrisjsewellcommented, Sep 13, 2021

Heya, a couple of things to note here:

  1. there has been a previous discussion about this: https://github.com/executablebooks/jupyter-book/issues/213 (not really sure why it was closed)
  2. It was certainly in my thinking to do this with sphinx-autobuild: https://github.com/executablebooks/sphinx-autobuild/issues/87
  3. jupyter-book now has the ability for external packages to “inject” commands in to the CLI, this is for example how jupyter-book toc works (https://github.com/executablebooks/sphinx-external-toc/blob/ec4a43904dde7e24b3d08bd2c717c696ef20aff9/setup.cfg#L43-L44). By the same mechanism, an external package (like sphinx-autobuild) could inject a jupyter-book serve command (see also https://github.com/executablebooks/sphinx-autobuild/issues/99)
0reactions
patrickmineaultcommented, Oct 5, 2022

I saw that this is now feasible with sphinx-autobuild:

jupyter-book config sphinx .
sphinx-autobuild . _build/html -b html

There’s a hint about this in the Sphinx section of the docs, but if it’s relevant I can draft a larger section on setting this up in the docs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command-line interface reference - Jupyter Book
Jupyter Book comes with a command-line interface that makes it easy to build your books and run a few common functions. This page...
Read more >
Watch command in Jupyter notebook - Stack Overflow
This is the only way I was able to do, to keep printing the GPU info. import time from IPython.display import clear_output while...
Read more >
IPython and Shell Commands | Python Data Science Handbook
The magic happens with the exclamation point: anything appearing after ! on a line will be executed not by the Python kernel, but...
Read more >
Running the Notebook - Jupyter Documentation
Start the notebook server from the command line: jupyter notebook · You should see the notebook open in your browser.
Read more >
Creating an open-source book with Jupyter Book and Jupytext
0:00 · New! Watch ads now so you can enjoy fewer interruptions. Got it ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found