[DRAFT - DO NOT MERGE] Use ml tool output with Python Editor POC by microbit-robert · Pull Request #1180 · microbit-foundation/python-editor-v3

@microbit-robert

@microbit-robert

@github-actions

microbit-robert

const json = await readFileAsText(file);
const data = JSON.parse(json) as ActionData[];
this.setMlData(data);
const actionNames = data.map((action) => action.name).join(" ");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action names can have spaces in so this will break. Probably better to have a name per line, but this will require a MicroPython update to change.

microbit-robert

* @param the type of user event that triggered the load.
*/
load = async (
loadHex = async (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the best naming, as this function can handle more than just hex files, though it is its main purpose.

microbit-robert

content: ModelTopicEntry;
}

const ModelTopicEntry = ({ content }: MlItemProps) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole component is hacky. If we had a markdown alternative for rendering extension documentation, we'd use it here. It's pretty horrible to write the model topic entries in the Sanity format.