-
Notifications
You must be signed in to change notification settings - Fork 9
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
Pyodide headers #1104
Pyodide headers #1104
Conversation
…2 (standalone) - currently failing
… a distinction with pyodide files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few questions, but otherwise woohoo!
`${process.env.ASSETS_URL}/packages/turtle-0.0.1-py3-none-any.whl`, | ||
`${process.env.ASSETS_URL}/pyodide/packages/turtle-0.0.1-py3-none-any.whl`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this one ASSETS_URL
when the ones above are PUBLIC_URL
? I've gotten a bit confused about what the difference is between the two vars to be honest with you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah they can both probably be merged into one env var now. When the site was deployed and assets were in the bucket but on the same domain it was causing a problem so I exposed the bucket via a URL and hit that directly a while back. But now its all bucket based
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing them all to ASSETS_URL
in this file then we can remove that later if we want to 👍
// TODO: Sk.sense_hat.mz_criteria.noInputEvents = false; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this comment deleted on purpose or has it been slashed by Copilot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copilot 🤦 will restore
stdinClosed.current = true; // Don't accept any more stdin this run. | ||
stdinClosed.current = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as my other question about deleted comment above
@@ -218,20 +212,19 @@ const PyodideRunner = ({ active }) => { | |||
writeFile([name, extension].join("."), content); | |||
} | |||
|
|||
// program is the content of the component with name main and extension py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another deleted comment
if (interruptBuffer.current) { | ||
interruptBuffer.current[0] = 0; // Clear previous signals. | ||
interruptBuffer.current[0] = 0; | ||
} | ||
pyodideWorker.postMessage({ method: "runPython", python: program }); | ||
}; | ||
|
||
const handleStop = () => { | ||
if (interruptBuffer.current) { | ||
interruptBuffer.current[0] = 2; // Send a SIGINT signal. | ||
interruptBuffer.current[0] = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More comments
// Pyodide - required for input and code interruption - needed on the host app | ||
"Cross-Origin-Opener-Policy": "same-origin", | ||
"Cross-Origin-Embedder-Policy": "require-corp", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So are we just assuming that host pages will have to add these themselves for now, or am I not understanding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea that's right. So on editor.raspberrypi.org we've already got these set 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WOOOOHOOOOO 🥳 🎉 🚢 🚀
## [0.28.0] - 2024-10-22 ### Added - PyodideWorker setup for the editor (#1104) - Enabling `pyodide` support in the web component (#1090) - `Pyodide` `matplotlib` support (#1087) - Tests for running simple programs in `pyodide` and `skulpt` (#1100) - Fall back to `skulpt` if the host is not `crossOriginIsolated` (#1107) - `Pyodide` `seaborn` support (#1106) - `Pyodide` module caching (#1113) ### Changed - Upgrade to `webpack 5` (#1096) - Bump `pyodide` to `v0.26.2` (#1098) - Updated the ImportErrors message (#1105) - In ErrorMessage component added the way to display html elements in string (#1105) ### Fixed - Dynamic runner switching with more than one `python` file (#1097) - Pyodide running the correct file (`main.py`) when there are multiple `python` files (#1097) - Build to include public files (#1112) - Persisting choice of tabbed/split view when running `python` code (#1114)
closes https://github.com/RaspberryPiFoundation/digital-editor-issues/issues/303