Installation

It is easiest to start installation with a fresh conda environment. [1] For any packages that require installation of pre-compiled content (such as Qt, PyQt, and others), install those packages with conda. For pure Python code, use pip [2] (which will be installed when the conda environment is created).

The project comes pre-configured to install the content in the src/instrument directory as a package named instrument. This name can be changed (by editing the name key in the pyproject.toml file) before running the pip step. If the package is installed under a different name, other code (such as qserver/qs_host.sh) will need to be edited to find the new package name.

Note

All of these commands start with the current working directory set to the base directory of this repository, the one with with pyproject.toml file and src directory.

Install for routine data acquisition

These commands create a conda environment and then install all packages required by this instrument package for routine data acquisition.

Tip

Replace the text model_instrument_env with the name you wish to use for this conda environment.

1export INSTALL_ENVIRONMENT_NAME=model_instrument_env
2conda create -y -n "${INSTALL_ENVIRONMENT_NAME}" python pyqt=5 pyepics
3conda activate "${INSTALL_ENVIRONMENT_NAME}"
4pip install -e .

The pip install -e . command [3] means the code will be installed in editable mode. You can continue to change the content in the src/instrument directory without need to reinstall after each change.

Install for development

For development activities, replace the pip command above with:

pip install -e .[dev]

Install everything

For development and other activities, replace the pip command above with:

pip install -e .[all]