From cc520fd106e72a9fe250cc4faedb4bf146debf48 Mon Sep 17 00:00:00 2001 From: Gabefire <33893811+Gabefire@users.noreply.github.com> Date: Mon, 23 Sep 2024 22:03:27 -0500 Subject: [PATCH 1/3] remove setup_editor --- libs/labelbox/src/labelbox/schema/project.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/libs/labelbox/src/labelbox/schema/project.py b/libs/labelbox/src/labelbox/schema/project.py index 5746e8011..d65b8e2e9 100644 --- a/libs/labelbox/src/labelbox/schema/project.py +++ b/libs/labelbox/src/labelbox/schema/project.py @@ -657,16 +657,6 @@ def review_metrics(self, net_score) -> int: res = self.client.execute(query_str, {id_param: self.uid}) return res["project"]["reviewMetrics"]["labelAggregate"]["count"] - def setup_editor(self, ontology) -> None: - """ - Sets up the project using the Pictor editor. - - Args: - ontology (Ontology): The ontology to attach to the project - """ - warnings.warn("This method is deprecated use connect_ontology instead.") - self.connect_ontology(ontology) - def connect_ontology(self, ontology) -> None: """ Connects the ontology to the project. If an editor is not setup, it will be connected as well. From da5bd0fcef324c43ec637bbbd4932e917b06fff8 Mon Sep 17 00:00:00 2001 From: Gabefire <33893811+Gabefire@users.noreply.github.com> Date: Mon, 23 Sep 2024 22:07:13 -0500 Subject: [PATCH 2/3] spelling mistake --- libs/labelbox/src/labelbox/schema/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/labelbox/src/labelbox/schema/project.py b/libs/labelbox/src/labelbox/schema/project.py index d65b8e2e9..0fd6cf24d 100644 --- a/libs/labelbox/src/labelbox/schema/project.py +++ b/libs/labelbox/src/labelbox/schema/project.py @@ -661,7 +661,7 @@ def connect_ontology(self, ontology) -> None: """ Connects the ontology to the project. If an editor is not setup, it will be connected as well. - Note: For live chat model evaluation projects, the editor setup is skipped becase it is automatically setup when the project is created. + Note: For live chat model evaluation projects, the editor setup is skipped because it is automatically setup when the project is created. Args: ontology (Ontology): The ontology to attach to the project From 93a9db7781a7f1f1a48cbfe66a10a4aecbe33e4c Mon Sep 17 00:00:00 2001 From: Gabefire <33893811+Gabefire@users.noreply.github.com> Date: Mon, 23 Sep 2024 22:11:03 -0500 Subject: [PATCH 3/3] removed unit test --- libs/labelbox/tests/unit/test_project.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/libs/labelbox/tests/unit/test_project.py b/libs/labelbox/tests/unit/test_project.py index 5e5f99c57..a8fd87b48 100644 --- a/libs/labelbox/tests/unit/test_project.py +++ b/libs/labelbox/tests/unit/test_project.py @@ -72,13 +72,3 @@ def test_project_editor_task_type( ) assert project.editor_task_type == expected_editor_task_type - - -def test_setup_editor_using_connect_ontology(project_entity): - project = project_entity - ontology = MagicMock() - project.connect_ontology = MagicMock() - with patch("warnings.warn") as warn: - project.setup_editor(ontology) - warn.assert_called_once() - project.connect_ontology.assert_called_once_with(ontology)