CAPO (CASA, Archive, and Pipeline Options) for Python
PyCAPO is an implementation of SSA CAPO (CASA, Archive, and Pipeline Options) in Python. It is shipped as a library with a simple API and a command line utility that calls the library and produces results suitable for use in a shell script, enabling us to make quick CAPO enabled scripts.
CAPO is a configuration system that reads values from multiple property files, these files are delimited by the combination of two options to it, CAPO_PATH and CAPO_PROFILE:
CAPO_PATH is a colon delimited list of directories to search for property files, like ‘/home/casa/capo:/home/ssa/capo:/etc/capo’. The same property can be read from multiple files, and in this case the later property replaces the earlier property. CAPO_PATH can be given as an argument to the library or CLI app, or PyCAPO will look for a CAPO_PATH environment variable. If those two are missing PyCAPO defaults to ‘/home/casa/capo:/home/ssa/capo:$HOME/.capo’. PyCAPO skips over missing or unreadable property files (this is intentional).
CAPO_PROFILE describes the profile PyCAPO looks for, e.g. ‘test’, ‘staging’, ‘production’, and PyCAPO expects the property files on the CAPO_PATH it looks for to be named $profile.properties, e.g., /home/casa/capo/test.properties. CAPO_PROFILE can be an argument to the library or CLI app, or PyCAPO will look for a CAPO_PROFILE environment variable. If both of those are missing PyCAPO will complain and die (this is also intentional).
CAPO isn’t yet robust against things like profiles with spaces in their name, and it has only been tested under Linux and MacOS.
0.2.1 … dropped support for Python 3.3, added support for Python 3.7 0.1.1 … minor tweaks to prepare for pushing to pypi, no functional modifications 0.1.0 … initial version
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size pycapo-0.3.1-py3-none-any.whl (20.6 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size pycapo-0.3.1.tar.gz (18.6 kB)||File type Source||Python version None||Upload date||Hashes View|