Skip to content

Commit 4d81e26

Browse files
authored
Merge pull request #152 from multimeric/refactor
Refactor `RdfsImportEngine`
2 parents c615980 + 9c36fa4 commit 4d81e26

File tree

4 files changed

+274
-108
lines changed

4 files changed

+274
-108
lines changed

schema_automator/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,15 +473,15 @@ def import_owl(owlfile, output, **args):
473473
@click.argument('rdfsfile')
474474
@output_option
475475
@schema_name_option
476-
@click.option('--input-type', '-I',
476+
@click.option('--format', '-f',
477477
default='turtle',
478478
help="Input format, eg. turtle")
479479
@click.option('--identifier', '-I', help="Slot to use as identifier")
480480
@click.option('--model-uri', help="Model URI prefix")
481481
@click.option('--metamodel-mappings',
482482
help="Path to metamodel mappings YAML dictionary")
483483
@click.option('--output', '-o', help="Path to saved yaml schema")
484-
def import_rdfs(rdfsfile, output, metamodel_mappings, **args):
484+
def import_rdfs(rdfsfile: str, output: str, metamodel_mappings: str, schema_name: str, **args):
485485
"""
486486
Import an RDFS schema to LinkML
487487
@@ -494,7 +494,7 @@ def import_rdfs(rdfsfile, output, metamodel_mappings, **args):
494494
with open(metamodel_mappings) as f:
495495
mappings_obj = yaml.safe_load(f)
496496
sie = RdfsImportEngine(initial_metamodel_mappings=mappings_obj)
497-
schema = sie.convert(rdfsfile, **args)
497+
schema = sie.convert(rdfsfile, name=schema_name, **args)
498498
write_schema(schema, output)
499499

500500
@main.command()

0 commit comments

Comments
 (0)