E3SM-Project / polaris

Testing and analysis for OMEGA, MPAS-Ocean, MALI and MPAS-Seaice
BSD 3-Clause "New" or "Revised" License
6 stars 13 forks source link

Add a version check to load script #156

Closed xylar closed 9 months ago

xylar commented 10 months ago

If the load script is for a different polaris version, a developer is told to rerun the configure script.

Checklist

closes #155 closes #154

xylar commented 10 months ago

Testing

If the version in polaris/version.py matches the version in the load script, the everything proceeds as usual when the load script gets sourced. If the versions don't match, the output is something like:

$ source load_polaris_test_morpheus_gnu_openmpi.sh 
This load script is for a different version of polaris:
__version__ = '0.2.0'

Your code is version:
__version__ = '0.3.0-alpha.1'

You need to run ./configure_polaris_envs.py to update your conda 
environment and load script.
xylar commented 10 months ago

@sbrus89, this is ready for your review. Hopefully, it's pretty quick and easy.

xylar commented 9 months ago

@sbrus89, a reminder that this is waiting for your review (presumably by inspection).

xylar commented 9 months ago

Thanks @sbrus89!