Skip to content
Snippets Groups Projects
Commit 32bb4a2e authored by Robert Lanzafame's avatar Robert Lanzafame
Browse files

Merge branch 'update-local-server-workflow' into 'main'

Update local server workflow

See merge request !46
parents f8de9efa cc8af6ae
No related branches found
No related tags found
2 merge requests!51Blank book,!46Update local server workflow
Pipeline #206194 passed
# MUDE Jupyter Book 2023/2024
**NOTES:**
- use 5 M's (`MMMMM`) anywhere in MUDE repositories to mark to-do's for teachers and TA's. The idea is that you will use text search in VS Code or another platform to find them. Feel free to add your own letters or initials afterwards to make it easier to find certain things yourself or with a sub-team (e.g., `MMMMM-RL` for Robert).
- unless you want a notebook to execute when the jupyter book is built, you should include "_dont_execute" at the end of the file name. This means cell output in the notebook will be rendered in the JB HTML as-is once the document is saved.
- to see interactive stuff locally, run `build-book.sh` and follow instructions for the (local) Python server to use it
- these notes will be incorporated in JB documentation sometime in the future
**UPDATE FOR THOSE BUILDING THE BOOK:** _we've been adding a lot of functionality related to interactive features, for example, Python code that runs in your browser, and Tom has added some examples of the quiz features we can use in the Cookbook. You can still use the "normal" approach of building the book with_ `jupyter book build book` _but if you want to use the interactive features, see the instructions in the Live Code chapter of the Cookbook. If your book build with the "normal" is breaking due to package issues, simply run the following:_
```
......
......@@ -47,5 +47,12 @@ if [ "$START_SERVER" = true ] ; then
echo "Starting server on port 8000"
$python_command -m http.server 8000 --directory book/_build/html
else
echo "Book successfully built. If you want to use interactive elements, start a server locally using the command: $python_command -m http.server 8000 --directory book/_build/html. Or run this script again: ${0} true"
echo "Book successfully built. If you want to use interactive elements,
start a server locally using the command:
$python_command -m http.server 8000 --directory book/_build/html.
Or run this script again (book will build again!):
${0} true"
fi
echo "To close a python server run the commeand:
kill-server.sh"
\ No newline at end of file
......@@ -2,3 +2,13 @@
pid=$(ps aux | grep http.server | head -n 1 | awk '{ print $2 }')
kill -9 $pid
echo "If kill-server.sh did not successfully kill the server:
- you are probably using Windows ;)
- try the following commands
in git bash:
tskill python
in cmd or PowerShell:
TASKKILL /IM python.exe /F"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment