44import shutil
55import subprocess
66from pathlib import Path
7- from typing import Optional , TextIO , List
7+ from typing import List , Optional , TextIO
88
99import requests
1010from linkml_runtime .loaders import yaml_loader
1111from sqlalchemy import create_engine
1212from sqlalchemy .orm import sessionmaker
1313
14- from semsql .builder .registry import registry_schema , path_to_ontology_registry
14+ from semsql .builder .registry import path_to_ontology_registry , registry_schema
1515from semsql .builder .registry .registry_schema import (CompressionEnum , Makefile ,
1616 MakefileRule , Ontology )
1717from semsql .utils .makefile_utils import makefile_to_string
@@ -117,7 +117,9 @@ def connect(owl_file: str):
117117 return session
118118
119119
120- def get_postprocessing_steps (ontology : str , db : str , registry_path : str = None ) -> List [str ]:
120+ def get_postprocessing_steps (
121+ ontology : str , db : str , registry_path : str = None
122+ ) -> List [str ]:
121123 """
122124 Get postprocessing steps for an ontology
123125
@@ -128,8 +130,10 @@ def get_postprocessing_steps(ontology: str, db: str, registry_path: str = None)
128130 if registry_path is None :
129131 registry_path = path_to_ontology_registry ()
130132 registry : registry_schema .Registry
131- registry = yaml_loader .load (str (registry_path ), target_class = registry_schema .Registry )
132- #steps = [step.format(ont=ontology, db=db) for step in registry.ontologies.get(ontology, []).post_processing_steps]
133+ registry = yaml_loader .load (
134+ str (registry_path ), target_class = registry_schema .Registry
135+ )
136+ # steps = [step.format(ont=ontology, db=db) for step in registry.ontologies.get(ontology, []).post_processing_steps]
133137 steps = registry .ontologies .get (ontology , [])
134138 return steps
135139
@@ -187,9 +191,7 @@ def compile_registry(registry_path: str, local_prefix_file: TextIO = None) -> st
187191 else :
188192 command = "cp $< $@"
189193 commands = [command ]
190- rule = MakefileRule (
191- target = target , dependencies = dependencies , commands = commands
192- )
194+ rule = MakefileRule (target = target , dependencies = dependencies , commands = commands )
193195 makefile .rules .append (rule )
194196 if not ont .suppress :
195197 onts .append (ont .id )
0 commit comments