|
3 | 3 |
|
4 | 4 |
|
5 | 5 | def test_send_to_annotate_include_annotations( |
6 | | - client, configured_batch_project_with_label, project_pack): |
| 6 | + client, configured_batch_project_with_label, project_pack, ontology): |
7 | 7 | [source_project, _, data_row, _] = configured_batch_project_with_label |
8 | 8 | destination_project = project_pack[0] |
9 | 9 |
|
10 | | - source_ontology_builder = OntologyBuilder.from_project(source_project) |
11 | | - editor = list( |
12 | | - client.get_labeling_frontends( |
13 | | - where=LabelingFrontend.name == "editor"))[0] |
14 | | - destination_project.setup(editor, source_ontology_builder.asdict()) |
| 10 | + src_ontology = source_project.ontology() |
| 11 | + destination_project.setup_editor(ontology) |
15 | 12 |
|
16 | 13 | # build an ontology mapping using the top level tools |
17 | | - feature_schema_ids = list( |
18 | | - tool.feature_schema_id for tool in source_ontology_builder.tools) |
| 14 | + src_feature_schema_ids = list( |
| 15 | + tool.feature_schema_id for tool in src_ontology.tools()) |
| 16 | + dest_ontology = destination_project.ontology() |
| 17 | + dest_feature_schema_ids = list( |
| 18 | + tool.feature_schema_id for tool in dest_ontology.tools()) |
19 | 19 | # create a dictionary of feature schema id to itself |
20 | | - ontology_mapping = dict(zip(feature_schema_ids, feature_schema_ids)) |
| 20 | + ontology_mapping = dict(zip(src_feature_schema_ids, |
| 21 | + dest_feature_schema_ids)) |
21 | 22 |
|
22 | 23 | try: |
23 | 24 | queues = destination_project.task_queues() |
|
0 commit comments