job.seed.results package¶
Submodules¶
job.seed.results.job_results module¶
Defines the results obtained after executing a job
-
class
job.seed.results.job_results.
JobResults
(results_dict=None, do_validate=True)¶ Bases:
object
Represents the results obtained after executing a job
-
add_file_list_parameter
(name, file_ids)¶ Adds a list of files to the job results
Parameters: - name (string) – The output parameter name
- file_ids ([long]) – The file IDs
-
add_file_parameter
(name, file_id)¶ Adds a file to the job results
Parameters: - name (string) – The output parameter name
- file_id (long) – The file ID
-
add_output_json
(output_name, value)¶ Adds the given output json from the seed.outputs.json file
Parameters: - output_name (str) – Output JSON key used to capture from output file
- value (float or str or dict or array) – Raw value provided by job
-
add_output_to_data
(output_name, job_data, input_name)¶ Adds the given output from the results as a new input in the given job data
Parameters: - output_name (string) – The name of the results output to add to the data
- job_data (
job.configuration.data.job_data.JobData
) – The job data - input_name (string) – The name of the data input
-
files
¶ Accessor for files in results
-
get_dict
()¶ Returns the internal dictionary that represents these job results
Returns: The dictionary representing the results Return type: dict
-
json
¶ Accessor for json in results
-
perform_post_steps
(job_interface, job_data, job_exe)¶ Stores the files or JSON output of job and deletes any working directories
Parameters: - job_interface (
job.seed.manifest.SeedManifest
) – The job interface - job_data (
job.data.job_data.JobData
) – The job data - job_exe (
job.models.JobExecution
) – The job execution model with related job and job_type fields
Returns: Job results generated by job execution
Return type: - job_interface (
-
job.seed.results.outputs_json module¶
-
class
job.seed.results.outputs_json.
SeedOutputsJson
(data, schema=None)¶ Bases:
object
-
static
construct_schema
(interface_outputs)¶ Dynamically build a schema to validate seed.outputs.json
Parameters: interface_outputs ([ job.seed.types.SeedOutputJson
]) – Seed Interface definition for types of JSON outputsReturns: Schema for validation of seed.outputs.json Return type: dict
-
get_values
(interface_outputs)¶ Returns all data needed in the interface. Any keys not indicated in the interface are ignored.
Parameters: interface_outputs ( job.seed.types.SeedOutputJson
) – Seed Interface definition for types of JSON outputsReturns: All outputs captured from seed.outputs.json in { key: value } format Return type: { string: typed_value }
-
static
read_outputs
(schema)¶
-
static