Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support testing code and displaying feedback for interactive coding exercises #1333

Open
joelostblom opened this issue Mar 1, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@joelostblom
Copy link

I am interested in creating coding exercises as part of a text book and I'm trying to explore if jupyterlite can be used for this purpose. The criteria I have in mind are the following:

  • Inlined in the textbook (so not a full jupyterlab instance, but a single cell (as in Provide a single executable cell #148) or REPL.
  • Can run some type of tests on the submitted code, whether that is a full autograder package like otter or just hidden assert statements from a file
  • Can provide/display feedback based on what is wrong in the code (ie which test fails) and the correct solution

I'm imagining something like this:

image

That screenshot is from https://github.com/ines/course-starter-python which seems to not be actively maintained any longer, and I would prefer to use a more established framework such as Jupyter Book or Quarto together with something like JupyterLite for the textbook.

To what extent is something like this currently achievable with JupyterLite (e.g. can I show a REPL and have tests run each time click a submit button) and would this type of component be considered in scope for the project and likely to see development in the future or is it something that needs to happen more on the JupyterBook/Quarto side of things?

@joelostblom joelostblom added the enhancement New feature or request label Mar 1, 2024
@joelostblom joelostblom changed the title Support testing code and displaying feedback or interactive coding exercises Support testing code and displaying feedback for interactive coding exercises Mar 1, 2024
@jtpio
Copy link
Member

jtpio commented Mar 2, 2024

Thanks @joelostblom.

It looks like this might be achievable with thebe-lite: https://github.com/executablebooks/thebe/tree/main/packages/lite

Currently there is no mention of thebe in the documentation. But having a guide for showing how to do this (or linking to the thebe repo) would be a great addition.

@joelostblom
Copy link
Author

Thanks @jtpio ! I opened executablebooks/thebe#736 suggesting that an example of this is added to the thebe-light docs. I'm a bit unsure where to get started myself at this ponit

@jtpio
Copy link
Member

jtpio commented Mar 3, 2024

Currently there is no mention of thebe in the documentation. But having a guide for showing how to do this (or linking to the thebe repo) would be a great addition.

I meant there is no mention in the JupyterLite documentation. But the thebe docs might have some pointers.

Maybe this repo could also be a good starting point: https://github.com/rowanc1/myst-lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants