db/models:

Fixed computation of _number of curves per location_ (the number of
hazard curves used to compute statistical aggregates for a single
site).

Previously, it was computed such that two issues were present:

  1. Aggregates were being computed for a given over all logic tree
     samples AND intensity measure types. This is not correct. The
     statistical aggregates (means, quantiles, etc.) for each
     intensity measure type need to be computed separately.
  2. The post-processing for certain geometries (most geometries,
     in fact) would break and throw an exception. See bug
     https://bugs.launchpad.net/openquake/+bug/1062387. The root
     cause is described in point #1 above. The "intermediate" cause
     of this error is basically and off-by-one with respect to the
     division of post-processing tasks, and thus numpy is unable to
     re-dimension data into the expected shape.
qa_tests/_utils:

_utils was using a non-existent method in engine2.py. Fixed that.
settings:

Changed default Django DB settings to use the DB name specified in the
openquake.cfg file (if it is defined).

This caused a test failure in CI where a non-default DB name was being
used ("oq_nhlib_integration" instead of just "openquake").
settings:

Missed a comma. Woops.
Merge pull request #912 from larsbutler/fix-haz-curve-post-proc

Fix for https://bugs.launchpad.net/openquake/+bug/1062387

[r=arbeit] [f=1062387]
Merge pull request #914 from larsbutler/fix-qa

Trivial fixes to QA tests, etc.

[r=trivial]
calcs/hazard/event_based/post_processing:

Sketch of event-based post-processing.
utils/general:

Added support to the block_splitter for iterators and generators.

Previously, you could only run it on list-like objects (with a known
length).
tests/utils_general_test:

Edited a comment
openquake.cfg:

Increased `concurrent_tasks` to 32. We should enqueue a few additional
tasks so that workers can prefetch.

This change is meant to apply to single-machine dev deployments, where
the number of cores is probably 8.
calcs/hazard/event_based/post_processing:

Fleshed out more of the post processing code.

Most notably, I added a fairly optimized way to compute hazard curve
poes from a set of GMVs.

It only operates on a single curve/single point. We might consider restructuring
this to gain performance.
celeryconfig:

Cleaned up celery imports.
calcs/hazard/event_based/post_processing:

Documentation and cleanup for post processing code.
calcs/hazard/event_based/core_next:

Added conditional call to post-processing in the calculator.
tests/export/hazard_test:

Cleaned up an export test, added additional checks to cover hazard
curves produced from GMFs.
tests/export/hazard_test:

Fixed a few broken test statements (copy/paste errors, typos, etc.).
db/fields:

Minor bug fix to StringArrayFormField (to handle `None` values).
job/validation:

Event-based hazard jobs now support hazard curve post-processing params.
calcs/hazard/classical, calcs/hazard/event_based:

Added hazard curve post-processing functionality to the event-based
calculator.

There's a bug, however, with causes the post-processing to crash with
certain (most) geometries.
demos/event_based_hazard/job.ini:

Added hazard curve post-processing params to event based demo file.