Skip to content

Commit af957d1

Browse files
committed
formatting
1 parent 0eac277 commit af957d1

File tree

4 files changed

+355
-129
lines changed

4 files changed

+355
-129
lines changed

src/semsql/builder/builder.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
import shutil
55
import subprocess
66
from pathlib import Path
7-
from typing import Optional, TextIO, List
7+
from typing import List, Optional, TextIO
88

99
import requests
1010
from linkml_runtime.loaders import yaml_loader
1111
from sqlalchemy import create_engine
1212
from 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
1515
from semsql.builder.registry.registry_schema import (CompressionEnum, Makefile,
1616
MakefileRule, Ontology)
1717
from 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)

src/semsql/builder/cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def make(path, docker, **kwargs):
6565
builder.make(path, docker_config=docker_config, **kwargs)
6666
# check if path is db/{foo}.db using regular expression
6767
import re
68+
6869
matches = re.match(r"db/(\w+).db", path)
6970
if matches:
7071
ontology = matches.group(1)
@@ -74,8 +75,6 @@ def make(path, docker, **kwargs):
7475
subprocess.run(step, shell=True)
7576

7677

77-
78-
7978
@main.command()
8079
@click.option(
8180
"--local-prefixes",

0 commit comments

Comments
 (0)