Setup Developer Environment#
This document outlines the steps to set up a developer environment for the sm_bluesky
project. You can choose to develop within a VSCode devcontainer or using a local virtual environment.
Setup Github account#
If you have not yet had a Github account, please create one and upload your public SSH key to your Github account. You can get instruction from Github on how to generate SSH key and upload it to your account.
Clone the Repository#
To clone the repository locally, use Git
SSH (Recommended):
git clone ssh://git@github.com/DiamondLightSource/sm-bluesky
HTTPS:
git clone https://github.com/DiamondLightSource/sm-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 ./sm-bluesky
Once VSCode is running:
Change the container runtime to Podman (recommended at DLS). Press
Ctrl+Shift+P
(orCmd+Shift+P
on macOS) and type:Dev Containers: Settings
In the settings, navigate to
User > Dev > Containers: Docker Path
and change the value topodman
.Press
Ctrl+Shift+P
(orCmd+Shift+P
on macOS) to open the command palette and type:Dev Containers: Rebuild Container
This will build the development container.
Tip
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 sm-bluesky
pip install -e '.[dev]'