def from_tuple(cls, tuple_): if len(tuple_) < 6: raise GreatExpectationsError( "ValidationMetricIdentifier tuple must have at least six components." ) if tuple_[2] == "__": tuple_data_asset_name = None else: tuple_data_asset_name = tuple_[2] metric_id = MetricIdentifier.from_tuple(tuple_[-2:]) return cls( run_id=RunIdentifier.from_tuple((tuple_[0], tuple_[1])), data_asset_name=tuple_data_asset_name, expectation_suite_identifier=ExpectationSuiteIdentifier.from_tuple( tuple_[3:-2]), metric_name=metric_id.metric_name, metric_kwargs_id=metric_id.metric_kwargs_id, )
def from_fixed_length_tuple(cls, tuple_): return cls( ExpectationSuiteIdentifier(tuple_[0]), RunIdentifier.from_tuple((tuple_[1], tuple_[2])), tuple_[3], )
def from_tuple(cls, tuple_): return cls( ExpectationSuiteIdentifier.from_tuple(tuple_[0:-3]), RunIdentifier.from_tuple((tuple_[-3], tuple_[-2])), tuple_[-1], )