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:
Press
`Ctrl+Shift+P`(orCmd+Shift+Pon macOS) or open the command palette and type:> Dev Containers: Rebuild Container
This will build the development container using Docker by default.
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 Pathand change the value topodman.
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 p99-bluesky
pip install -e '.[dev]'