[DRAFT - DO NOT MERGE] Use ml tool output with Python Editor POC#1180
Draft
microbit-robert wants to merge 3 commits intomainfrom
Draft
[DRAFT - DO NOT MERGE] Use ml tool output with Python Editor POC#1180microbit-robert wants to merge 3 commits intomainfrom
microbit-robert wants to merge 3 commits intomainfrom
Conversation
|
Preview build will be at |
microbit-robert
commented
May 23, 2024
src/project/project-actions.tsx
Outdated
| const json = await readFileAsText(file); | ||
| const data = JSON.parse(json) as ActionData[]; | ||
| this.setMlData(data); | ||
| const actionNames = data.map((action) => action.name).join(" "); |
Collaborator
Author
There was a problem hiding this comment.
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
commented
May 23, 2024
| * @param the type of user event that triggered the load. | ||
| */ | ||
| load = async ( | ||
| loadHex = async ( |
Collaborator
Author
There was a problem hiding this comment.
Not the best naming, as this function can handle more than just hex files, though it is its main purpose.
microbit-robert
commented
May 23, 2024
| content: ModelTopicEntry; | ||
| } | ||
|
|
||
| const ModelTopicEntry = ({ content }: MlItemProps) => { |
Collaborator
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an alternative to https://github.com/PersonaOASIS/python-editor-v3/tree/ml-area that we can iterate on.
It uses the stubs from https://github.com/PersonaOASIS/micropython-microbit-stubs and the hex from https://github.com/PersonaOASIS/micropython-microbit-v2.
No consideration has been given to supporting other extensions yet.
mlhas been renamed tomodelto match the stubs so that the links to API from the editor work.