From 57c2a8cb415c3188093cc11dcd4acd36407a0c7f Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:52:44 -0600 Subject: [PATCH] set default input version to the latest official release, which is the 2nd highest coordinated release version number in the version lookup table. This assumes that the highest version is what is being developed towards --- metplus/component_versions.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/metplus/component_versions.py b/metplus/component_versions.py index 518bcc88f..97275e519 100755 --- a/metplus/component_versions.py +++ b/metplus/component_versions.py @@ -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, @@ -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',