Skip to content

Commit

Permalink
Update the function signature and docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
anitacaron committed Oct 14, 2024
1 parent bd11739 commit 4b5dac8
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions util/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import urllib.request
from datetime import datetime
from subprocess import check_call
from typing import Dict, List, Optional

import requests
import yaml
Expand Down Expand Up @@ -343,16 +344,31 @@ def load_yaml(filepath):


def robot_prepare_ontology(
o_path,
o_out_path,
o_metrics_path,
base_iris,
make_base,
robot_prefixes=None,
o_path: str,
o_out_path: str,
o_metrics_path: str,
base_iris: List[str],
make_base: bool,
robot_prefixes: Optional[Dict[str, str]] = None,
robot_opts="-v",
):
) -> None:
"""
Run ROBOT mesure on the base, but generate it first if not available
Prepare an ontology for the dashboard by running ROBOT commands.
This function merges the input ontology, optionally extracts a base version,
measures metrics, and outputs the prepared ontology.
Args:
o_path (str): Path to the input ontology file.
o_out_path (str): Path to save the output ontology file.
o_metrics_path (str): Path to save the metrics file.
base_iris (List[str]): List of base IRIs to use for extraction.
make_base (bool): Whether to extract a base version of the ontology.
robot_prefixes (Optional[Dict[str, str]]): Dictionary of prefix mappings for ROBOT.
robot_opts (str): Additional ROBOT options.
Returns:
None
"""
logging.info("Preparing %s for dashboard.", o_path)

Expand Down

0 comments on commit 4b5dac8

Please sign in to comment.