1. casa
  2. casa6

Source

readme.md

CASAtests

CASAtests is a self-contained python module that provides special test scripts for CASA. Many of the tests in this package depend on the casatestutils python module being pre-installed in your system.

Install dependencies

First make sure you have installed the CASAtools, the CASAtasks and the CASAtestutils before you run the tests. Below is a quick guide on how to install them with pip.

-bash-4.2# python3 -m venv casa6_0
-bash-4.2# source casa6_0/bin/activate
-bash-4.2# pip3 install --extra-index-url https://casa-pip.nrao.edu/repository/pypi-casa-release/simple casatools
-bash-4.2# pip3 install --extra-index-url https://casa-pip.nrao.edu/repository/pypi-casa-release/simple casatasks
-bash-4.2# pip3 install --extra-index-url https://casa-pip.nrao.edu/repository/pypi-casa-release/simple casatestutils

Data sets for the tests

Download the datasets from https://open-bitbucket.nrao.edu/scm/casa/casatestdata.git

Add to $HOME/.casa/config.py the following line, pointing to the locations of your datasets

-bash-4.2# cat $HOME/.casa/config.py
datapath=[ "/your-data-dir/casatestdata/","/your-data-dir/mydata/"]

Run tests

All tests added to casatests must be able to run with Python.

Run a single test using Python

The following performance test will look for a dataset located in <your_data_dir>/visibilities/alma/. Make sure your config.py datapath has an entry pointing to <your_data_dir>.

-bash-4.2# python3 ./casatests/performance/test_perf_tclean_mem_setweighting.py

Run a single test using a casalith tarball; with python3, casa or runtest.py

-bash-4.2# ./casa-6.1.0/bin/python3 ./casa6/casatests/regression/test_regression_alma_M100_sd.py
-bash-4.2# ./casa-6.1.0/bin/casa -c ./casa6/casatests/regression/test_regression_alma_M100_sd.py
-bash-4.2# ./casa-6.1.0/bin/casa -c ./casa-6.1.0/lib/py/lib/python3.6/site-packages/casatestutils/runtest.py ./casa6/casatests/regression/test_regression_alma_M100_sd.py

Run the ALMA stakeholders tests

-bash-4.2# ./casa-6.1.0/bin/casa -c ./casa6/casatests/stakeholder/test_stk_alma_pipeline_imaging.py

Add a new test to casatests

The following is the naming convention for tests added to the directories inside casatests.

performance: **Tests related to memory, I/O, runtime, number of file descriptors, etc. **

  • test_perf_[taskname]_[description]_[...].py
  • e.g. test_perf_tclean_mem_setweighting.py
  • e.g. test_perf_tclean_runtime_cube_model_write.py

stakeholder: Tests exercising specific stakeholders use-cases

  • test_stk_[stakeholder]_[taskname]_[description].py
  • e.g. test_stk_alma_pipeline_tclean_cycle8.py

regression: Regression scripts, multi-task tests

  • test_regression_[description]_[...].py
  • e.g. test_regression_alma_m100_if.py
  • e.g. test_regression_alma_m100_sd.py

pipeline: Tests exercising the pipelines

  • test_pipe_[telescope]_[use-case]_[description]_[...].py
  • e.g. test_pipe_vlass_calib_[...].py
  • e.g. test_pipe_alma_full_ephem.py

benchmark: Tests measuring benchmarks of CASA tasks/tools

  • test_bench_[description]_[...].py

Add shortcut

Everything looks good. We'll let you know here if there's anything you should know about.