diff --git a/README.md b/README.md index e9e5d1d32bdf4a83c6ad5e840406e0cd0259dbbf..460f1bb96e5dde90a06b51f589613428802d2b7c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # 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:_ ``` diff --git a/build-book.sh b/build-book.sh index 3d8dd6e46c022b0570ee8055eed47e59810499fe..99bf4aa12f666cc4d16d69ef73c6ff080e605839 100755 --- a/build-book.sh +++ b/build-book.sh @@ -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 diff --git a/kill-server.sh b/kill-server.sh index 2421a3ef2d3b97899fa80290bc4c35fc57742431..8e78ceb50066938ea094999bcc52e631916b70c2 100755 --- a/kill-server.sh +++ b/kill-server.sh @@ -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