File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1097,7 +1097,23 @@ def _view(self):
10971097
10981098 @property
10991099 def version_object (self ):
1100- return parse_version (self .version )
1100+ """Parse version string, handling special Galaxy version format."""
1101+ GALAXY_VERSION_SUFFIX = "+galaxy"
1102+ version = self .version
1103+
1104+ # Check if version has Galaxy suffix that we need to modify (e.g., "1.0+galaxy123")
1105+ if GALAXY_VERSION_SUFFIX not in version :
1106+ return parse_version (version )
1107+
1108+ base_version , suffix = version .split (GALAXY_VERSION_SUFFIX , 1 )
1109+
1110+ # Handle Galaxy versions that need numeric sorting
1111+ if suffix :
1112+ # Per PEP-440 a version like <base_version>+galaxy<suffix> would be sorted lexicographically if not separated by a '.'.
1113+ # Injecting a '.' here will force a numeric sort if the suffix is an integer, otherwise the outcome will be the same.
1114+ version = f"{ base_version } { GALAXY_VERSION_SUFFIX } .{ suffix .lstrip ('.' )} "
1115+
1116+ return parse_version (version )
11011117
11021118 @property
11031119 def sa_session (self ):
You can’t perform that action at this time.
0 commit comments