RunestoneInteractive / RunestoneComponents

Packaging of the Runestone tools for publishing educational materials using github pages
http://runestoneinteractive.org
Other
101 stars 225 forks source link

Code coach modularize #1396

Closed ascholerChemeketa closed 1 year ago

ascholerChemeketa commented 1 year ago

Coaches are added to a list during ActiveCode construction.

runCoaches function is triggered on program run. It asynchronously runs all coaches, but then waits for all results so Code Coach div can display any coach feedback deterministically in the order coaches were created.

Questions/Comments:

ascholerChemeketa commented 1 year ago

I stress-tested the deterministic output with a TestCoach that just waited a random amount of time before returning a set string. Works as intended when there are multiple coaches taking variable amounts of time.

ascholerChemeketa commented 1 year ago

One aspect that might be annoying in existing books - Pyflakes complains about * imports.

Personally, I am using this as an excuse to replace them all in my book. But it would not be too hard to filter them out in the Pyflakes coach.

image

ascholerChemeketa commented 1 year ago

Updated to filter import * related warnings from pyflakes to avoid scary warnings in existing books.