Skip to content
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

Add ipython #1110

Open
wants to merge 69 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
aa09f15
Create draft PR for #936
create-issue-branch[bot] Feb 27, 2024
8814cae
default to pyodide and switch to skulpt if needed
loiswells97 Feb 27, 2024
1f0e5d0
attempt to parse imports in the runnerfactory
loiswells97 Feb 27, 2024
12bdce4
refactoring
loiswells97 Feb 28, 2024
f0ba6c3
tidying for linter
loiswells97 Feb 28, 2024
825961e
tidying to clarify approach in pr
loiswells97 Feb 28, 2024
e4354ed
refactoring to fix things
loiswells97 Feb 28, 2024
534871c
tidying
loiswells97 Feb 28, 2024
fb17e4d
tidying
loiswells97 Feb 29, 2024
7a3a74c
Merge branch 'main' into issues/936-Spike_Investigate_using_pyodide_d…
loiswells97 Feb 29, 2024
e69126c
Merge branch 'main' into issues/936-Spike_Investigate_using_pyodide_d…
loiswells97 Feb 29, 2024
edabb66
Merge branch 'main' into issues/936-Spike_Investigate_using_pyodide_d…
loiswells97 Feb 29, 2024
ff0587f
fixing shikm assets
loiswells97 Apr 4, 2024
73ae099
Merge branch 'main' into issues/936-Spike_Investigate_using_pyodide_d…
loiswells97 Apr 4, 2024
beaad38
initial attempt at explaining incompatible modules
loiswells97 Apr 4, 2024
901cd1d
Fixing snapshot and skulptrunner tests
loiswells97 Apr 4, 2024
88ce726
fixing pyodiderunner tests
loiswells97 Apr 4, 2024
ea622af
fixing py5 imported mode
loiswells97 Apr 4, 2024
95b85ab
fixing cypress tests
loiswells97 Apr 4, 2024
ef868e0
updating snapshot
loiswells97 Apr 4, 2024
f9d8b67
fixing linting warning
loiswells97 Apr 5, 2024
610f6ad
updating changelog
loiswells97 Apr 5, 2024
e399def
fixing the input function
loiswells97 Apr 5, 2024
797a559
trying to fix cypress
loiswells97 Apr 5, 2024
691f9fb
patching pygal tooltip formatter
loiswells97 Apr 8, 2024
b1683fe
couple of regex patches to eliminate some edge cases
loiswells97 Apr 8, 2024
f76ea51
tidying
loiswells97 Apr 8, 2024
fdc914d
moving pyodiderunner back for now to avoid conflicts
loiswells97 Apr 8, 2024
52c4067
Merge branch 'main' into issues/936-Spike_Investigate_using_pyodide_d…
loiswells97 Apr 8, 2024
1b82f42
tidying
loiswells97 Apr 8, 2024
68d85dc
changing and fixing tests
loiswells97 Apr 9, 2024
41594e6
fixing more tests
loiswells97 Apr 9, 2024
a571b06
fix mission zero tests
loiswells97 Apr 9, 2024
ce79754
testing pythonrunner switching which runner is active
loiswells97 Apr 9, 2024
70d1eea
updating snapshot
loiswells97 Apr 9, 2024
e53a055
tweaking and testing skulpt and pyodide runner visibilities
loiswells97 Apr 9, 2024
868ab31
tweaking incompatibility error message explanation
loiswells97 Apr 9, 2024
d2fcfc3
fix one of the mission zero cypress tests
loiswells97 Apr 10, 2024
a73fcad
update error explanation copy
loiswells97 Apr 10, 2024
bdb30a1
switching turtle to skulpt and forcing skulpt if sense hat always ena…
loiswells97 Apr 10, 2024
5d43c1a
update error explanation to include turtle
loiswells97 Apr 10, 2024
8e8bdc9
updating snapshot
loiswells97 Apr 10, 2024
e45e8e3
switching mission zero cypress port
loiswells97 Apr 10, 2024
d9b38f3
Merge branch 'pyodide-migration' into issues/936-Spike_Investigate_us…
sra405 Apr 29, 2024
73981ea
Merge pull request #937 from RaspberryPiFoundation/issues/936-Spike_I…
sra405 May 31, 2024
410b3d2
Merge branch 'main' into pyodide-migration
sra405 May 31, 2024
d93fd44
renaming and moving files temporarily to try and simplify the merge c…
loiswells97 Oct 1, 2024
8512211
Merge branch 'main' into pyodide-migration
loiswells97 Oct 1, 2024
09a9c60
reverting and fixing a few things post merge
loiswells97 Oct 1, 2024
cf403ca
some test fixing
loiswells97 Oct 1, 2024
3a50dc3
trying to fix cypress tests
loiswells97 Oct 3, 2024
34fed91
remove lingering only from cypress tests
loiswells97 Oct 3, 2024
efd0544
be more defensive looping over project components
loiswells97 Oct 3, 2024
19be64a
Matplotlib support (#1087)
loiswells97 Oct 8, 2024
17dfe0a
Fix dynamic pyodide switching with multiple files (#1097)
create-issue-branch[bot] Oct 9, 2024
41ef481
Web component pyodide support (#1090)
loiswells97 Oct 10, 2024
e582b65
Bump pyodide to latest version (#1098)
create-issue-branch[bot] Oct 11, 2024
a28999d
feat(pocs): initial trials and getting the wc working on 3011 and 301…
sra405 Oct 15, 2024
b32205f
Webpack v5 bump (#1096)
loiswells97 Oct 15, 2024
75878f1
Merge branch 'pyodide-migration' into pyodide-headers-webpack-4
sra405 Oct 15, 2024
de5068d
working PyodideWorker
sra405 Oct 15, 2024
60c9c3f
refactor(pyodide-libraries): restructure `public` directory to ensure…
sra405 Oct 16, 2024
a674de4
fix(PyodideWorker): made an error with the refactor
sra405 Oct 16, 2024
732c77e
general tidy up
sra405 Oct 16, 2024
5f2998a
fix(PyodideWorker): minor fixes needed after tidy up and refactor
sra405 Oct 16, 2024
28a493a
PyodideRunner - remove console log
sra405 Oct 16, 2024
c0213cd
initial console functionality
loiswells97 Oct 16, 2024
5feae09
fixing autorun
loiswells97 Oct 16, 2024
be7fe9a
adding iframe console into actual editor and getting it autorunning w…
loiswells97 Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Webpack v5 bump (#1096)
closes #1074
  • Loading branch information
loiswells97 authored Oct 15, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit b32205f17b8b02b1fcd8d41b3529cc3dccb6e5d2
3 changes: 1 addition & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -92,9 +92,8 @@ jobs:
with:
install: false
start: |
yarn start
yarn start:wc
wait-on: "http://localhost:3010, http://localhost:3011"
wait-on: "http://localhost:3011"
quiet: true
env:
REACT_APP_API_ENDPOINT: "https://test-editor-api.raspberrypi.org"
6 changes: 2 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -123,11 +123,9 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build site and WC bundle
- name: Build WC bundle
run: |
if [[ "${{ inputs.environment }}" == "production" ]]; then
yarn build
else
if [[ "${{ inputs.environment }}" != "production" ]]; then
yarn build:dev
fi
yarn build:wc
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Changed

- Upgrade to `webpack 5` (#1096)
- Bump `pyodide` to `v0.26.2` (#1098)

### Fixed
778 changes: 0 additions & 778 deletions config/webpack.config.js

This file was deleted.

54 changes: 8 additions & 46 deletions config/webpackDevServer.config.js
Original file line number Diff line number Diff line change
@@ -15,55 +15,22 @@ const sockPort = process.env.WDS_SOCKET_PORT;
module.exports = function (proxy, _allowedHost) {
return {
allowedHosts: "all",
// Enable gzip compression of generated files.
compress: true,
// Enable hot reloading server. It will provide WDS_SOCKET_PATH endpoint
// for the WebpackDevServer client so it can learn when the files were
// updated. The WebpackDevServer client is included as an entry point
// in the webpack development configuration. Note that only changes
// to CSS are currently hot reloaded. JS changes will refresh the browser.
hot: true,
// Use 'ws' instead of 'sockjs-node' on server since we're using native
// websockets in `webpackHotDevClient`.
webSocketServer: "ws",
// It is important to tell WebpackDevServer to use the same "publicPath" path as
// we specified in the webpack config. When homepage is '.', default to serving
// from the root.
// remove last slash so user can land on `/test` instead of `/test/`
devMiddleware: {
publicPath: paths.publicUrlOrPath.slice(0, -1),
},
static: {
// By default WebpackDevServer serves physical files from current directory
// in addition to all the virtual build products that it serves from memory.
// This is confusing because those files won’t automatically be available in
// production build folder unless we copy them. However, copying the whole
// project directory is dangerous because we may expose sensitive files.
// Instead, we establish a convention that only files in `public` directory
// get served. Our build script will copy `public` into the `build` folder.
// In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%:
// <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
// In JavaScript code, you can access it with `process.env.PUBLIC_URL`.
// Note that we only recommend to use `public` folder as an escape hatch
// for files like `favicon.ico`, `manifest.json`, and libraries that are
// for some reason broken when imported through webpack. If you just want to
// use an image, put it in `src` and `import` it from JavaScript instead.
directory: paths.appPublic,
publicPath: paths.publicUrlOrPath,
// By default files from `directory` will not trigger a page reload.
// Reportedly, this avoids CPU overload on some systems.
// https://github.com/facebook/create-react-app/issues/293
// src/node_modules is not ignored to support absolute imports
// https://github.com/facebook/create-react-app/issues/1065
watch: {
ignored: ignoredFiles(paths.appSrc),
},
},
https: getHttpsConfig(),
host,
historyApiFallback: {
// Paths with dots should still use the history fallback.
// See https://github.com/facebook/create-react-app/issues/387.
disableDotRule: true,
index: paths.publicUrlOrPath,
},
@@ -76,44 +43,39 @@ module.exports = function (proxy, _allowedHost) {
"Cross-Origin-Embedder-Policy": "require-corp",
},
client: {
// Silence WebpackDevServer's own logs since they're generally not useful.
// It will still show compile warnings and errors with this setting.
logging: "none",
overlay: false,
webSocketURL: {
// Enable custom sockjs pathname for websocket connection to hot reloading server.
// Enable custom sockjs hostname, pathname and port for websocket connection
// to hot reloading server.
hostname: sockHost,
pathname: sockPath,
port: sockPort,
},
},
// `proxy` is run between `before` and `after` `webpack-dev-server` hooks
proxy,
onBeforeSetupMiddleware(devServer) {
setupMiddlewares: (middlewares, devServer) => {
// Keep `evalSourceMapMiddleware` and `errorOverlayMiddleware`
// middlewares before `redirectServedPath` otherwise will not have any effect
// This lets us fetch source contents from webpack for the error overlay
devServer.app.use(evalSourceMapMiddleware(devServer));
middlewares.unshift(evalSourceMapMiddleware(devServer));
// This lets us open files from the runtime error overlay.
devServer.app.use(errorOverlayMiddleware());
middlewares.unshift(errorOverlayMiddleware());

if (fs.existsSync(paths.proxySetup)) {
// This registers user provided middleware for proxy reasons
require(paths.proxySetup)(devServer.app);
}
},
onAfterSetupMiddleware(devServer) {

// Redirect to `PUBLIC_URL` or `homepage` from `package.json` if url not match
devServer.app.use(redirectServedPath(paths.publicUrlOrPath));
middlewares.push(redirectServedPath(paths.publicUrlOrPath));

// This service worker file is effectively a 'no-op' that will reset any
// previous service worker registered for the same host:port combination.
// We do this in development to avoid hitting the production cache if
// it used the same host and port.
// https://github.com/facebook/create-react-app/issues/2272#issuecomment-302832432
devServer.app.use(noopServiceWorkerMiddleware(paths.publicUrlOrPath));
middlewares.push(noopServiceWorkerMiddleware(paths.publicUrlOrPath));

return middlewares;
},
};
};
6 changes: 6 additions & 0 deletions cypress.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { defineConfig } from "cypress";
import dotenv from "dotenv";

dotenv.config();

export default defineConfig({
e2e: {
@@ -20,4 +23,7 @@ export default defineConfig({
openMode: 0,
},
},
env: {
REACT_APP_API_ENDPOINT: process.env.REACT_APP_API_ENDPOINT,
},
});
Loading
Loading