Merge branch 'main' into CollaborationGit

This commit is contained in:
Tom van Woudenberg 2024-05-27 13:34:23 +02:00
commit c7e33ba1f3
9 changed files with 47 additions and 19 deletions

View file

@ -1,5 +1,5 @@
title: TeachBooks Manual
author: <a href="https://teachbooks.tudelft.nl/">TeachBooks Team</a>, built with <a href="https://jupyterbook.org/">Jupyter Book</a>, <a href="https://creativecommons.org/licenses/by/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer"">CC BY 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" alt=""><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" alt="">
author: TeachBooks Team from Delft university of Technology, built with <a href="https://teachbooks.tudelft.nl/">TeachBooks</a> and <a href="https://jupyterbook.org/">Jupyter Book</a>, <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="license noopener noreferrer"">CC BY 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt=""><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt="">
logo: images/Logo_without_background.png

View file

@ -34,20 +34,6 @@
"To complete this assignment, you can use `numpy`, `matplotlib` and from the `math` library, `log` and `e` (these are imported for you when you inialize the notebook)."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"thebe-remove-input-init"
]
},
"outputs": [],
"source": [
"import micropip\n",
"await micropip.install(\"ipywidgets\")"
]
},
{
"cell_type": "code",
"execution_count": 2,

16
book/examples/grading.py Normal file
View file

@ -0,0 +1,16 @@
from IPython.display import display
import ipywidgets as widgets
def check(f):
def wrapper(*args, **kwargs):
output = widgets.Output()
button = widgets.Button(description="Check Answer(s)")
@output.capture(clear_output=True,wait=True)
def _inner_check(button):
try:
f(*args, **kwargs)
except:
print("Something went wrong, have you filled all the functions and run the cells?")
button.on_click(_inner_check)
display(button, output)
return wrapper

@ -1 +1 @@
Subproject commit 32e1eb8725fe4c63612a13f7467491cc9765d95e
Subproject commit d5eab25a29e2cc558ec449577dab669c02758a11

@ -1 +1 @@
Subproject commit 1f74f5f2cf71a282e29b9a96a61bb8a140b9c6ab
Subproject commit 71656612afa24342f345d9e113553b8ff3cdf4b1

View file

@ -85,7 +85,7 @@
"If you push to main, you can test the interactivity on the book-draft website as well.\n",
"\n",
"## Custom cell tags\n",
"With the extended functionality of live code, additional cell tags have been developed to be added to cells in any .ipynb file, next to the [existing tags] of the jupyter book (https://jupyterbook.org/en/stable/content/metadata.html):\n",
"With the extended functionality of live code, additional cell tags have been developed to be added to python cells (not markdown cells) in any .ipynb file, next to the [existing tags] of the jupyter book (https://jupyterbook.org/en/stable/content/metadata.html):\n",
"- `disable-execution-cell` disables the ability to execute the cell when thebe is activated. This might be useful if you notebook file includes interactivity for only a part of the coding cells\n",
"- `disable-execution-page` disables the ability to execute the entire page. This might be useful if you use python code for creating a page, but the code is not part of the actual content of the book.\n",
"- `auto-execute-page` automatically starts the thebe live coding functionality whenever the page is opened. This is particularly useful if you're using widgets on a page.\n",

View file

@ -3,4 +3,5 @@
This is an introduction to Git, VS Code and Jupyter Books for teachers and teaching assistants involved in TeachBooks, our platform easing the process of making a <a href="https://jupyterbook.org/"><img style="display:inline-block; height:1.5em; width:auto; transform:translate(0, -0.15em)" src="images/logo-wide.svg" alt="Jupyter book"></a>. This book is still work in progress, so feel free to contribute https://gitlab.tudelft.nl/interactivetextbooks-citg/jupyter-book-manual! For more information about teachbooks, visit [https://teachbooks.tudelft.nl/](https://teachbooks.tudelft.nl/).
## Contact
If you encounter any issues, please contact Tom van Woudenberg, Robert Lanzafame or one of our TAs Julie Kirsch at TeachBooks@tudelft.nl.
If you encounter any issues and you've a TU Delft account, report it by clicking <svg class="svg-inline--fa fa-gitlab" aria-hidden="true" focusable="false" data-prefix="fab" data-icon="gitlab" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg=""><path fill="currentColor" d="M503.5 204.6L502.8 202.8L433.1 21.02C431.7 17.45 429.2 14.43 425.9 12.38C423.5 10.83 420.8 9.865 417.9 9.57C415 9.275 412.2 9.653 409.5 10.68C406.8 11.7 404.4 13.34 402.4 15.46C400.5 17.58 399.1 20.13 398.3 22.9L351.3 166.9H160.8L113.7 22.9C112.9 20.13 111.5 17.59 109.6 15.47C107.6 13.35 105.2 11.72 102.5 10.7C99.86 9.675 96.98 9.295 94.12 9.587C91.26 9.878 88.51 10.83 86.08 12.38C82.84 14.43 80.33 17.45 78.92 21.02L9.267 202.8L8.543 204.6C-1.484 230.8-2.72 259.6 5.023 286.6C12.77 313.5 29.07 337.3 51.47 354.2L51.74 354.4L52.33 354.8L158.3 434.3L210.9 474L242.9 498.2C246.6 500.1 251.2 502.5 255.9 502.5C260.6 502.5 265.2 500.1 268.9 498.2L300.9 474L353.5 434.3L460.2 354.4L460.5 354.1C482.9 337.2 499.2 313.5 506.1 286.6C514.7 259.6 513.5 230.8 503.5 204.6z"></path></svg> --> {fa}`lightbulb` on the top right corner of this page.
Or contact Tom van Woudenberg, Robert Lanzafame or one of our TAs Julie Kirsch at TeachBooks@tudelft.nl, also for non-TU Delft account holders.