Skip to content

[PLT-1273] Removed setup_editor #1841

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions libs/labelbox/src/labelbox/schema/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,21 +657,11 @@ 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.

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
Expand Down
10 changes: 0 additions & 10 deletions libs/labelbox/tests/unit/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Loading