Skip to content

Commit

Permalink
Tweaks to sbml testing
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Nov 15, 2023
1 parent f2b07ac commit 9d33e03
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pyneuroml/sbml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,23 @@ def validate_sbml_files(input_files: List[str], strict_units: bool = False) -> b

# print results
print("-" * 80)
print(f"{'validation error(s)':<25}: {len(errors)}")
print(f"{'validation warning(s)':<25}: {len(warnings)}")
print(f"{'Validating SBML'}: {file_name}")
print(f"{'Validation error(s)':<25}: {len(errors)}")
print(f"{'Validation warning(s)':<25}: {len(warnings)}")

if len(errors) > 0:
all_valid = False
print("--- errors ---")
for kerr in enumerate(errors):
print(f"E{kerr}: {error.getCategoryAsString()} L{error.getLine()}")
print(f"E{kerr[0]}: {error.getCategoryAsString()} L{error.getLine()}")
print(
f"[{error.getSeverityAsString()}] {error.getShortMessage()} | {error.getMessage()}"
)

if len(warnings) > 0:
print("--- warnings ---")
for kwarn in enumerate(warnings):
print(f"E{kwarn}: {error.getCategoryAsString()} L{error.getLine()}")
print(f"E{kwarn[0]}: {error.getCategoryAsString()} L{error.getLine()}")
print(
f"[{error.getSeverityAsString()}] {error.getShortMessage()} | {error.getMessage()}"
)
Expand Down

0 comments on commit 9d33e03

Please sign in to comment.