Implement the PgeJobSubmitter Adaptation

You can go through the introduction here: https://hysds-core.atlassian.net/wiki/spaces/HYS/pages/546045956

  1. Create the script mentioned in the chimera_config.yaml file under the job_submitter.module_path.

  2. In the script, declare the subclass mentioned in the chimera_config.yaml file under the job_submitter.class_name

  3. Start with the following code snippet:

    from chimera.pge_job_submitter import PgeJobSubmitter class NisarPgeJobSubmitter(PgeJobSubmitter): def __init__(self, context, run_config, pge_config_file, settings_file, wuid=None, job_num=None): PgeJobSubmitter.__init__(self, context, run_config, pge_config_file, settings_file, wuid=wuid, job_num=job_num)

The variables you have available throughout this subclass are:

  • Context - contents of _context.json of the SciFlo job. You can access it as self._context in the precondition functions

  • PGE’s configuration - contents of the respective PGE’s configuration file. Can be accessed as self._pge_config

  • Settings file - content of settings.yaml file accessible as self._settings

  • Run config - This is a the runconfig that the PGE job needs to run with. It can be accessed as self._run_config

You can add any functions to this class that you want to run in addition to the nominal functionality of creating the job payload for the PGE job.

Note: JPL employees can also get answers to HySDS questions at Stack Overflow Enterprise: