Skip to content

Commit 394664b

Browse files
committed
Fix petablint for v2 problems
Skip `validate_yaml_semantics` for PEtab v2. Those errors will be caught elsewhere. Closes #428.
1 parent 876c781 commit 394664b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

petab/petablint.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from jsonschema.exceptions import ValidationError as SchemaValidationError
1313

1414
import petab.v1 as petab
15+
from petab.v1 import validate_yaml_semantics, validate_yaml_syntax
1516
from petab.v1.C import FORMAT_VERSION
16-
from petab.v1.yaml import validate
1717
from petab.versions import get_major_version
1818

1919
logger = logging.getLogger(__name__)
@@ -159,7 +159,7 @@ def main():
159159

160160
if args.yaml_file_name:
161161
try:
162-
validate(args.yaml_file_name)
162+
validate_yaml_syntax(args.yaml_file_name)
163163
except SchemaValidationError as e:
164164
path = ""
165165
if e.absolute_path:
@@ -181,6 +181,8 @@ def main():
181181

182182
match get_major_version(args.yaml_file_name):
183183
case 1:
184+
validate_yaml_semantics(args.yaml_file_name)
185+
184186
if petab.is_composite_problem(args.yaml_file_name):
185187
# TODO: further checking:
186188
# https://github.com/ICB-DCM/PEtab/issues/191

0 commit comments

Comments
 (0)