Skip to content

Commit

Permalink
Fixe types in test_label_structure
Browse files Browse the repository at this point in the history
  • Loading branch information
clinton-encord committed Dec 23, 2024
1 parent 36025f1 commit fc26087
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions tests/objects/test_label_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,43 +48,43 @@

text_obj_ontology_item = all_types_structure.get_child_by_hash("textFeatureNodeHash", Object)

nested_box_ontology_item = all_types_structure.get_child_by_hash("MTA2MjAx")
text_attribute_1 = all_types_structure.get_child_by_hash("OTkxMjU1")
checklist_attribute_1 = all_types_structure.get_child_by_hash("ODcxMDAy")
checklist_attribute_1_option_1 = all_types_structure.get_child_by_hash("MTE5MjQ3")
checklist_attribute_1_option_2 = all_types_structure.get_child_by_hash("Nzg3MDE3")

deeply_nested_polygon_item = all_types_structure.get_child_by_hash("MTM1MTQy")
nested_polygon_text = all_types_structure.get_child_by_hash("OTk555U1")
nested_polygon_checklist = all_types_structure.get_child_by_hash("ODc555Ay")
nested_polygon_checklist_option_1 = all_types_structure.get_child_by_hash("MT5555Q3")
nested_polygon_checklist_option_2 = all_types_structure.get_child_by_hash("Nzg5555E3")
radio_attribute_level_1 = all_types_structure.get_child_by_hash("MTExMjI3")
radio_nested_option_1 = all_types_structure.get_child_by_hash("MTExNDQ5")
radio_nested_option_1_text = all_types_structure.get_child_by_hash("MjE2OTE0")
radio_nested_option_2 = all_types_structure.get_child_by_hash("MTcxMjAy")
radio_nested_option_2_checklist = all_types_structure.get_child_by_hash("ODc666Ay")
radio_nested_option_2_checklist_option_1 = all_types_structure.get_child_by_hash("MT66665Q3")
radio_nested_option_2_checklist_option_2 = all_types_structure.get_child_by_hash("Nzg66665E3")

keypoint_dynamic = all_types_structure.get_child_by_hash("MTY2MTQx")
dynamic_text: TextAttribute = all_types_structure.get_child_by_hash("OTkxMjU1")
dynamic_checklist = all_types_structure.get_child_by_hash("ODcxMDAy")
dynamic_checklist_option_1 = all_types_structure.get_child_by_hash("MTE5MjQ3")
dynamic_checklist_option_2 = all_types_structure.get_child_by_hash("Nzg3MDE3")
dynamic_radio = all_types_structure.get_child_by_hash("MTExM9I3", type_=RadioAttribute)
dynamic_radio_option_1 = all_types_structure.get_child_by_hash("MT9xNDQ5", type_=Option) # Dynamic and deeply nested.
dynamic_radio_option_2 = all_types_structure.get_child_by_hash("9TcxMjAy", type_=Option) # Dynamic and deeply nested.
nested_box_ontology_item = all_types_structure.get_child_by_hash("MTA2MjAx", Object)
text_attribute_1 = all_types_structure.get_child_by_hash("OTkxMjU1", TextAttribute)
checklist_attribute_1 = all_types_structure.get_child_by_hash("ODcxMDAy", ChecklistAttribute)
checklist_attribute_1_option_1 = all_types_structure.get_child_by_hash("MTE5MjQ3", Option)
checklist_attribute_1_option_2 = all_types_structure.get_child_by_hash("Nzg3MDE3", Option)

deeply_nested_polygon_item = all_types_structure.get_child_by_hash("MTM1MTQy", Object)
nested_polygon_text = all_types_structure.get_child_by_hash("OTk555U1", TextAttribute)
nested_polygon_checklist = all_types_structure.get_child_by_hash("ODc555Ay", ChecklistAttribute)
nested_polygon_checklist_option_1 = all_types_structure.get_child_by_hash("MT5555Q3", Option)
nested_polygon_checklist_option_2 = all_types_structure.get_child_by_hash("Nzg5555E3", Option)
radio_attribute_level_1 = all_types_structure.get_child_by_hash("MTExMjI3", RadioAttribute)
radio_nested_option_1 = all_types_structure.get_child_by_hash("MTExNDQ5", Option)
radio_nested_option_1_text = all_types_structure.get_child_by_hash("MjE2OTE0", TextAttribute)
radio_nested_option_2 = all_types_structure.get_child_by_hash("MTcxMjAy", Option)
radio_nested_option_2_checklist = all_types_structure.get_child_by_hash("ODc666Ay", ChecklistAttribute)
radio_nested_option_2_checklist_option_1 = all_types_structure.get_child_by_hash("MT66665Q3", Option)
radio_nested_option_2_checklist_option_2 = all_types_structure.get_child_by_hash("Nzg66665E3", Option)

keypoint_dynamic = all_types_structure.get_child_by_hash("MTY2MTQx", Object)
dynamic_text = all_types_structure.get_child_by_hash("OTkxMjU1", TextAttribute)
dynamic_checklist = all_types_structure.get_child_by_hash("ODcxMDAy", ChecklistAttribute)
dynamic_checklist_option_1 = all_types_structure.get_child_by_hash("MTE5MjQ3", Option)
dynamic_checklist_option_2 = all_types_structure.get_child_by_hash("Nzg3MDE3", Option)
dynamic_radio = all_types_structure.get_child_by_hash("MTExM9I3", RadioAttribute)
dynamic_radio_option_1 = all_types_structure.get_child_by_hash("MT9xNDQ5", Option) # Dynamic and deeply nested.
dynamic_radio_option_2 = all_types_structure.get_child_by_hash("9TcxMjAy", Option) # Dynamic and deeply nested.

text_classification = all_types_structure.get_child_by_hash("jPOcEsbw", Classification)
text_classification_attribute: TextAttribute = all_types_structure.get_child_by_hash("OxrtEM+v", TextAttribute)
radio_classification = all_types_structure.get_child_by_hash("NzIxNTU1")
radio_classification_option_1 = all_types_structure.get_child_by_hash("MTcwMjM5")
radio_classification_option_2 = all_types_structure.get_child_by_hash("MjUzMTg1")
radio_classification_option_2_text = all_types_structure.get_child_by_hash("MTg0MjIw")
checklist_classification: Classification = all_types_structure.get_child_by_hash("3DuQbFxo")
checklist_classification_option_1 = all_types_structure.get_child_by_hash("fvLjF0qZ")
checklist_classification_option_2 = all_types_structure.get_child_by_hash("a4r7nK9i")
text_classification_attribute = all_types_structure.get_child_by_hash("OxrtEM+v", TextAttribute)
radio_classification = all_types_structure.get_child_by_hash("NzIxNTU1", Classification)
radio_classification_option_1 = all_types_structure.get_child_by_hash("MTcwMjM5", Option)
radio_classification_option_2 = all_types_structure.get_child_by_hash("MjUzMTg1", Option)
radio_classification_option_2_text = all_types_structure.get_child_by_hash("MTg0MjIw", TextAttribute)
checklist_classification = all_types_structure.get_child_by_hash("3DuQbFxo", Classification)
checklist_classification_option_1 = all_types_structure.get_child_by_hash("fvLjF0qZ", Option)
checklist_classification_option_2 = all_types_structure.get_child_by_hash("a4r7nK9i", Option)

BOX_COORDINATES = BoundingBoxCoordinates(
height=0.1,
Expand Down Expand Up @@ -467,7 +467,7 @@ def test_classification_answering_with_ontology_access() -> None:
radio_classification_ = all_types_structure.get_child_by_title("Radio classification 1", Classification)
radio_instance = radio_classification_.create_instance()

radio_classification_attribute_1: ChecklistAttribute = radio_classification_.get_child_by_title(
radio_classification_attribute_1 = radio_classification_.get_child_by_title(
"Radio classification 1", type_=RadioAttribute
)
# Different `type_` with generic `Attribute`
Expand Down

0 comments on commit fc26087

Please sign in to comment.