Skip to content

Commit c26b509

Browse files
committed
format_version_tuple
1 parent 6d89e04 commit c26b509

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

petab/v2/problem.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,3 +1038,9 @@ def to_yaml(self, filename: str | Path):
10381038
from ..v1.yaml import write_yaml
10391039

10401040
write_yaml(self.model_dump(), filename)
1041+
1042+
@property
1043+
def format_version_tuple(self) -> tuple[int, int, int, str]:
1044+
"""The format version as a tuple of major/minor/patch `int`s and a
1045+
suffix."""
1046+
return parse_version(self.format_version)

0 commit comments

Comments
 (0)