#!/bin/bash
set -e
# run demos with job_hazard.ini and job_risk.ini
for demo_dir in $(find "$1" -type d | sort); do
   if [ -f $demo_dir/job_hazard.ini ]; then
       python -m openquake.commands engine --run $demo_dir/job_hazard.ini
       python -m openquake.commands engine --run $demo_dir/job_risk.ini --hc -1
   fi
done
# run the other demos
if [ ! -d "$1" ]; then
    echo "Please specify the location of the folder containing the demos. Aborting." >&2
    exit 1
fi

for ini in $(find $1 -name job.ini | sort); do
    python -m openquake.commands engine --run $ini
done

# do something with the generated data; -2 is LogicTreeCase3ClassicalPSHA
python -m openquake.commands export hcurves-rlzs -2 --exports hdf5 -d /tmp
python -m openquake.commands engine --lhc
MPLBACKEND=Agg python -m openquake.commands plot -2
MPLBACKEND=Agg python -m openquake.commands plot_uhs -2

# fake a wrong calculation still in executing status
python -m openquake.commands db set_status 1 executing
# repeat the failed/executing calculation, which is useful for QGIS
python -m openquake.commands engine --run $1/hazard/AreaSourceClassicalPSHA/job.ini

#!/bin/bash
set -e
# run demos with job_hazard.ini and job_risk.ini
for demo_dir in $(find "$1" -type d | sort); do
   if [ -f $demo_dir/job_hazard.ini ]; then
       python -m openquake.commands engine --run $demo_dir/job_hazard.ini
       python -m openquake.commands engine --run $demo_dir/job_risk.ini --hc -1
   fi
done
# run the other demos
if [ ! -d "$1" ]; then
    echo "Please specify the location of the folder containing the demos. Aborting." >&2
    exit 1
fi

for ini in $(find $1 -name job.ini | sort); do
    python -m openquake.commands engine --run $ini
done

# do something with the generated data; -2 is LogicTreeCase3ClassicalPSHA
python -m openquake.commands export hcurves-rlzs -2 --exports hdf5 -d /tmp
python -m openquake.commands engine --lhc
MPLBACKEND=Agg python -m openquake.commands plot -2
MPLBACKEND=Agg python -m openquake.commands plot_uhs -2

# fake a wrong calculation still in executing status
python -m openquake.commands db set_status 1 executing
# repeat the failed/executing calculation, which is useful for QGIS
python -m openquake.commands engine --run $1/hazard/AreaSourceClassicalPSHA/job.ini


# display the calculations
python -m openquake.commands db find %

# build an HTML report
python -m openquake.engine --make-html-report today

Build a report after running the demos
Build a report after running the demos


Former-commit-id: 12b2457bb1b9732024a5bc6b8874cc3eeba9a96f [formerly 0a73186344c871b6e30e1a892d7b497600ef4600] [formerly 0a73186344c871b6e30e1a892d7b497600ef4600 [formerly 4a9fc6c1fcb798a5f75f9a6549fbf65af0e728b8]]
Former-commit-id: 0f47653135219307265d8a0fdfa3d9f18295dd7a
Former-commit-id: 3541ae2dedd0f3b0853628fe0775807d73ab9eb9