def get_metadata(self): if self.results: metadata = deepcopy(self.upstream.get_metadata()) results_dict = self.results.to_dict() recursively_update_dict(metadata, results_dict) else: # Don't bother to deepcopy upstream's metadata if # we aren't going to modify it. metadata = self.upstream.get_metadata() return metadata
def get_metadata(self): if self.results: metadata = deepcopy(self.upstream.get_metadata()) results_dict = self.results.to_dict() recursively_update_dict(metadata, results_dict) else: # Don't bother to deepcopy upstream's metadata if # we aren't going to modify it. metadata = self.upstream.get_metadata() return metadata
def dry_run_metadata(self): """Does a 'dry run' so we can validate the full pipeline before loading any data. Returns ------- dict : dry run metadata """ state = deepcopy(self.__class__.postconditions) recursively_update_dict(state, self.upstream.dry_run_metadata()) return state
def dry_run_metadata(self): """Does a 'dry run' so we can validate the full pipeline before loading any data. Returns ------- dict : dry run metadata """ state = deepcopy(self.__class__.postconditions) recursively_update_dict(state, self.upstream.dry_run_metadata()) return state
def dry_run_metadata(self): """Does a 'dry run' so we can validate the full pipeline before loading any data. Not to be called from outside the node system. Only used by the check_requirements function. For normal nodes it incorporates the postconditions. For the source node, which is a elecmeter, it really inserts its metadata. Returns ------- dict : dry run metadata """ state = deepcopy(self.__class__.postconditions) recursively_update_dict(state, self.upstream.dry_run_metadata()) return state
def get_metadata(self): ''' Recursively gets the metadata. Is the full function while dry_run only checks the postconditions. ''' if self.results: metadata = deepcopy(self.upstream.get_metadata()) results_dict = self.results.to_dict() recursively_update_dict(metadata, results_dict) else: # Don't bother to deepcopy upstream's metadata if # we aren't going to modify it. metadata = self.upstream.get_metadata() return metadata