cars.orchestrator.registry.replacer_registry

This module contains the replacer registry class

Module Contents

Classes

CarsDatasetRegistryReplacer

CarsDatasetRegistryReplacer

SingleCarsDatasetReplacer

SingleCarsDatasetReplacer

class cars.orchestrator.registry.replacer_registry.CarsDatasetRegistryReplacer(id_generator)[source]

Bases: cars.orchestrator.registry.abstract_registry.AbstractCarsDatasetRegistry

CarsDatasetRegistryReplacer This registry manages the replacement of arriving future results into corresponding CarsDataset

cars_dataset_in_registry(cars_ds)[source]

Check if a CarsDataset is already registered, return id if exists

Parameters

cars_ds (CarsDataset) – cars dataset

:return : True if in registry, if of cars dataset :rtype : Tuple(bool, int)

get_cars_datasets_list()[source]

Get a list of registered CarsDataset

:return list of CarsDataset :rtype: list(CarsDataset)

get_cars_ds_replacer_corresponding_id(obj_id)[source]

Get the SingleCarsDatasetReplacer corresponding to given id

Parameters

obj_id (int) – cars dataset id

:return : single cars dataset replacer :rtype : SingleCarsDatasetReplacer

replace_lasting_jobs(delayed_type)[source]

Replace last jobs by Nones

get_cars_ds(future_result)[source]

Get a list of registered CarsDataset

Parameters

future_result – object to get cars dataset from

:return corresponding CarsDataset :rtype: CarsDataset

add_cars_ds_to_replace(cars_ds)[source]

Add cars dataset to registry

Parameters

cars_ds (CarsDataset) – cars dataset

get_corresponding_replacer(future_result)[source]

Get replacer corresponding to future result

Parameters

future_result (xr.Dataset or pandas.DataFrame) – future result

:return replacer :rtype: SingleCarsDatasetReplacer

replace(future_result)[source]

Replace future result

Parameters

future_result – xr.Dataset or pandas.DataFrame or Dict

class cars.orchestrator.registry.replacer_registry.SingleCarsDatasetReplacer(cars_ds, obj_id)[source]

SingleCarsDatasetReplacer

Manages the replacement of a CarsDataset