gem / oq-engine

OpenQuake Engine: a software for Seismic Hazard and Risk Analysis
https://github.com/gem/oq-engine/#openquake-engine
GNU Affero General Public License v3.0
377 stars 273 forks source link

With the new unified 'CALCULATION_MODE' config change, the engine does unexpected things with old config files #266

Closed larsbutler closed 12 years ago

larsbutler commented 13 years ago

For example, if you feed the current code (as of June 10, 2011) an old config file (HAZARD_CALCULATION_MODE = Classical and RISK_CALCULATION_MODE = Classical PSHA), it doesn't blow up. Instead, it just runs an Event Based calculation.

This is awful. Just plain awful. We should instead throw a helpful error.

Somehow, the ordered mixin code is allowing this to happen. Fix please.

favalex commented 13 years ago

It blows with a understandable but not user friendly

KeyError: 'CALCULATION_MODE'

if openquake is run with --include_defaults=false .

Otherwise the calculation mode is the one set in the default configurations files. The file openquake/default.gem currently in the repository sets it to 'Event Based'.

Maybe the default configuration file mechanism is just confusing and should be removed?

larsbutler commented 12 years ago

This should no longer be an issue.