Skip to content

Commit

Permalink
Add option to display only names in table
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Dec 6, 2024
1 parent b53af2c commit 5915c7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mira/metamodel/comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,7 @@ def get_concept_comparison_table(
model1: TemplateModel,
model2: TemplateModel,
refinement_func: Callable[[str, str], bool] = None,
name_only: bool = False,
) -> pd.DataFrame:
"""Compare two template models by their concepts and return a table
Expand All @@ -927,6 +928,8 @@ def get_concept_comparison_table(
def _get_name_from_concept(concept: Concept) -> str:
# Get name with grounding and context (if available)
name = concept.display_name or concept.name or "N/A"
if name_only:
return name
if concept.get_curie():
name += f" ({':'.join(concept.get_curie())})"
if concept.context:
Expand Down

0 comments on commit 5915c7a

Please sign in to comment.