Skip to content

Commit c6228a5

Browse files
committed
Update flask_components.py
1 parent de4d3d6 commit c6228a5

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/semra/web/flask_components.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from curies import Reference
1212
from flask import Blueprint, current_app, render_template
1313

14-
from semra import EXACT_MATCH
1514
from semra.client import BaseClient
15+
from semra.rules import EXACT_MATCH, MANUAL_MAPPING
1616
from semra.web.shared import State, _figure_number
1717

1818
if t.TYPE_CHECKING:
@@ -93,19 +93,20 @@ def mark_exact_incorrect(source: str, target: str) -> werkzeug.Response:
9393
state = _flask_get_state()
9494

9595
import biomappings.resources
96-
from biomappings.utils import MANUAL_MAPPING_CURATION
9796

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+
)
99100
target_reference = NormalizedNamableReference.from_curie(
100101
target, name=client.get_concept_name(target)
101102
)
102103

103104
mapping = biomappings.resources.SemanticMapping.model_validate(
104105
{
105-
"subject": subject,
106+
"subject": subject_reference,
106107
"predicate": EXACT_MATCH,
107108
"object": target_reference,
108-
"mapping_justification": MANUAL_MAPPING_CURATION,
109+
"mapping_justification": MANUAL_MAPPING,
109110
"author": state.current_author,
110111
"mapping_tool": "semra",
111112
}

0 commit comments

Comments
 (0)