def delete_evaluation(self, evaluation): """Deletes an evaluation. """ check_resource_type(evaluation, EVALUATION_PATH, message="An evaluation id is needed.") evaluation_id = get_evaluation_id(evaluation) if evaluation_id: return self._delete("%s%s" % (self.url, evaluation_id))
def update_evaluation(self, evaluation, changes): """Updates an evaluation. """ check_resource_type(evaluation, EVALUATION_PATH, message="An evaluation id is needed.") evaluation_id = get_evaluation_id(evaluation) if evaluation_id: body = json.dumps(changes) return self._update("%s%s" % (self.url, evaluation_id), body)
def get_evaluation(self, evaluation): """Retrieves an evaluation. The evaluation parameter should be a string containing the evaluation id or the dict returned by create_evaluation. As evaluation is an evolving object that is processed until it reaches the FINISHED or FAULTY state, the function will return a dict that encloses the evaluation values and state info available at the time it is called. """ check_resource_type(evaluation, EVALUATION_PATH, message="An evaluation id is needed.") evaluation_id = get_evaluation_id(evaluation) if evaluation_id: return self._get("%s%s" % (self.url, evaluation_id))