Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update main print
Browse files Browse the repository at this point in the history
tlambert03 committed Jun 30, 2023
1 parent 610f6e3 commit 58e06f9
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/ome_autogen/main.py
Original file line number Diff line number Diff line change
@@ -34,18 +34,14 @@ def build_model(
"""Convert the OME schema to a python model."""
config = get_config()
transformer = SchemaTransformer(print=False, config=config)

_print_gray(f"Processing {getattr(schema_file ,'name', schema_file)}...")
transformer.process_sources([Path(schema_file).resolve().as_uri()])

_print_gray("Writing Files...")
# xsdata doesn't support output path
with _util.cd(output_dir):
with _util.cd(output_dir): # xsdata doesn't support output path
_print_gray("Writing Files...")
transformer.process_classes()

if not do_formatting and not do_mypy:
_print_green(f"OME python model created at {OUTPUT_PACKAGE}")
return

if do_formatting:
_print_gray("Running black and ruff ...")

@@ -67,7 +63,6 @@ def build_model(
except subprocess.CalledProcessError as e:
raise RuntimeError(f"mypy errors:\n\n{e.output.decode()}") from e

# print a bold green checkmark
_print_green(f"OME python model created at {OUTPUT_PACKAGE}")


0 comments on commit 58e06f9

Please sign in to comment.