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.

CLI: `page` command building/executing all notebooks

See original GitHub issue

There appears to be an issue with the jupyter-book page command. In principle, page is supposed to convert the given source file into HTML (or pdf, given the option). However, it seems that jb page <file> will actually trigger the execution of the notebooks that are in the same directory.

This can be reproduced with the basic juypter-book example:

jb create spam
cd spam
jb page intro.md

Note that there are two issues here, probably interrelated - 1) page is only supposed to work on a single page rather than the entire book and 2) the default value for executing the books is off, so jb page file should not try to execute the file (if it is a notebook or myst-nb text-formatted notebook).

jupyter-book version: 619e33f2d

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
rossbarcommented, May 16, 2020

Yeah the jupyter_execute_notebooks value wasn’t making it from the config dictionary through to the myst-nb parser. Based on your changes in #592, I was able to trace the problem back to jupyter_book/yaml.py. I’m still not 100% on the actual mechanics of what is happening, but it seems like the values from the sphinx.config.Config object that is passed into yaml_to_sphinx (at whatever point that’s getting called) are not generally being added to the sphinx_config dict that is then passed along.

I just now think I’ve landed on a potential solution (specific to the jupyter_execute_notebooks config value) and will PR shortly, but based on this fix and changes in #592 , it seems like there may be a more general problem with config values not being passed through the entire build chain intact.

1reaction
rossbarcommented, May 15, 2020

I’ll aim to address it this evening 😃

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 ... This page contains information on what you...
Read more >
Notebook execution CLI command samples - Amazon EMR
Notebook execution CLI command samples · Run a notebook · Notebook output · Describe a notebook · Stop a notebook · List a...
Read more >
JupyerLab CLI command overview — Mastering JupyterLab
This sections gives an overview of all CLI commands present. JupyterLab Subcommands# !jupyter-lab -h.
Read more >
Command line tools for managing InfluxDB
The influxd service starts and runs all the processes necessary for InfluxDB to function. cli. Was this page helpful? Yes No.
Read more >
CLI (Command Line Interface) - Great Expectations docs
All CLI commands have help documentation that can be accessed by including the ... or will open Jupyter Notebooks with boilerplate code and...
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