28935ea4d7796ada4ad387e79c4357b21c5b9ad6,app/grandchallenge/reader_studies/models.py,ReaderStudy,add_ground_truth,#ReaderStudy#,394
Before Change
if key == "images":
continue
question = self.questions.get(question_text=key)
if question.answer_type == Question.ANSWER_TYPE_BOOL:
if gt[key] not in ["1", "0"]:
raise ValidationError(
"Expected 1 or 0 for answer type BOOL."
)
_answer = bool(int(gt[key]))
else:
_answer = gt[key]
Answer.validate(
creator=user,
question=question,
images=images,
After Change
question = self.questions.get(question_text=key)
_answer = json.loads(gt[key])
if question.answer_type == Question.ANSWER_TYPE_CHOICE:
try:
option = question.options.get(title=_answer)
_answer = option.pk
except CategoricalOption.DoesNotExist:
raise ValidationError(
f"Option "{_answer}" is not valid for question {question.question_text}"
)
if (
question.answer_type
== Question.ANSWER_TYPE_MULTIPLE_CHOICE
):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: comic/grand-challenge.org
Commit Name: 28935ea4d7796ada4ad387e79c4357b21c5b9ad6
Time: 2020-03-26
Author: 57257130+MikeOverkamp-diag@users.noreply.github.com
File Name: app/grandchallenge/reader_studies/models.py
Class Name: ReaderStudy
Method Name: add_ground_truth
Project Name: idaholab/raven
Commit Name: 469a24b1e61bf1f78897582d9b1e02a83c5117b4
Time: 2019-11-25
Author: paul.talbot@inl.gov
File Name: framework/utils/xmlUtils.py
Class Name:
Method Name: fixXmlTag
Project Name: chartbeat-labs/textacy
Commit Name: 09d661e1e5b151ea7168e3f99f97df4bcc0d8947
Time: 2019-05-19
Author: burtdewilde@gmail.com
File Name: textacy/extract.py
Class Name:
Method Name: _make_pattern_from_string