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.
Engine: A collection of fundamental functions for initializing and running calculations.
Exception raised when a job is killed manually
Build a correspondence between the outputs in the datastore and the ones in the database.
|Parameters:||dstore – datastore|
Create a full job profile from a job config file.
a pair (job_id, oqparam)
When a SIGTERM is received, raise the MasterKilled exception with an appropriate error message.
Run a calculation.
Set up some system-wide loggers
Log stream handler
Log file handler
Log stream handler
A dispatcher to the database server.
Context manager adding and removing log handlers.
Initialize logs to write records with level level or above.
If a log file destination is specified, attempt to open the file in ‘append’ mode (‘a’). If the specified file is not writable, an IOError will be raised.
OpenQuake is an open-source platform for the calculation of hazard, risk, and socio-economic impact. It is a project of the Global Earthquake Model, nd may be extended by other organizations to address additional classes of peril.
This software is licensed under the AGPL license, for more details please see the LICENSE file.
Copyright (C) 2010-2016 GEM Foundation
OpenQuake is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
OpenQuake is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with OpenQuake. If not, see <http://www.gnu.org/licenses/>.