Skip to content
Snippets Groups Projects
run-nshmp-haz-config.ts 1.97 KiB
Newer Older
  • Learn to ignore specific revisions
  • Clayton, Brandon Scott's avatar
    Clayton, Brandon Scott committed
    /**
     * nshmp-haz calc config
     */
    export interface CalcConfig {
      deagg?: unknown;
      hazard?: unknown;
      output?: CalcConfigOutput;
      performance?: unknown;
      rate?: unknown;
      site?: unknown;
    }
    
    /** nshmp-haz calc config output section */
    export interface CalcConfigOutput {
      directory: string;
    }
    
    /** AWS cloud config */
    export interface CloudConfig {
      /** EC2 instance type */
      instanceType: string;
    
      /** Whether to debug; sets "set -x" in user data script for EC2 */
      debug?: boolean;
    }
    
    
    /** Hazard map creation config */
    export interface MapConfig {
      /** The region bounds to use */
      region?: string;
      /** First line of the title */
      title?: string;
    }
    
    
    Clayton, Brandon Scott's avatar
    Clayton, Brandon Scott committed
    /** NSHMP config */
    export interface NshmpConfig {
      /**
       * Java class name of class to run.
       *
       * Example: HazardCalc
       */
      className: string;
    
      /** Email to get notifications */
      email: string;
    
      /**
       * The URL to the git repository of the model to use.
       */
      modelGitUrl: string;
    
      /** The SHA (branch, tag, etc) of the model to use */
      modelSha?: string;
    
      /**
       * URL to nshmp-lib.
       *
       * Defaults to using version defined in nshmp-haz Gradle file.
       */
      nshmpLibGitUrl?: string;
    
      /** The SHA of nshmp-lib */
      nshmpLibSha?: string;
    
      /** URL to site file. */
      siteFileUrl: string;
    
      /** Path inside model tarball for hazard code to run */
      modelPath?: string;
    
      /**
       * The URL to the repository of the hazard to use.
       */
      sourceCodeGitUrl?: string;
    
      /** The SHA (branch, tag, etc) of the source code to use*/
      sourceCodeSha?: string;
    }
    
    /** State machine input */
    export interface NshmpHazJobConfig extends RunNshmpHazHttpPostConfig {
      jobId: string;
    }
    
    /** HTTP POST config for running nshmp-haz on AWS */
    export interface RunNshmpHazHttpPostConfig {
      /** AWS cloud config */
      cloudConfig: CloudConfig;
    
    
      /** Hazard map creation config */
      mapConfig?: MapConfig;
    
    
    Clayton, Brandon Scott's avatar
    Clayton, Brandon Scott committed
      /** NSHMP config to run nshmp-haz */
      nshmpConfig: NshmpConfig;
    
      /** The nshmp-haz calc config */
      calcConfig?: CalcConfig;
    }