cedar.metadata.tracking module

Classes and other core tools for tracking & image metadata

class cedar.metadata.tracking.TrackingMetadata(metadata, schema=None)[source]

Bases: collections.abc.Mapping

CEDAR order tracking metadata

Parameters
  • metadata (dict) – Tracking metadata information as a dict

  • schema (dict, optional) – Validate metadata against a specific schema

property complete

True if all orders have completed

Type

bool

classmethod from_file(filename, schema=None)[source]

Create from a tracking metadata file

classmethod from_json(json_str, schema=None)[source]

Load tracking metadata from a JSON string

property metadata
property orders
property program
property progress

Percent of EE tasks completed in this order

Type

float

property states

Summary of EE task status for this order

Type

dict

property submission
property tasks

EarthEngine tasks associated with this order

Type

List[ee.batch.Task]

property tracking
update(self, skip_if_missing=True)[source]

Update the tracking metadata order info against EE task status

Parameters

skip_if_missing (bool, optional) – If True, logs and skips updating order information when the order task cannot be retrieved.

Returns

Returns a new instance of this TrackingMetadata with updated info

Return type

self

validate(self)[source]
cedar.metadata.tracking.calculate_order_runtime(start_time, update_time, nan=nan)[source]
cedar.metadata.tracking.repr_metadata_order(info, header='Order:')[source]
cedar.metadata.tracking.repr_metadata_program(info, header='Program Info:')[source]
cedar.metadata.tracking.repr_tracking(tracking_data, show_program=True, show_submission=True, show_tracking=True, show_states=True, show_runtimes=True, show_orders=None)[source]

Return string formatted information about CEDAR tracking metadata

cedar.metadata.tracking.repr_tracking_orders(info, show_states=True, show_runtimes=True, header='Orders')[source]
cedar.metadata.tracking.repr_tracking_submission(info, header='Submission Info:')[source]
cedar.metadata.tracking.repr_tracking_tracking(info, header='Tracking Info')[source]
cedar.metadata.tracking.summarize_runtimes(orders)[source]

Summarize runtimes of order tasks

cedar.metadata.tracking.summarize_states(orders)[source]

Returns tallies of order task status