Skip to content

Commit 104f65c

Browse files
committed
lint
1 parent f5071f4 commit 104f65c

24 files changed

Lines changed: 1500 additions & 1145 deletions

ontologies.Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,17 @@ db/bao.owl: download/bao.owl
141141
robot merge -i $< -o $@
142142

143143

144+
download/orcid.owl: STAMP
145+
curl -L -s https://raw.githubusercontent.com/cthoyt/wikidata-orcid-ontology/main/orcid.owl > $@.tmp
146+
sha256sum -b $@.tmp > $@.sha256
147+
mv $@.tmp $@
148+
149+
.PRECIOUS: download/orcid.owl
150+
151+
db/orcid.owl: download/orcid.owl
152+
cp $< $@
153+
154+
144155
download/cpont.owl: STAMP
145156
curl -L -s https://w3id.org/cpont/cpont.owl > $@.tmp
146157
sha256sum -b $@.tmp > $@.sha256
@@ -305,4 +316,4 @@ download/%.owl: STAMP
305316
db/%.owl: download/%.owl
306317
robot merge -i $< -o $@
307318

308-
EXTRA_ONTOLOGIES = chiro ncit foodon chebiplus msio phenio comploinc bero aio reacto go go-lego bao cpont biolink biopax enanomapper mlo ito reactome-Homo-sapiens efo edam sweetAll lov schema-dot-org cosmo co_324
319+
EXTRA_ONTOLOGIES = chiro ncit foodon chebiplus msio phenio comploinc bero aio reacto go go-lego bao orcid cpont biolink biopax enanomapper mlo ito reactome-Homo-sapiens efo edam sweetAll lov schema-dot-org cosmo co_324

src/semsql/builder/builder.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class DockerConfig:
2222
"""
2323
Configuration for running ODK Docker image
2424
"""
25+
2526
odk_version: str = None # not used yet
2627
memory: str = None
2728

@@ -148,13 +149,15 @@ def compile_registry(registry_path: str, local_prefix_file: TextIO = None) -> st
148149
# main build target
149150
target = f"db/{ont.id}.owl"
150151
dependencies = [f"download/{ont.id}.owl"]
151-
if ont.has_imports or (ont.format and ont.format != 'rdfxml'):
152+
if ont.has_imports or (ont.format and ont.format != "rdfxml"):
152153
command = f"robot merge -i $< -o $@"
153154
elif ont.build_command:
154155
command = ont.build_command.format(ont=ont)
155156
else:
156157
command = f"cp $< $@"
157-
rule = MakefileRule(target=target, dependencies=dependencies, commands=[command])
158+
rule = MakefileRule(
159+
target=target, dependencies=dependencies, commands=[command]
160+
)
158161
makefile.rules.append(rule)
159162
if not ont.suppress:
160163
onts.append(ont.id)

src/semsql/builder/cli.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import click
44
from linkml_runtime import SchemaView
55
from linkml_runtime.utils.formatutils import underscore
6-
from semsql.linkml import path_to_schema
76
from sqlalchemy import text
87

98
import semsql.builder.builder as builder
9+
from semsql.linkml import path_to_schema
1010
from semsql.sqlutils.viewgen import get_viewdef
1111

1212

@@ -51,10 +51,12 @@ def make(path, docker):
5151

5252

5353
@main.command()
54-
@click.option("--local-prefixes",
55-
"-P",
56-
type=click.File(mode="w"),
57-
help="path to local prefixes file (will be overridden)")
54+
@click.option(
55+
"--local-prefixes",
56+
"-P",
57+
type=click.File(mode="w"),
58+
help="path to local prefixes file (will be overridden)",
59+
)
5860
@click.argument("registry")
5961
def generate_makefile(registry, local_prefixes):
6062
"""
@@ -125,9 +127,7 @@ def view2table(views, schema, index: bool):
125127
if index:
126128
for sn in sv.class_slots(cn):
127129
colname = underscore(sn)
128-
print(
129-
f"CREATE INDEX {tn}_{colname} ON {tn}({colname});"
130-
)
130+
print(f"CREATE INDEX {tn}_{colname} ON {tn}({colname});")
131131
else:
132132
logging.error(f"No view for {cn}")
133133

src/semsql/builder/prefixes/prefixes.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ prefix,base
5454
MSIO,http://purl.obolibrary.org/obo/MSIO_
5555
nmrCV,http://nmrML.org/nmrCV#NMR:
5656
loinc,https://loinc.org/
57+
orcid,https://orcid.org/
5758
evs.ncit,http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#
5859
old.fix,http://purl.org/obo/owl/FIX#
5960
mlo,http://www.a2rd.net.br/mlo#

src/semsql/builder/prefixes/prefixes_local.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ prefix,base
22
MSIO,http://purl.obolibrary.org/obo/MSIO_
33
nmrCV,http://nmrML.org/nmrCV#NMR:
44
loinc,https://loinc.org/
5+
orcid,https://orcid.org/
56
evs.ncit,http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#
67
old.fix,http://purl.org/obo/owl/FIX#
78
mlo,http://www.a2rd.net.br/mlo#

src/semsql/builder/registry/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
this_path = Path(__file__).parent
44

5+
56
def path_to_ontology_registry() -> Path:
67
"""
78
Returns path to the registry file

0 commit comments

Comments
 (0)