|
11 | 11 | from curies import Reference |
12 | 12 | from flask import Blueprint, current_app, render_template |
13 | 13 |
|
14 | | -from semra import EXACT_MATCH |
15 | 14 | from semra.client import BaseClient |
| 15 | +from semra.rules import EXACT_MATCH, MANUAL_MAPPING |
16 | 16 | from semra.web.shared import State, _figure_number |
17 | 17 |
|
18 | 18 | if t.TYPE_CHECKING: |
@@ -93,19 +93,20 @@ def mark_exact_incorrect(source: str, target: str) -> werkzeug.Response: |
93 | 93 | state = _flask_get_state() |
94 | 94 |
|
95 | 95 | import biomappings.resources |
96 | | - from biomappings.utils import MANUAL_MAPPING_CURATION |
97 | 96 |
|
98 | | - subject = NormalizedNamableReference.from_curie(source, name=client.get_concept_name(source)) |
| 97 | + subject_reference = NormalizedNamableReference.from_curie( |
| 98 | + source, name=client.get_concept_name(source) |
| 99 | + ) |
99 | 100 | target_reference = NormalizedNamableReference.from_curie( |
100 | 101 | target, name=client.get_concept_name(target) |
101 | 102 | ) |
102 | 103 |
|
103 | 104 | mapping = biomappings.resources.SemanticMapping.model_validate( |
104 | 105 | { |
105 | | - "subject": subject, |
| 106 | + "subject": subject_reference, |
106 | 107 | "predicate": EXACT_MATCH, |
107 | 108 | "object": target_reference, |
108 | | - "mapping_justification": MANUAL_MAPPING_CURATION, |
| 109 | + "mapping_justification": MANUAL_MAPPING, |
109 | 110 | "author": state.current_author, |
110 | 111 | "mapping_tool": "semra", |
111 | 112 | } |
|
0 commit comments