I was excited to try the Jupyter Book feature in the March Azure Data Studio (ADS) release. I’ve thought notebooks were an interesting way to teach and I’m looking to expand my use of them, especially now that SQL Prompt is (kind of) in there.
I saw the new notebook icon in the sidebar when I restarted ADS.
If you put the cursor on the “Saved Books” line, you’ll see a few things. There is an “Open Book”, a collapse all, and an ellipsis there.
I didn’t have any books, and don’t see any “create” in the file menu, so I ended up clicking the ellipsis. Then I see a “Create”.
Clicking this opens a notebook with three parts. These are designed to help you create a Jupyter Book. There are:
- Create a New Book
- Open Your Book!
I started with this and right away found issues.
What in the world is the f”xxx” thing?
I wrestled with this a bit, trying to search for Jupyter Books, but most of the results are Jupyter Notebooks. Apparently Jupyter Books are new, and that should have helped. I did post a question at StackOverflow, and someone gave me the answer quickly.
You need Python 3.6+. These are f strings, a new way of formatting, which I hadn’t heard of prior to this. I lightly use Python, and hadn’t upgraded since 3.5.3.
OK, that’s another whole issue, but once I upgraded and fixed paths, this appeared to work. I first ran the jupyter-book install, and then created a demo book first to ensure things were working.
I ran step 1 in the ADS notebook and it verified the Jupyter Book module was installed.
Next I ran step two, which asks for a path for your notebook, which should be an empty folder or a new folder. I entered a new folder that doesn’t exist (e:\jbook). Next, I entered a folder where I have a few random notebooks. I also added a license file, since the Jupyter Book project suggests one. Here was the folder I added:
The cell appeared to run, but then I saw this:
The license file is misnamed, which makes sense. However, I didn’t get a TOC, which I think means I need to have folders under my set of notebooks. I was thinking this book was a simple set, but maybe I need folders.
I also didn’t create a TOC yaml file because a) I didn’t think I needed it and b) YAML is a PIA to work in. I don’t mind editing one, but creating from scratch is a mess.
When I got to step 3 and opened my notebook, I got this:
An error down below, as I’m missing something. I’m not sure what, and I can’t open the book and see anything, but I produced something.
I need to experiment more, so I’ll give this another try soon.