def _prev_result_changed(self, obj, name, old, new): logging.debug("RemoteWorkflowItem._prev_result_changed :: {}".format( self, new)) if self.previous and self.previous.result: self.previous_channels = list(self.previous.result.channels) self.previous_conditions = dict(self.previous.result.conditions) self.previous_statistics = dict(self.previous.result.statistics) # some things in metadata are unpicklable, functions and such, # so filter them out. self.previous_metadata = filter_unpicklable( dict(self.previous.result.metadata)) if self.operation.should_clear_estimate("prev_result"): try: self.operation.clear_estimate() except AttributeError: pass if self.operation.should_apply("prev_result"): self.status = "invalid" self.command = "apply" if self.current_view and self.current_view.should_plot("prev_result"): self.command = "plot"
def _result_changed(self, obj, name, old, new): logging.debug("RemoteWorkflowItem._result_changed :: {}".format(self)) if self.current_view and self.current_view.should_plot("result"): self.command = "plot" if self.result: self.channels = list(self.result.channels) self.conditions = dict(self.result.conditions) self.statistics = dict(self.result.statistics) # some things in metadata are unpicklable, functions and such, # so filter them out. self.metadata = filter_unpicklable(dict(self.result.metadata))
def _result_changed(self, obj, name, old, new): logging.debug("RemoteWorkflow._result_changed :: {}".format( (self, obj, name, old, new))) if obj.result: obj.channels = list(obj.result.channels) obj.conditions = dict(obj.result.conditions) obj.statistics = dict(obj.result.statistics) # some things in metadata are unpicklable, functions and such, # so filter them out. obj.metadata = filter_unpicklable(dict(obj.result.metadata)) obj.changed = (Changed.RESULT, None) if obj.next_wi: obj.next_wi.changed = (Changed.PREV_RESULT, None)