Skip to content

Commit

Permalink
set default input version to the latest official release, which is th…
Browse files Browse the repository at this point in the history
…e 2nd highest coordinated release version number in the version lookup table. This assumes that the highest version is what is being developed towards
  • Loading branch information
georgemccabe committed Oct 28, 2024
1 parent 170f050 commit 57c2a8c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions metplus/component_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
},
}

# assumes the 2nd highest version in the table is the latest
# the highest version in the table is in development
LATEST_OFFICIAL_RELEASE = sorted(VERSION_LOOKUP.keys(), reverse=True)[1]

DEFAULT_OUTPUT_FORMAT = "v{X}.{Y}.{Z}{N}"

def get_component_version(input_component, input_version, output_component,
Expand Down Expand Up @@ -99,9 +103,9 @@ def main():
help='Name of METplus component to use to find version,'
' default is METplus.')
parser.add_argument('-v', '--input_version',
default=next(iter(VERSION_LOOKUP)),
default=LATEST_OFFICIAL_RELEASE,
help='version of input_component to search,'
' default is upcoming version')
' default is latest official release')
parser.add_argument('-o', '--output_component', required=True,
help='name of METplus component to obtain version')
parser.add_argument('-f', '--output_format',
Expand Down

0 comments on commit 57c2a8c

Please sign in to comment.