Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Jul 1, 2024
1 parent 892ebfa commit 07beeae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions petabtests/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,17 @@ def write_problem(
# PEtab v1
problem = petab.Problem.from_yaml(yaml_path)
if lint_problem_v1(problem):
raise RuntimeError("Invalid PEtab problem, see messages above.")
raise RuntimeError(
"Invalid PEtab problem, see messages above."
)
else:
# v2
validation_result = lint_problem_v2(yaml_path)
if validation_result:
print(validation_result)
raise RuntimeError("Invalid PEtab problem, see messages above.")
raise RuntimeError(
"Invalid PEtab problem, see messages above."
)
except ModuleNotFoundError:
# old petab version (will fail validation for some v2 tests)
problem = petab.Problem.from_yaml(os.path.join(dir_, yaml_file))
Expand Down

0 comments on commit 07beeae

Please sign in to comment.