-
Notifications
You must be signed in to change notification settings - Fork 1
Intro 20260316
Set up Git directory:
$ mkdir -p ~/src/slaclab
$ cd ~/src/slaclab
$ git clone git@github.com:slaclab/slicops.git # OR
$ git clone https://github.com/slaclab/slicops
$ cd slicops
$ git checkout -b 209-<your-git-username> origin/209-participants-base
$ git push --set-upstream origin 209-<your-git-username>Add this to your ~/.bashrc:
export SLICOPS_APPTAINER_SIF=/sdf/group/ad/org/lfd/hla/apptainer/slicops.sifThen, verify it works:
$ source ~/.bashrc
$ echo $SLICOPS_APPTAINER_SIFMake sure you are running your own conda environment:
$ type condaThis will initialze your conda environment, and output commands to add to your bashrc:
$ bash etc/run.sh simControl-C this process, add to the commands printed to your bashrc, and then logout of ssh. Then log back in with the your ports forwarded:
ssh -L <your-vue-port>:127.0.0.1:<your-vue-port> <your-slac-user>@dev-srv09.slac.stanford.eduStart over starting all these processes.
These need to be run in three shell windows.
$ bash etc/run.sh sim
$ bash etc/run.sh vue
$ bash etc/run.sh apiMake sure you are still on your branch
$ git branch
* 209-<your-git-username>
209-partipants-base
mainMake sure your directory is at the repo root
cd ~/src/slaclab/slicops
ls -d .gitCopy the template to your branch
git show 20260316-t-09:slicops/sliclet/hello.py > slicops/sliclet/hello.pyCommit your previous changes and push them
Verify you environment
test -d .git && git branchgit commit -am 'intro slide 9: added a button'
git pushCopy the template
git show 20260316-t-13:tests/sliclet/hello_test.py > tests/sliclet/hello_test.pyTo run the test, run this command:
conda activate slicops
EPICS_CA_AUTO_ADDR_LIST=NO \
EPICS_CA_ADDR_LIST=127.0.0.1:$(( $SLICOPS_BASE_PORT + 3 )) \
pykern test tests/sliclet/hello_test.pyThis is not how we run tests normally. $(( $SLICOPS_BASE_PORT + 3 ))
adds three to your port so that it talks to your sim detector
process. You'll learn more about testing tomorrow, and we'll show how
we mock EPICS to avoid this extra config.