Package: rads
Python access to the Radar Altimeter Database SystemPython library for access to theRadar Altimeter Database System(RADS).Current FeaturesLoading of the RADS XML files.Planned FeaturesLoading of RADS data.DocumentationDocumentation for PyRADS can be found athttps://pyrads.readthedocs.io/en/latest/or inPDFandEpubformats.InstallationOnly POSIX complaint systems are officially supported.  PyRADS should work on Microsoft Windows but it has not been tested.UDUINITS2In addition to CPython 3.6+ PyRADS requires theUDUNITS2library and header files to be installed.  Below are instructions for accomplishing this on some common systems:Ubuntu and Debian# apt-get install libudunits2-devRed Hat and Fedora# yum install udunits2-develMac OS X (using _homebrew)$ brew install udunitsMicrosoft WindowsNo binary is provided for Windows soUDUNITS2must be built fromsource.libxml2PyRADS also optionally requireslibxml2which it uses for better error messages and slightly faster RADS XML file loading.Ubuntu and Debian# apt-get install libxml2Red Hat and Fedora# yum install libxml2Mac OS X (using _homebrew)$ brew install libxml2PyRADSNow that the system dependencies have been installed PyRADS can be installed fromPyPI:$ pip install radsor iflibxml2is installed$ pip install rads[lxml]UsagePyRADS is currently in development, and will remain so until its first v1.0.0
release.  Until then the public API may change from one minor release to another.  However, patch releases will not change the public API.Loading RADS configuration filesCurrently, PyRADS is only capable of loading the RADS XML files.  Loading data
is planned for a future release.The easiest way to load the RADS v4 XML files is to ensure that theRADSDATAROOTenvironment variable is set with the path to the RADS
data root as documented in the officialRADS User Manual.  Once this is
done, PyRADS can load all the same XML files that the official RADS
implementation does by default (it will also load PyRADS specific XML files
as well).>>>importrads>>>rads_config=rads.load_config()The files that will be loaded are (on Unix):<dataroot>/conf/rads.xml/etc/pyrads/settings.xml~/.rads/rads.xml~/.config/pyrads/settings.xmlrads.xmlpyrads.xmlwhere each file can override or append to the settings of the previous files.If not using Unix, use the rads.config_files() function to retrieve
your platform specific list.To add XML files to this:>>>importrads>>>xml_files=rads.config_files()+['path/to/custom/file.xml']>>>rads_config=rads.load_config(xml_files=xml_files)The RADS data root can also be overridden:>>>importrads>>>rads_config=rads.load_config(dataroot='/path/to/custom/dataroot')The entire RADS config can be displayed in human readable form with:>>>importrads>>>print(rads.load_config().full_string())For more information on loading of RADS v4 XML configuration files consult the
documentation.DevelopmentinvokePyRADS usesinvoketo make common development tasks easier.  For example the simplest way to get started working on PyRADS is to fork and clone the repository and then from within the main project directory:pip install invoke && invoke developThis will install all development requirements withpipand thus it is recommended to do this from avirtualenv.If you are working on a system wherelibxml2is installed you may wish to also installlxmlto provide faster XML parsing, but more importantly better error messages.  Withlxml, configuration parsing errors will be identified by line number.To get the full list tasks that can be run byinvoke:invoke -lFor example, to run the formatters (isortandblack), static checkers, and
all tests (with coverage report):invoke format check test --coverageNOTE: This should be ran before making any commits.The classicpython setup.py testis supported as well but only runs the unit tests.If on a non UNIX environment some of the tasks may fail.  If this happens you can use the--dryflag to print out the commands that would be ran and then adjust accordingly.toxWhile the aboveinvoketasks are relatively quick and are good for development they are insufficient to ensure PyRADS is working properly across all options (lxmlor not) and all supported Python versions.  For this atoxconfiguration is provided.  To run the full test suite simply run:toxOr if you have a recent version oftoxyou can speed up the process with:tox --parallel autoThedoc-pdfenvironment will fail ifXeTeX,xindy, andlatexmk.  This is usually fine.If all tests run by tox succeed (except fordoc-pdf) the TravisCI build should succeed as well.