adam.job module

job.py

class adam.job.Job(uuid, project_id=None, object_id=None, user_defined_id=None, description=None, job_type=None, input_json=None, submission_time=None, execution_start=None, completion_time=None, status=None)

Bases: object

Job class.

An ADAM Project is the parent container of a computational run.

__init__(uuid, project_id=None, object_id=None, user_defined_id=None, description=None, job_type=None, input_json=None, submission_time=None, execution_start=None, completion_time=None, status=None)

Initialize self. See help(type(self)) for accurate signature.

static from_dict(job)
get_completion_time()
get_description()
get_execution_start()
get_input_json()
get_input_json_string()
get_job_type()
get_object_id()
get_project_id()
get_status()
get_submission_time()
get_user_defined_id()
get_uuid()
class adam.job.JobsClient(rest=<adam.rest_proxy.AuthenticatingRestProxy object>)

Bases: object

Module for managing jobs.

__init__(rest=<adam.rest_proxy.AuthenticatingRestProxy object>)

Initialize the Jobs API client.

Parameters

rest (RestProxy) – a RestProxy that makes calls to the ADAM API.

filter_by_inputs(jobs, keys, comparison, comparison_value)

Filter a list of Jobs by some criteria.

filter_by_inputs(jobs, [‘monteCarloDraws’], Comparison.GreaterThan, 50000) filter_by_inputs(jobs, [‘opm’,’keplerian’,’inclination’], Comparison.GreaterThan, 23)

Parameters
  • jobs (List[Job]) – the jobs list to filter

  • keys (List[str]) – one or more keys of the JSON hierarchy

  • comparison (Comparison) – The type of comparison desired

  • comparison_value – the value of the specific key of interest that is

  • tested for equality (being) –

get_jobs(project, status=None, object_id=None, user_defined_id=None, description=None, earliest_submission_datetime=None, latest_submission_datetime=None) → List[adam.job.Job]

Finds jobs based on one or more of the specified fields

Parameters
  • project (str | Project) – (Required) The workspace (project) id or a Project object

  • status (str) – (Optional) The status field looking for (can have wildcards)

  • object_id (str) – (Optional) The object ID field looking for (can have wildcards)

  • user_defined_id (str) – (Optional) The user ID field looking for (can have wildcards)

  • description (str) – (Optional) The description field looking for (can have wildcards)

  • earliest_submission_datetime (datetime) – (Optional) Earliest submission interested in

  • latest_submission_datetime (datetime) – (Optional) Earliest submission interested in

Returns

a list of jobs for the project that match that criteria.

Return type

list