Setup Developer Environment#

This document outlines the steps to set up a developer environment for the p99-bluesky project. You can choose to develop within a VSCode devcontainer or using a local virtual environment.

Clone the Repository#

To clone the repository locally, use Git

SSH (Recommended):

git clone git@github.com:DiamondLightSource/p99-bluesky.git

HTTPS:

git clone https://github.com/DiamondLightSource/p99-bluesky.git

Tip

SSH is the recommended method. To set up SSH keys for Git, follow the instructions : here.

Install Dependencies#

You can choose to develop on your host machine using a venv (Python 3.10 or later required) or within a container using VSCode

On a Diamond Light Source terminal:

module load vscode
code ./p99-bluesky

Once VSCode is running:

  1. Press `Ctrl+Shift+P` (or Cmd+Shift+P on macOS) or open the command palette and type:

    > Dev Containers: Rebuild Container
    

    This will build the development container using Docker by default.

  2. To change the container runtime to Podman (recommended at DLS), press `Ctrl+Shift+P` again and type:

    > Dev Containers: Settings
    

    In the settings, navigate to User > Dev > Containers: Docker Path and change the value to podman.

Tip

  • For development on Windows, you can use WSL and Docker Desktop. More details are available here.

  • For setting up VSCode devcontainers outside of Diamond Light Source, refer to this guide.

Note

If you are at DLS and Podman is not set up, follow these instructions to install Podman and configure it for devcontainer features. Then, follow the general devcontainer setup instructions..

python3.11 -m venv venv_p99
source venv_p99/bin/activate
cd p99-bluesky
pip install -e '.[dev]'