Skip to content
This repository was archived by the owner on Nov 10, 2017. It is now read-only.
This repository was archived by the owner on Nov 10, 2017. It is now read-only.

"OQ Runner" config file generation #1

@larsbutler

Description

@larsbutler

Abstract

The web UI needs to be able to launch an OpenQuake computation. The first step towards is this goal is creation of a config.gem file, which can then be fed to the OQ engine. All of the data which will be used to create the config.gem will reside in the OpenQuake DB.

Solution outline

  • Create a job config writer class
  • The job config writer will assume there is data in the following db tables:
    • uiapi.oq_job <- the --job param refers to this ID
    • uiapi.oq_params
    • uiapi.upload
    • uiapi.input
  • The OQ database will be located on localhost
  • Given a job_id and a database name (which will be matched to an entry in the Django settings.py file), query the db for the various params and input files related to the job
    • It is from this information that the config.gem file will be created
  • The config.gem file should be created using the standard python ConfigParser library: http://docs.python.org/library/configparser.html
    • 'ConfigParser' also happens happens to be one of the libraries we are using to read config.gem files in the job code
  • The config.gem file shall be placed in upload.path/jobs/job_id (for example: /path/to/upload/jobs/17)

Iterations

For the purposes of the June demo, we are focusing on support for Classical calculations. If we have time, we will add support for Deterministic and Event-Based calculations (in that order).

Test data needed

  • Sample 'Classical' config.gem file (to compare with our final output)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions