Skip to content

Commit ca62648

Browse files
author
Val Brodsky
committed
Remove GroupKey and some Dicom tests and fixtures
1 parent 100c741 commit ca62648

File tree

4 files changed

+8
-202
lines changed

4 files changed

+8
-202
lines changed

libs/labelbox/src/labelbox/data/annotation_types/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
from .video import VideoClassificationAnnotation
1717
from .video import VideoObjectAnnotation
18-
from .video import GroupKey
1918
from .video import MaskFrame
2019
from .video import MaskInstance
2120
from .video import VideoMaskAnnotation

libs/labelbox/src/labelbox/data/annotation_types/video.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from enum import Enum
21
from typing import List, Optional, Tuple
32

43
from pydantic import (
@@ -68,14 +67,6 @@ class VideoObjectAnnotation(
6867
segment_index: Optional[int] = None
6968

7069

71-
class GroupKey(Enum):
72-
"""Group key for DICOM annotations"""
73-
74-
AXIAL = "axial"
75-
SAGITTAL = "sagittal"
76-
CORONAL = "coronal"
77-
78-
7970
class MaskFrame(_CamelCaseMixin, BaseModel):
8071
index: int
8172
instance_uri: Optional[str] = Field(

libs/labelbox/tests/data/annotation_import/conftest.py

Lines changed: 8 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1+
import time
12
import uuid
2-
from typing import Union
3+
from typing import Tuple, Type, Union
34

4-
from labelbox.schema.model_run import ModelRun
5-
from labelbox.schema.ontology import Ontology
6-
from labelbox.schema.project import Project
75
import pytest
8-
import time
96
import requests
10-
11-
from labelbox import parser, MediaType, OntologyKind
12-
from labelbox import Client, Dataset
13-
14-
from typing import Tuple, Type
15-
from labelbox.schema.annotation_import import LabelImport, AnnotationImportState
167
from pytest import FixtureRequest
178

9+
from labelbox import Client, Dataset, MediaType, OntologyKind, parser
10+
from labelbox.schema.annotation_import import AnnotationImportState, LabelImport
11+
from labelbox.schema.model_run import ModelRun
12+
from labelbox.schema.ontology import Ontology
13+
from labelbox.schema.project import Project
14+
1815
"""
1916
The main fixtures of this library are configured_project and configured_project_by_global_key. Both fixtures generate data rows with a parametrize media type. They create the amount of data rows equal to the DATA_ROW_COUNT variable below. The data rows are generated with a factory fixture that returns a function that allows you to pass a global key. The ontologies are generated normalized and based on the MediaType given (i.e. only features supported by MediaType are created). This ontology is later used to obtain the correct annotations with the prediction_id_mapping and corresponding inferences. Each data row will have all possible annotations attached supported for the MediaType.
2017
"""
@@ -1256,35 +1253,6 @@ def line_inference(prediction_id_mapping):
12561253
return lines
12571254

12581255

1259-
@pytest.fixture
1260-
def line_inference_v2(prediction_id_mapping):
1261-
lines = []
1262-
for feature in prediction_id_mapping:
1263-
if "line" not in feature:
1264-
continue
1265-
line = feature["line"].copy()
1266-
line_data = {
1267-
"groupKey": "axial",
1268-
"segments": [
1269-
{
1270-
"keyframes": [
1271-
{
1272-
"frame": 1,
1273-
"line": [
1274-
{"x": 147.692, "y": 118.154},
1275-
{"x": 150.692, "y": 160.154},
1276-
],
1277-
}
1278-
]
1279-
},
1280-
],
1281-
}
1282-
line.update(line_data)
1283-
del line["tool"]
1284-
lines.append(line)
1285-
return lines
1286-
1287-
12881256
@pytest.fixture
12891257
def point_inference(prediction_id_mapping):
12901258
points = []
@@ -1796,7 +1764,6 @@ def annotations_by_media_type(
17961764
polygon_inference,
17971765
rectangle_inference,
17981766
rectangle_inference_document,
1799-
line_inference_v2,
18001767
line_inference,
18011768
entity_inference,
18021769
entity_inference_index,
@@ -1825,7 +1792,6 @@ def annotations_by_media_type(
18251792
text_inference_index,
18261793
entity_inference_index,
18271794
],
1828-
MediaType.Dicom: [line_inference_v2],
18291795
MediaType.Document: [
18301796
entity_inference_document,
18311797
checklist_inference,

libs/labelbox/tests/data/serialization/ndjson/test_dicom.py

Lines changed: 0 additions & 150 deletions
This file was deleted.

0 commit comments

Comments
 (0)