JetBrains DataSpell 2021.1 Help

Manage your workspace

Whatever you do in JetBrains DataSpell, you do that in the workspace. Your workspace can contain local notebooks and other files, attached directories, and attached projects.

When you run JetBrains DataSpell for the very first time, you begin your work with attaching a directory to the workspace. If you have enabled the Experimental Features, you can also start with connecting to a Jupyter server.

The initial view of the DataSpell workspace
The initial view of the DataSpell workspace in the Experimental mode

Attach a directory

  1. Do one of the following:

    • Click the Attach new or existing directory link in the Workspace tool window.

    • Select File | Attach Directory from the main menu.

    • Click the Attach a directory icon on in the toolbar of the Workspace tool window.

  2. Select the target directory in your systems. Click Ok to confirm your choice.

    To attach a new directory in the workspace, select the new directory option in the Select Path dialog.

    Attaching a new directory
    Attaching a new directory

Once you attach a directory, it appears in the Workspace tool window. You can open files that reside in it, or create new files (see how to add new Jupyter notebooks and Python files ).

JetBrains DataSpell automatically configures a default virtual environment, so that you can execute notebooks and scripts. You can change it or create a new virtual evnironment.

You can also create projects and add them to your workspace. A project is an organizational unit that represents a complete software solution. It serves as a basis for coding assistance, refactoring, coding style consistency, and so on.

A project in JetBrains DataSpell is represented in the Directory Based Format. Such project directory contains the .idea directory, with the following files:

  • *.iml file that describes the project structure.

  • workspace.xml file that contains your workspace preferences.

  • A number of xml files. Each xml file is responsible for its own set of settings, that can be recognized by its name: projectCodeStyle.xml, encodings.xml, vcs.xml and so on.

    Thus, for example, adding a new run/debug configuration and changing encoding will affect two different xml files. This helps avoid merge conflicts when the project settings are stored in a version control system and modified by the different team members.

JetBrains DataSpell supports the following project formats: Python, R package, and R project.

Create a new project

  1. To create a project, do one of the following:

    • From the main menu, choose File | New Project

    • On the Welcome screen, click Create New Project

    New Project dialog opens.

    the New Project
  2. In the New Project dialog, select Python as a project type, then specify the project name and its location.

  3. Keep Create a main.py welcome script selected if you want JetBrains DataSpell to add the main.py file to your project. This file contains a very simple Python code sample and can be a starting point of your project.

  4. Next, in the Interpreter section, select a the way you want to configure a Python interpreter.

    • Select Existing to reuse any of your existing environments created earlier or outside of JetBrains DataSpell. Choose the target environment from the Environemnt list. If the desired environment is not found, click Open and provide a full path to it.

      Provide a full path to an existing environment

    • Select New to create a project with a new environment and choose the tool to be used to create a virtual environment. Specify the environment settings:

      Creating a new environment
      • Specify the location of the new Conda environment in the text field, or click Conda environment location and find location in your file system. Note that the directory where the new Conda environment should be located, must be empty!

      • Select the Python version from the list.

      • Specify the location of the Conda executable file in the text field, or click Conda executable location and find location in the Conda installation directory. You're basically looking for a path that you've used when installing Conda on your machine for example, C:\Users\jetbrains\Anaconda3\python.exe (Windows) or /Users/jetbains/.conda/envs/pythonProject1 (macOS).

      • Specify the location of the new virtual environment in the text field, or click Virtual environment location and find location in your file system. The directory for the new virtual environment should be empty.

      • Choose the base interpreter from the list, or click Choose the base interpreter and find a Python executable in the your file system.

        If JetBrains DataSpell detects no Python on your machine, it provides two options: to download the latest Python versions from python.org or to specify a path to the Python executable (in case of non-standard installation).

      • Select the Inherit global site-packages checkbox if you want to inherit your global site-packages directory. This checkbox corresponds to the --system-site-packages option of the virtualenv tool.

    • Select Configure later in if you want to create a new project without any Python interpreter. Note in this case, you will not be able to execute Python code and Jupyter notebooks. See Set up a working environment for more details.

  5. Click Create to complete the task.

Create a project from existing sources

  1. From the main menu, select File | Open.

  2. In the dialog that opens, select the directory that contains the desired source code. Note that applications created externally are marked with the regular directory icon a directory icon.

  3. Click OK.

  4. Specify whether you want the new project to be opened in a separate window or close the current project and reuse the existing one. See the section for details.

JetBrains DataSpell will be searching for a virtual environment in the source directory.
If no environment is detected, JetBrains DataSpell will set up the system interpreter for the project.

You can click the Configure a Python Interpreter link and select Interpreter Settings to configure a Python interpreter and install packages, if needed.

Open your project from disk

  1. From the main menu, select File |Open

  2. In the Open File or Project dialog that opens, find location of the desired project directory. The JetBrains DataSpell project are marked with JB IDE project and projects created in other IDEs or in a dedicated editor are marked with a directory icon.

  3. Select the way JetBrains DataSpell will open the project:

    • In the new window

    • In the current window replacing the default workspace

    • Attaching the project to the default workspace

  4. Click OK.

Open a project from Git

  1. Do one of the following:

    • On the Welcome Screen, click the Get from Version Control link.

    • From the main menu, select VCS | Get from Version Control.

  2. Select the version control system where your project is stored. Here it is Git:

    Open a project from VCS

  3. Specify the path to the repository and select the directory to which a project will be cloned. Alternatively, you can select GitHub on the left, login using your credentials, and select any project you want to work with.

  4. Click Clone.

Once you have opened the project, you should configure Python interpreter for it (in particular, create a virtual environment), and set up your project.

If your project was previously configured with any interpreter that is not currently available, JetBrains DataSpell shows a warning and provides two options: select an interpreter that fits the previous configuration or configure another Python interpreter:

A warning message with the options to configure a project interpreter

Note, when you open a project configured for the outdated version of the Python interpreter, the following message appears:

notification on the unsupported version of the Python interpreter

Click Configure Python interpreter to set up a valid one.

Reopen recent projects

  1. Call File | Open Recent from the main menu and select the desired project from the list.

  2. Specify whether you want to open the project in a new window, current window, or attache to the current project.

Close a project

  • From the main menu, select File | Close Project.

If you want to detach any of the projects that have been attached to a primary project in one window, just delete the target projects from the Project View.

Connect to a remote Jupyter server

  1. Connecting to a remote Jupyter server is an experimental feature of JetBrains DataSpell. To enable it, click Experimental features in the upper-right corner of JetBrains DataSpell or press Ctrl+Alt+S and select Experimental Features panel. Then select the corresponding checkbox, save the change, and restart the IDE.

  2. Click the Add connection icon on the toolbar of the Workspace tool window to establish a connection to a Jupyter server. The target URL should contain a server name or its address, and the access token.

    Add a remote connection to a Jupyter server
    Once the connection has established the server and its structure are shown in the Workspace tool window.
    Remote Jupyter server in the Workspace tool window

Last modified: 29 March 2021