SKA Testing Runway¶
This repository contains the set of python libraries, charts and other artifacts useful to create a “runway” for implementing end to end tests on SKA software.
Usage and Installation¶
The ska-ser-skallop package can be installed either as a “build out” testing system (default) or as a “build in” testing system. In order to run it as a build in testing system:
pip install ska-ser-skallop[bit]
This will install skar-ser-skallop together with pytango and related dependencies so that the test can run inside the kubernetes cluster as a pytango client.
Otherwise, you can run the test script outside the kubernetes cluster through a tango bridge connected to a tangogql service running as part of taranta.
pip install ska-ser-skallop
To use it as a build out system one can run tests on a remote cluster using the following bash script (linux only)
. setenv.sh
Assuming your vpn is set, follow the command prompts and select the branch, telescope and webjive username and password.
Once that has been set the output will give you a set of env variables (you can copy that in a .env file also for IDE use).
To test that you can connect to the cluster run:
pingmvp
Development¶
Requirements¶
Platform:
Python Interpreter: > 3.8
OS = Linux
Development tools:
Make
virtualenv
pip
setuptools
pip-tools (via pip and virtualenv/conda)
pipdeptree (via pip and virtualenv/conda)
VScode (optional)
conda (optional)
There are three layers of installations based on the required dependencies
requirements.txt: The minimum amount of dependencies necessary to deliver the software as a self standing shared library:
make install
test-requirements.txt: The additional dependencies needed to run CI tests on the software:
make install_test
doc-requirements.txt and dev-requirements.txt: The additional dependencies needed to create software documentation and perform development tasks.
make install_dev
The requirements files are determined by the input dependencies defined in dependencies folder (e.g requirements.in
, dev-requirements.in
etc). Thus in order to determine the requirements, you define the needed packages in the *.in
files which then translates to requirements files using the pip tools. This ensures a separation between physical configuration and functional configuration.
Set Up¶
(Linux based)
git clone https://gitlab.com/ska-telescope/ska-ser-skallop.git
cd ska-ser-skallop
The recommended virtualization tool is virtualenv:
make venv/
source ./venv/bin/activate
You can also use conda as your virtual environment tool. Once you have conda installed:
make cenv/
conda activate ./cenv
To update conda with new requirements:
make conda_update
Lastly, you can use docker as virtualization tool:
make devc
make attach_devc
This project manages dependencies using pip-tools. In order to activate pip tools you first need to install this into your newly create virtual environment:
make setup
Testing¶
To run tests during development:
make test_dev
Ci tests are run using the
make test
command that does not involve installation of development and documentation dependencies$1
Writing documentation¶
Sphinx is used to generate documentation.
Design: Located inside src
API: docstrings are provided inside the modules and then automatically generated inside the docs
Development¶
VSCode is recommended as a IDE tool with Linux as OS. In windows platforms remote containers can be used.