data-8 / textbook

The textbook Computational and Inferential Thinking: The Foundations of Data Science

Home Page:http://www.inferentialthinking.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unclear how to build the book

davidwagner opened this issue · comments

The instructions on how to build the book no longer seem to work. The link to the Jupyter Book build instructions (https://jupyter.org/jupyter-book/guide/03_build.html#build-the-books-markdown) is broken. I'm guessing the new link might be https://jupyterbook.org/start/build.html, but I can't figure out how to get that to work.

When I run make book (which runs jupyter-book build ./), I get the following error message:

Couldn't find a Table of Contents file. To auto-generate one, run

	jupyter-book toc ./

I'm not very experienced to Jupyter Book, so I'm not sure the right fix, but perhaps _data/toc.yml needs to be renamed to _toc.yml at the top level? @choldgraf any tips?

That got me closer. Now I'm seeing a ton of warnings. I also encountered several errors, which I've fixed one by one:

  • Python intentionally contained a syntax error, and Jupyter Book / sphynx didn't like that and aborted the build rather than continuing. Setting the "raises-exception" tag on those cells got me past those errors.
  • Jupyter Book didn't like "Python [Root]" as the kernel name. Changing that to "Python 3" fixed that.
  • I found a coding error in one notebook, using Table.with_column() where it should have used Table.with_columns() - I suspect we didn't update this to match changes we made to the datascience library.

Finally I hit an error that I don't know how to fix: there's an error when building content/chapters/12/1/AB_Testing.ipynb. I'm wondering if it there was some timeout. That notebook contains code that does a computationally intensive computation, and if you rerun the notebook, it'll take a little while for the computation to succeed. I wonder if previously Jupyter Book was using the output cells that were saved in the notebook, and now it is trying to re-execute every notebook and then runs into some timeout or execution limit for that notebook. Any ideas?

I've pushed all of these changes.

Maybe I need to set execute: execute_notebooks: 'off' in _config.yml?

Incidentally it looks like the syntax of _config.yml might have changed dramatically; I wonder how to convert it over to the new Jupyter book format.

Dup of #131