Utility functions that are of interest to and shared by the entire OpenQuake python code base.
Utility functions related to OpenQuake version information.
Return a string with the OpenQuake version infomation.
Version info data set to -1 will be ignored and assumed to have value zero. Release dates that lie more than 30 days in the future are ignored.
|Parameters:||version_data – A 4-tuple of integers that are the major, minor and sprint number respectively. The last datum is the number of seconds since epoch and represents the release date.|
|Returns:||A string with human readable OpenQuake version information.|
Various utility functions concerned with configuration.
Environment variable name for specifying a custom openquake.cfg. The file name doesn’t matter.
Call sys.exit() if no openquake configuration file is readable.
Context manager used to change the parameters of a configuration section on the fly. For use in the tests.
True if the given boolean setting is enabled in openquake.cfg
True if the setting is enabled in openquake.cfg, False otherwise
The configuration value for the given section and key or None.
A dictionary of key/value pairs for the given section or None.
Re-parse config files and refresh the cached configuration.
NOTE: Use with caution. Calling this during some phases of a calculation could cause undesirable side-effects.
Various utility functions related to splitting work into tasks and/or managing these.