Giter Site home page Giter Site logo

westonsteimel / python-editor-next Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microbit-foundation/python-editor-v3

0.0 1.0 0.0 9.3 MB

Alpha version of the next Micro:bit Educational Foundation Python editor

Home Page: https://python.microbit.org/v/alpha/

License: MIT License

HTML 0.41% CSS 0.36% TypeScript 91.26% Shell 0.02% JavaScript 0.63% Python 7.29% Dockerfile 0.04%

python-editor-next's Introduction

Alpha version of the micro:bit Python editor

This project is an alpha version of the next major version of the editor. 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.

For more background about how this editor relates to the original Python Editor project, see this explanation.

This project is a web-based code 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.

Screenshot of the Python editor showing the welcome message and code editing area

You can try out the micro:bit-branded deployment of the alpha at https://python.microbit.org/v/alpha

Developing the editor

The editor is written in TypeScript using React. We use the Chakra UI component library and CodeMirror 6 editor component.

To learn React, check out the React documentation.

To learn TypeScript, check out the TypeScript documentation.

To learn more about Chakra UI check out the component library documentation.

CodeMirror 6 has great documentation. The system guide is a particularly useful overview of the key concepts.

The project was bootstrapped with Create React App. You can learn more in the Create React App documentation.

If you use Visual Studio Code you might find the devcontainer included in this repository a useful option to get an automatically configured development environment. Find out more about containers and Visual Studio Code.

Deployments

The editor is deployed by CircleCI.

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.

Building and running the editor

  1. Ensure you have a working Node.js environment. We recommend using the LTS version of Node.
  2. Checkout this repository.
  3. Install the dependencies via npm install.
  4. Choose from the NPM scripts documented below.

If you're using the devcontainer with Visual Studio Code then the "Clone a repository from GitHub in a Container Volume" action will address steps 1 through 3.

npm start

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.

npm test

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.

npm run test:e2e

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.

npm run 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.

License

This software is under the MIT open source license.

SPDX-License-Identifier: MIT

Binaries for MicroPython are included for micro:bit V1 (license) and micro:bit V2 (license). Both are MIT licensed.

Python diagnostics and autocomplete use a fork of Microsoft's Pyright type checker which has been modified by us to run as a Web Worker. Pyright is © Microsoft Corporation and used under an MIT license.

We use dependencies via the NPM registry as specified by the package.json file under common Open Source licenses.

Full details of each package can be found by running license-checker:

$ npx license-checker --direct --summary --production

Omit the flags as desired to obtain more detail.

Code of Conduct

Trust, partnership, simplicity and passion are our core values we live and breathe in our daily work life and within our projects. Our open-source projects are no exception. We have an active community which spans the globe and we welcome and encourage participation and contributions to our projects by everyone. We work to foster a positive, open, inclusive and supportive environment and trust that our community respects the micro:bit code of conduct. Please see our code of conduct which outlines our expectations for all those that participate in our community and details on how to report any concerns and what would happen should breaches occur.

python-editor-next's People

Contributors

microbit-matt-hillsdon avatar daniasuheimat avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.