diff --git a/.github/jobs/get_use_case_commands.py b/.github/jobs/get_use_case_commands.py index b4de2094b0..1e28e2e8f6 100755 --- a/.github/jobs/get_use_case_commands.py +++ b/.github/jobs/get_use_case_commands.py @@ -16,7 +16,7 @@ from internal.tests.use_cases.metplus_use_case_suite import METplusUseCaseSuite from metplus.util.string_manip import expand_int_string_to_list from docker_utils import VERSION_EXT - +from metplus import get_metplus_version # path to METplus install location in Docker METPLUS_DOCKER_LOC = '/metplus/METplus' @@ -38,6 +38,7 @@ 'gempak', ] + def handle_automation_env(host_name, reqs, work_dir): # if no env is specified, use metplus base environment conda_env = METPLUS_BASE_ENV @@ -74,13 +75,20 @@ def handle_automation_env(host_name, reqs, work_dir): else: py_embed_arg = '' + # get METplus version to determine Externals file to use + # to get METplotpy/METcalcpy/METdataio + # If stable release, get main branch, otherwise get develop + is_stable_release = len(get_metplus_version().split('-')) == 1 + externals_ext = '_stable.cfg' if is_stable_release else '.cfg' + # if any metplotpy/metcalcpy keywords are in requirements list, # add command to obtain and install METplotpy and METcalcpy if any([item for item in PLOTCALC_KEYWORDS if item in str(reqs).lower()]): + ce_file = os.path.join(work_dir, '.github', 'parm', + f'Externals_metplotcalcpy{externals_ext}') setup_env += ( f'cd {METPLUS_DOCKER_LOC};' - f'{work_dir}/manage_externals/checkout_externals' - f' -e {work_dir}/.github/parm/Externals_metplotcalcpy.cfg;' + f'{work_dir}/manage_externals/checkout_externals -e {ce_file};' f'{python_path} -m pip install {METPLUS_DOCKER_LOC}/../METplotpy;' f'{python_path} -m pip install {METPLUS_DOCKER_LOC}/../METcalcpy;' 'cd -;' @@ -88,10 +96,11 @@ def handle_automation_env(host_name, reqs, work_dir): # if metdataio is in requirements list, add command to obtain METdataio if 'metdataio' in str(reqs).lower(): + ce_file = os.path.join(work_dir, '.github', 'parm', + f'Externals_metdataio{externals_ext}') setup_env += ( f'cd {METPLUS_DOCKER_LOC};' - f'{work_dir}/manage_externals/checkout_externals' - f' -e {work_dir}/.github/parm/Externals_metdataio.cfg;' + f'{work_dir}/manage_externals/checkout_externals -e {ce_file};' f'{python_path} -m pip install {METPLUS_DOCKER_LOC}/../METdataio;' 'cd -;' ) @@ -117,6 +126,7 @@ def handle_automation_env(host_name, reqs, work_dir): return setup_env, py_embed_arg + def main(categories, subset_list, work_dir=None, host_name=os.environ.get('HOST_NAME')): all_commands = [] @@ -174,6 +184,7 @@ def main(categories, subset_list, work_dir=None, return all_commands + def handle_command_line_args(): # read command line arguments to determine which use cases to run if len(sys.argv) < 2: @@ -201,6 +212,7 @@ def handle_command_line_args(): return categories, subset_list, do_comparison + if __name__ == '__main__': categories, subset_list, _ = handle_command_line_args() all_commands = main(categories, subset_list) diff --git a/.github/parm/Externals_metdataio_stable.cfg b/.github/parm/Externals_metdataio_stable.cfg new file mode 100644 index 0000000000..3a6b51b4b2 --- /dev/null +++ b/.github/parm/Externals_metdataio_stable.cfg @@ -0,0 +1,9 @@ +[METdataio] +local_path = ../METdataio +protocol = git +required = True +repo_url = https://github.com/dtcenter/METdataio +branch = main_v2.0 + +[externals_description] +schema_version = 1.0.0 diff --git a/.github/parm/Externals_metplotcalcpy_stable.cfg b/.github/parm/Externals_metplotcalcpy_stable.cfg new file mode 100644 index 0000000000..b0486d0814 --- /dev/null +++ b/.github/parm/Externals_metplotcalcpy_stable.cfg @@ -0,0 +1,16 @@ +[METcalcpy] +local_path = ../METcalcpy +protocol = git +required = True +repo_url = https://github.com/dtcenter/METcalcpy +branch = main_v2.0 + +[METplotpy] +local_path = ../METplotpy +protocol = git +required = True +repo_url = https://github.com/dtcenter/METplotpy +branch = main_v2.0 + +[externals_description] +schema_version = 1.0.0 diff --git a/docs/Release_Guide/release_steps/metplus/update_manage_externals.rst b/docs/Release_Guide/release_steps/metplus/update_manage_externals.rst index c32b3f0e8a..850a55ae2a 100644 --- a/docs/Release_Guide/release_steps/metplus/update_manage_externals.rst +++ b/docs/Release_Guide/release_steps/metplus/update_manage_externals.rst @@ -1,9 +1,60 @@ Update the version numbers in the manage externals files -------------------------------------------------------- -build_components/Externals_stable.cfg +There are a few .cfg files used by Manage Externals that should +include the correct tag or branch that corresponds to the +METplus Coordinated Release for each METplus component. -Each of the components in these files has a tag associated with them. -Update the value for tag to the tag associated with the release for each -METplus component that is part of this METplus coordinated release, i.e. -MET should be v10.0.0 for the METplus 4.0.0 coordinated release. +**THIS MAY HAVE ALREADY BEEN DONE PRIOR TO THE RELEASE!** + +For a METplus X.Y.Z Coordinated Release, +the version of the components are typically: + +* **MET:** X+6 +* **METviewer:** X +* **METplotpy:** X-3 +* **METcalcpy:** X-3 +* **METdataio:** X-3 + +Examples: + +For the METplus **4.1**.0 release: + +* MET is **10.1**.0 +* METviewer is **4.1**.0 +* METplotpy is **1.1**.0 +* METcalcpy is **1.1**.0 +* METdataio is **1.1**.0 + +For the METplus **5.0**.0 release: + +* MET is **11.0**.0 +* METviewer is **5.0**.0 +* METplotpy is **2.0**.0 +* METcalcpy is **2.0**.0 +* METdataio is **2.0**.0 + +**This may not always be the case.** +When in doubt, check the components' repository or ask another developer. + +Update build_components/Externals_stable.cfg +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Ensure the *tag* for each component is correct. It should match the format +**vX.Y.Z** where X.Y.Z is the version of that component. +For example, MET should be **v11.0.0** for METplus 5.0.0. + + +Update .github/parm/Externals_metdataio_stable.cfg +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Ensure the *branch* value is correct. It should match the format +**main_vX.Y** where X.Y is the version of that component. +For example, METdataio should be **main_v2.0** for METplus 5.0.0. + +Update .github/parm/Externals_metplotcalcpy_stable.cfg +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Ensure the *branch* for each component is correct. It should match the format +**main_vX.Y** where X.Y is the version of that component. +For example, METplotpy and METcalcpy should be **main_v2.0** for METplus 5.0.0.