Developer installation (Anaconda Cloud)
Developer installations are useful for those who want to customise the labscript suite.
Note
You need not fork, clone, and install editable versions of all labscript suite repositories to customise your installation and/or contribute changes back to the base repositories. For example, if you only want to develop custom labscript device drivers, you might only fork and clone the labscript-devices repository. Moreover, there is now an option to write and use custom labscript device drivers outside of the labscript-devices installation directory.
In this example, we will use an existing conda environment named labscript
.
Skip the first line/step if continuing on from the instructions to set up this environment.
Attention
For the following to work correctly on Windows, you need to use the Anaconda Powershell Prompt, not the Anaconda Prompt. This will be the case until the following bugs are fixed:
Quick start
Note
After the first line, the current directory is ommited from the command prompt for brevity.
(base) C:\Users\wkheisenberg> mkdir labscript-suite
(base) > cd labscript-suite
(base) > git clone https://github.com/wkheisenberg/labscript
(base) > git clone https://github.com/wkheisenberg/runmanager
(base) > git clone https://github.com/wkheisenberg/blacs
(base) > git clone https://github.com/wkheisenberg/lyse
(base) > git clone https://github.com/wkheisenberg/runviewer
(base) > git clone https://github.com/wkheisenberg/labscript-devices
(base) > git clone https://github.com/wkheisenberg/labscript-utils
(base) > conda activate labscript
(labscript) > conda config --env --append channels labscript-suite
(labscript) > conda install setuptools-conda pyqt pip desktop-app
(labscript) > setuptools-conda install-requirements ^
labscript runmanager blacs lyse runviewer labscript-devices labscript-utils
(labscript) > pip install --no-build-isolation --no-deps ^
-e labscript -e runmanager -e blacs -e lyse ^
-e runviewer -e labscript-devices -e labscript-utils
(labscript) > labscript-profile-create
(labscript) > desktop-app install blacs lyse runmanager runviewer
(labscript) > conda remove conda # optional but highly recommended
Detailed instructions
The following is a detailed explanation of the steps provided in the Quick start section above.
Fork the labscript-suite repositories you want to develop using the GitHub online interface. Below we will include all repositories (except the labscript-suite metapackage).
Attention
Recent changes in Github’s online interface mean that version tags are not copied into new forks by default. These tags are necessary to properly resolve component versions when installing from your fork. To override this behavior, ensure the
Copy master branch only
checkbox is unchecked.Manually clone the forked repositories using
git clone
.Note
This will set your forked repository(ies) to be the ‘origin’ remote.
Use the
setuptools-conda install-requirements
command to introspect the dependencies from the cloned repositories.Now use
pip
to install the cloned repositories in develop mode without build isolation or installing dependencies viapip
:C:\Users\wkheisenberg\labscript-suite> pip install --no-build-isolation --no-deps ^ -e labscript -e runmanager -e blacs -e lyse -e runviewer -e labscript-devices -e labscript-utils
Note
On Linux / macOS the line continuation character is
\
rather than^
.For each repository, set the upstream remote to the base labscript-suite repository:
C:\Users\wkheisenberg\labscript-suite> cd blacs C:\Users\wkheisenberg\labscript-suite> git remote add upstream https://github.com/labscript-suite/blacs.git C:\Users\wkheisenberg\labscript-suite> cd ..
Repeat for the other repositories.
Continue from step 4 (create the labscript profile) in the Regular installation (Anaconda Cloud) instructions.
(Optional, but Recommended) Remove
conda
and its dependencies from thelabscript
environment. This will allow you to use the standard Anaconda Prompt again with this environment without issues. The particular issue being addressed is thatsetuptools-conda
installs theconda
package in a non-base environment, which can cause issues. Once the installation is complete,setuptools-conda
and its dependices are no longer needed and can be safely removed using:conda remove conda
Note that this command will only work if you use the Anaconda Powershell Prompt and have installed the labscript suite into a non-base environment as described above.
Updating a developer installation
This assumes you have already completed the developer installation above and have:
Forked a labscript suite repository on GitHub;
Cloned the repository;
Set your fork to be the ‘origin’ remote; and
Set the labscript-suite base repository to be the ‘upstream’ remote.
All instructions for updating the labscript developer installation are identical to those for a pip developer installation.