lvmagp

Versions Documentation Status Travis (.org) codecov

lvmagp which controls focuser, guide camera and mount.

Prerequisite

Install CLU by using PyPI.

$ pip install sdss-clu

Install RabbitMQ by using apt-get.

$ sudo apt-get install -y erlang
$ sudo apt-get install -y rabbitmq-server
$ sudo systemctl enable rabbitmq-server
$ sudo systemctl start rabbitmq-server

Install pyenv by using pyenv installer.

$ curl https://pyenv.run | bash

You should add the code below to ~/.bashrc by using your preferred editor.

# pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"

Also you need other actors for hardware communication, which are lvmtan, lvmpwi and lvmcam. (Currently you only need lvmtan.)

Quick start

Installation

Clone this repository.

$ git clone https://github.com/sdss/lvmagp
$ cd lvmagp

Set the python 3.9.1 virtual environment.

$ pyenv install 3.9.1
$ pyenv virtualenv 3.9.1 lvmagp-env
$ pyenv local lvmagp-env

Install poetry and dependencies.

$ pip install poetry
$ python create_setup.py
$ pip install -e .

Ping-pong test

Start lvmagp actor.

$ lvmagp start

In another terminal, type clu and lvmagp ping for test.

$ clu
lvmagp ping
07:41:22.636 lvmagp > 
07:41:22.645 lvmagp : {
    "text": "Pong."
}

Stop lvmagp actor.

$ lvmagp stop