This project is a development version of the next major version of the editor. It is not ready for use.
This project is a web-based editor that targets the MicroPython version of the Python programming language. Code written with this editor is expected to run on the BBC micro:bit device.
The currently supported micro:bit Python editor is available at https://python.microbit.org/ and its source code can be found in GitHub at https://github.com/bbcmicrobit/PythonEditor.
The Python editor is MIT licensed.
The Adobe Source Code Pro font used for code is copyright Adobe and licensed under the SIL Open Font License.
The editor is written in TypeScript using React.
To learn React, check out the React documentation.
To learn TypeScript, check out the TypeScript documentation.
This early prototype uses the Chakra UI component library.
This project was bootstrapped with Create React App. You can learn more in the Create React App documentation.
The editor is deployed by CircleCI.
There is not yet a production deployment.
The main
branch is deployed to https://stage-python-editor-next.microbit.org/ on each commit.
Other branches (e.g. for PRs) are deployed to https://review-python-editor-next.microbit.org/{branch}. Special characters in the branch name are replaced by hyphens.
- Ensure you have a working Node.js environment. We recommend using the LTS version of Node.
- Checkout this repository.
- Install the dependencies via
npm install
. - Choose from the NPM scripts documented below.
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
If you have a connected micro:bit device, then setting the environment variable TEST_MODE_DEVICE=1
will enable additional tests that will connect to your micro:bit. The tests will overwrite programs and data on the micro:bit.
Launches the test runner in the interactive watch mode running the end to end tests.
These are excluded from the normal test run.
The tests expect the app to already be running on http://localhost:3000, for example via npm start
.
We use Puppeteer and the helpers provided by Testing Library.
The CI tests run these end-to-end tests against a production build.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.