deathbeds / jupyterlab-starters

Starter notebooks and directories in JupyterLab

Home Page:https://jupyterstarters.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to build a wizard with helpful feedback, but no questions

datakurre opened this issue · comments

A simple "guiding starter notebook" would need no questions, but just helpful texts and prompt for pressing "Start" to continue to the next step (and the notebook code would validate that the copied notebook template has been properly filled and add the next step for the form).

Yet, I am unable to figure out, how to define text without input fields with JSON schema.

What would you suggest?

Probably boolean fields would work. It would probably even be possible that the "Start" button would fill those check boxes when validation passes.

Found out that my idea here was flawed also in that it is not possible to see the changes the user has done for the copied notebook template, but the schema form is the only way for the starter to get feedback from the user.

So, I will need the input fields to ask answers for quizzes.

Yeah, that's a definite gotcha. The initial idea was to keep it pretty focused, but flexible within those constraints. But there's a whole class of features around the reading/changing of other files that would be awesome, but make it much harder to do atomically, e.g. if something fails how do you roll back? I'd maybe trust a multi-file-changing wizard like that if i knew i had git backing it, but part of this is to be easy enough to use without training, so git need not apply.

Anyhow, presumably it would be possible to do this with a fully custom starter (like how cookiecutter and notebook starters are actually implemented): you could just use the contents_manager directly, and just look at the file models. Very few guardrails.

nbgrader does that, but is waaaay to heavyweight for this use case.

Let's reopen this, it's probably worth pursuing as an example.

I believe that the current limits make sense. I was just still learning those limits, and I am not even sure if multi-step two-way guiding tutorial really is worth of the effort.

That said, the original question is still valid. If I'd just want to greet the user and guide to press "Start" for the first tutorial notebook to be copied and opened, there is no trivial option for that with JSON schema, but I'd need to ask for some superfluous personalization information like "name".

output

Throbber or something to indicate that the notebook is starting after the first "Start" would be nice.

I've reached a point where I can add an extra notebook step by "simply" adding a new cell to my starter notebook and calling a function with step title and notebook cells there...

I noticed I was not able to update those "checkbox" from server-side, but had to replace the form with new checkboxes on every execution to give feeling of progress.

Not sure, how a this kind of tutorial should be "ended". Possibly the last notebook opened should be "congratulate" for finishing the tutorial. Requiring extra "START" to end the tutorial might be weird.

I've reached a point where I can add an extra notebook step by "simply" adding a new cell to my starter notebook and calling a function with step title and notebook cells there...

That sounds pretty promising. There are a lot of different ways to model the progression: while something made of stdlib is very attractive for this kind of thing, I'd really like to have something like transitions or sismic.

I noticed I was not able to update those "checkbox" from server-side, but had to replace the form with new checkboxes on every execution to give feeling of progress.

That seems odd: what was the behavior? sounds testable?

That seems odd: what was the behavior? sounds testable?

Should be. Writing changed values to "body" on notebook simply did not reflect as changes on the form. Although, I don't even know if they should.

@bollwyvl Next issue: How would you manage notebook data for multi-step starter that produces multiple notebooks? Currently I have that inlined in starter notebook code cells, which works, but it not very pretty nor easy to maintain.

@bollwyvl Thanks for the tip! That's why I depend on setuptools, which has good API for loading resources from packages :-)

All my questions answered. Closing this.

Oh, this is how it looks now:
robotkernel-starter

I am planning for three starters in total: that episodic quick start, a copied folder of tutorial notebooks and a template starter with growing number of configurable options.