Skip to main content

Web IDE

Looking for a lightweight, but powerful source code editor to help you contribute Python code to your project?

A Web IDE workspace provides exactly that: a source code editor, connected to a specific project. It runs in your browser and it comes with all the features you expect:

  • Code completion
  • Debuggers
  • Version control with Git
  • A large set of available extensions

Like a notebook, the Web IDE opens in a user-specific container, apart from the workflows in the rest of cloud.rapidminer.com. In this dedicated space, you can write and test your code, store your changes in Git, and share the results with the rest of the team only when you are ready:

  1. by using the workspace's Git functionality to share code with the project, and
  2. by using the rmpy library to share data with the Data Assets

Creating and debugging Python code in a workspace, before sharing it with the project via Git, can be the first steps in a workflow that includes the Execute Python operator, using the Python file as an external input.

info

While the container for notebooks may contain numerous cloned repositories, a Web IDE workspace is only connected to a single project.

Create a Web IDE workspace

To create a Web IDE workspace:

  1. From the left side menu, select Development > Workspaces, then
  2. click the Create New button on the top right and select Web.

Provide the following details:

  • Name: Give a name to your Web IDE workspace, in this case my-python-code.
  • Project: Choose a project from the dropdown list, if you created the workspace from outside a project.
  • CPU (vCores): The number of CPU cores available
  • Memory (GiB): The amount of memory available
  • Use GPU: Whether a GPU should be available (e.g., for Deep Learning)

Then click Create & Start.

Create a Web IDE workspace

Workspace status

Open new workspace

The green Status icon on the left implies that the workspace is running. Besides Open, additional actions are available from the dot menu on the far right:

  • Open: Open the workspace to reveal the source code editor.
  • Stop: Stop the workspace container to conserve resources, but persist the data, so you can Start later where you left off.
  • Edit: When the workspace is stopped, you can Edit it. The most likely reason is that you need to increase or decrease the resources (CPU/RAM) assigned to the workspace.
  • Delete: If you are done and all your files have been committed to the project, you can safely delete the workspace.

The red Status icon on the left implies that the workspace is stopped. Under Actions, click Start to restart the workspace.

Start a workspace

Open the workspace

To open the workspace, click Open and the editor appears:

Get started with VS Code for the Web

Here are some tips to get you started:

  • You can recall this welcome page at any time via the menu item Help > Welcome.

  • In the initial setup there are several files preceded with a dot (.) and also a folder that starts with a dot. Neither these files nor the contents of the folder are visible when you commit files to the project.

  • To create a file, you can select the menu item File > New File, or simply drag and drop a file from your laptop into the user interface.

Coding environment

When you open a new Python file, it comes with the following default settings:

  • a recent Python intepreter
  • the default coding environment, rm-base

If you wish to change the coding environment, go to the lower right corner of the workspace user interface and click on the current environment:

Python interpreter and coding environment

All the shared coding environments are then visible in a drop-down list. To create your own coding environment, you need to have the admin role.

tip

Since there is no metadata associated to your file, you may want to include information about the coding environment in the comments to your code.

Use Git to share code

info

When the workspace is created, the Git repository for the associated project is cloned automatically.

The workspace is only connected to a single project, i.e. a single Git repository. Since that repository was cloned automatically when you created the workspace, you only need to commit your work and push any commits to the project.

The procedure here is standard Git: you can use the menus or the terminal.

Git user interface

If after pushing your commits, you return to the project user interface, you will see that your work is now included in the Content tab. If you have committed a Python file, it is now ready for use by the Execute Python operator in the workflow designer.