tcc and tif drift, compensated for string value casing, csv to dict improved process

This commit is contained in:
Josh Burman
2021-12-22 22:39:46 +00:00
parent 13f0f383e0
commit 107abcb73a
7 changed files with 61 additions and 47 deletions
+3 -2
View File
@@ -9,6 +9,7 @@ from lib.irt.item_information_function import ItemInformationFunction
class Item(BaseModel):
id: int
passage_id: Optional[int]
workflow_state: Optional[str]
attributes: List[Attribute]
b_param: float = 0.00
@@ -20,12 +21,12 @@ class Item(BaseModel):
def get_attribute(self, ref_attribute):
for attribute in self.attributes:
if attribute.id == ref_attribute.id and attribute.value == ref_attribute.value:
if attribute.id == ref_attribute.id and attribute.value.lower() == ref_attribute.value.lower():
return attribute.value
return False
def attribute_exists(self, ref_attribute):
for attribute in self.attributes:
if attribute.id == ref_attribute.id and attribute.value == ref_attribute.value:
if attribute.id == ref_attribute.id and attribute.value.lower() == ref_attribute.value.lower():
return True
return False