CAPO (CASA, Archive, and Pipeline Options) for Python
Project description
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.1post1 … repackaging to fix upload to pypi 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
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
Built Distribution
Hashes for pycapo-0.2.1.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6693f95bb24ac18bb8606e1edb745db6dd7cea4e94664622bb34f9372cf7a16 |
|
MD5 | 5428c36d5966cae01b0b5ec8de1200d0 |
|
BLAKE2b-256 | bcce77e801815cb7c2c81cd9ed9766c508a0e1f2c2ce53f6eaeec7e8fa6965f3 |