0.16.1 • Published 2 years ago

moocfi-python-editor v0.16.1

Weekly downloads
153
License
Apache-2.0 OR MIT
Repository
github
Last release
2 years ago

Moocfi Python Editor

NPM version Cypress End-2-End Tests

Moocfi Python Editor is a React component that provides an in-browser editing, running and testing environment for TestMyCode python courses. The editor is based on Pyodide python runtime environment that is run using webworkers.

Usage

Install with npm install moocfi-python-editor.

The editor component can be used in a following way:

import { ProgrammingExercise } from "moocfi-python-editor"

const App = () => {
  // ...

  return (
    <ProgrammingExercise
      organization="organization-slug"
      course="course-name"
      exercise="exercise-name"
      userId="user-id"
      token="user-token"
    />
  )
}

Required properties:

  • organization, course and exercise Define which TMC exercise will be loaded.
  • userId and token are used to identify the current user.

Optional properties:

  • debug Show and log debug information if set to true.
  • language Editor's localization. Currently supports en (default) and fi.
  • height Height of the editor. Defaults to 400px.
  • outputHeight Maximum height of the output content in pixels.
  • onExerciseDetailsChange Callback function that provides details about the exercise. These details vary by user.

Setting up the project

  1. Clone the project on GitHub
  2. Go to the project root directory and run npm ci & npm run encode:worker
  3. Go to the example directory and run npm ci

Running the project

To run the project in example environment, go to the example directory and run npm start.

If you make any changes to the worker, you will always need to run the encode:worker command again.

License

This project is licensed under either of

at your option.

0.16.0

2 years ago

0.16.1

2 years ago

0.15.3

2 years ago

0.15.2

3 years ago

0.15.0

3 years ago

0.15.1

3 years ago

0.14.0

3 years ago

0.13.4

3 years ago

0.13.3

3 years ago

0.13.2

3 years ago

0.13.1

3 years ago

0.13.0

3 years ago

0.12.5

3 years ago

0.12.4

3 years ago

0.12.3

3 years ago

0.12.2

3 years ago

0.11.1

3 years ago

0.12.0

3 years ago

0.12.1

3 years ago

0.8.7

3 years ago

0.11.0

3 years ago

0.10.2

3 years ago

0.10.1

3 years ago

0.9.2

3 years ago

0.9.2-pre.1

3 years ago

0.9.2-pre.2

3 years ago

0.9.2-pre.3

3 years ago

0.9.2-pre.4

3 years ago

0.9.2-pre.5

3 years ago

0.9.2-pre.6

3 years ago

0.9.2-pre.0

3 years ago

0.9.0

3 years ago

0.9.1

3 years ago

0.9.0-pre.12

3 years ago

0.9.0-pre.13

3 years ago

0.9.0-pre.11

3 years ago

0.9.0-pre.10

3 years ago

0.9.0-pre.9

3 years ago

0.9.0-pre.8

3 years ago

0.9.0-pre.7

3 years ago

0.9.0-pre.3

3 years ago

0.9.0-pre.4

3 years ago

0.9.0-pre.5

3 years ago

0.9.0-pre.6

3 years ago

0.9.0-pre.2

4 years ago

0.9.0-pre.1

4 years ago

0.9.0-pre.0

4 years ago

0.8.6

4 years ago

0.8.5

4 years ago

0.8.4

4 years ago

0.8.3

4 years ago

0.8.1

4 years ago

0.8.2

4 years ago

0.8.0

4 years ago

0.7.28

4 years ago

0.7.26

4 years ago

0.7.25

4 years ago

0.7.27

4 years ago

0.7.24

4 years ago

0.7.23

4 years ago

0.7.22

4 years ago

0.7.21

4 years ago

0.7.20

4 years ago

0.7.19

4 years ago

0.7.18

4 years ago

0.7.17

4 years ago

0.7.16

4 years ago

0.7.13

4 years ago

0.7.15

4 years ago

0.7.14

4 years ago

0.7.11

4 years ago

0.7.10

4 years ago

0.7.9

4 years ago

0.7.12

4 years ago

0.7.8

4 years ago

0.7.7

4 years ago

0.7.6

4 years ago

0.7.5

4 years ago

0.7.4

4 years ago

0.7.3

4 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.7

4 years ago

0.6.6

4 years ago

0.6.3

4 years ago

0.6.5

4 years ago

0.6.4

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.5.8

4 years ago

0.5.7

4 years ago

0.6.0

4 years ago

0.5.6

4 years ago

0.5.5

4 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago