Lvm Tan Clu Wrapper
Project description
lvmtan
Lvm Tan Clu Wrapper
Features
- CLU based wrapper for TwiceAsNice
- Uses a container for deployment and testing.
- Uses podman¹ for building the container.
¹ Setting an alias to use docker might work.
alias podman="sudo docker"
Note
As of version 0.0.9 the container is renamed from ubuntu_lvmt_tan to lvmtan
Quickstart
Beginning with version 0.0.9 the container doesnt have to be build, a container is download automatically from github.
git clone https://github.com/sdss/lvmtan.git
cd lvmtan
poetry run container_start --kill --name lvm.all
Prerequisites
Some linux distributions do not have python >= 3.7 as the standard python3 version.
Centos 8.X
# as root
yum install python38
# as user
python3.8 -m pip install --user --upgrade pip
pip3.8 install poetry
export PATH=~/.local/bin/:$PATH
OpenSuSe 15.2/15.3
# as root
zypper ar https://download.opensuse.org/repositories/devel:/languages:/python:/Factory/openSUSE_Leap_15.2/ devel_python
zypper install python39-devel
# as user
python3.9 -m ensurepip --default-pip # Alternatve: python3.9 -m venv ~/.local
pip3.9 install --upgrade pip
pip3.9 install poetry
export PATH=~/.local/bin/:$PATH
For running tests or containers a running RabbitMQ on localhost is expected with guest/guest
Download
git clone https://github.com/sdss/lvmtan.git
cd lvmtan
Build
# update local py env
poetry update
# build sdist & wheel
poetry build
# build tan container
poetry run container_build
# rebuild tan container from scratch
poetry run container_build --no-cache
Run container
# default config test.first.focus_stage-sim.conf
poetry run container_start
poetry run container_stop
# all stages config lvm.all-sim.conf
poetry run container_start --name lvm.all
poetry run container_stop --name lvm.all
# all stages config lvm.all-sim.conf and kill running container
poetry run container_start --kill --name lvm.all
# log of the running container, -f output appended data as the file grows.
podman logs -f lvm.all
# config test.first.focus_stage-svr.conf with real hardware
poetry run container_start --with-hw
poetry run container_stop
# derotator km with real hardware - check confige file config/test/derot/test.derot.km-dev.conf for correct MOD.TRAJ.CFG.CONNECTION.ADDRESS and MOD.TRAJ.CFG.CONNECTION.MODULE parameters
poetry run container_start --name test.derot.km --with-hw
# debug option, the local version is used instead of the latest github version when the container was built.
poetry run container_start --debug
Run tests
# run tests
poetry run pytest
# ... include slow tests with enabled log to stdout
poetry run pytest -p no:logging -s -v --runslow
# ... only test 02
poetry run pytest -k test_02_lvm_all.py
# ... without UI
DISPLAY= poetry run pytest -p no:logging -s -v -k test_02_lvm_all.py
Publish
# publish to pypi
poetry publish --username=USER --password=PASS
# build rpm package
poetry run python setup.py bdist_rpm
# build deb package - needs python3-stdeb
poetry run python setup.py --command-packages=stdeb.command bdist_deb
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sdss_lvmtan-0.2.5.tar.gz
(37.8 kB
view hashes)
Built Distribution
Close
Hashes for sdss_lvmtan-0.2.5-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a304c96819ca93da6d2e5176f092a81165a29f4bbda844064e78b898519ec5f8 |
|
MD5 | 4e8c3086c221a7ab1cffd0bfd12f318f |
|
BLAKE2b-256 | c09243ede4baf31edc6219a072bee73176b206e19d4ea780a6d152ba012e5e79 |