Skip to content

Commit 87ae787

Browse files
GabefireVal Brodsky
authored andcommitted
[PLT-1273] Removed setup_editor (#1841)
1 parent e362281 commit 87ae787

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

libs/labelbox/src/labelbox/schema/project.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -657,21 +657,11 @@ def review_metrics(self, net_score) -> int:
657657
res = self.client.execute(query_str, {id_param: self.uid})
658658
return res["project"]["reviewMetrics"]["labelAggregate"]["count"]
659659

660-
def setup_editor(self, ontology) -> None:
661-
"""
662-
Sets up the project using the Pictor editor.
663-
664-
Args:
665-
ontology (Ontology): The ontology to attach to the project
666-
"""
667-
warnings.warn("This method is deprecated use connect_ontology instead.")
668-
self.connect_ontology(ontology)
669-
670660
def connect_ontology(self, ontology) -> None:
671661
"""
672662
Connects the ontology to the project. If an editor is not setup, it will be connected as well.
673663
674-
Note: For live chat model evaluation projects, the editor setup is skipped becase it is automatically setup when the project is created.
664+
Note: For live chat model evaluation projects, the editor setup is skipped because it is automatically setup when the project is created.
675665
676666
Args:
677667
ontology (Ontology): The ontology to attach to the project

libs/labelbox/tests/unit/test_project.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,3 @@ def test_project_editor_task_type(
7272
)
7373

7474
assert project.editor_task_type == expected_editor_task_type
75-
76-
77-
def test_setup_editor_using_connect_ontology(project_entity):
78-
project = project_entity
79-
ontology = MagicMock()
80-
project.connect_ontology = MagicMock()
81-
with patch("warnings.warn") as warn:
82-
project.setup_editor(ontology)
83-
warn.assert_called_once()
84-
project.connect_ontology.assert_called_once_with(ontology)

0 commit comments

Comments
 (0)