You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Developing applications on your local machine is strongly recommended as it saves on headaches with using shared OPIs and allows for robust testing on a simulated machine before launching in production.

Note that if there are sudden unexplained errors in your program, it is possible that one of these libraries was updated. In most cases, all you'll need is a git pull from the relevant repo. LCLS Tools specifically also needs the pip upgrade


Prerequisites

It is recommended that you already have working conda installation and have beginner's knowledge of conda environments, as well as git version control.

If you are unfamiliar with conda, consider reading the Getting Started with Conda page. Additionally, a useful conda cheatsheet can be found here

Installing PyDM

The basic steps can be found in the official documentation, but some quality of life improvements include:

  • Setting an alias in your native system to launch the pydm conda environment
    • For example, my ~/.zshrc (my Mac's default shell is zsh for some reason) has the line alias pydmenv="conda activate pydm-environment"
  • Learning how to save environment variables in your conda environment (note that you need to scroll down for Mac/linux)
    • That internal file will need the export QT_MAC_WANTS_LAYER=1 from the installation page
    • I personally also added an alias to launch designer to save keystrokes (alias designer='open $CONDA_PREFIX/bin/Designer.app')

Installing Simulacrum

These steps should all be done in your pydm conda environment unless you don't need/intend to use PyDM

  1. Run conda install --update-all --force-reinstall -y -c conda-forge bmad
  2. Run git clone git@github.com:slaclab/lcls-lattice.git
    1. This repo can live wherever, just remember where it lives
  3. Set the LCLS_LATTICE environment variable to wherever the repo in step 2 lives
  4. Run git clone git@github.com:slaclab/simulacrum.git
  5. Run python <service directory>/<service>.py for any service you want running
    1. This will eat a terminal tab. I strongly advise against backgrounding because you'll need to kill the process eventually, and if you background it you'll either need to remember the process ID or find it later

Installing LCLS Tools

A shared library used by most (if not all) SRF software

  1. Run git clone git@github.com:slaclab/lcls-tools.git
  2. Navigate to that repo and run pip install --upgrade .
  • No labels