Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
64c2928
Initial logging cleanup in generate_FV3LAM_wflow.py
mkavulich Oct 12, 2022
6a07761
More updates for better logging and error messages
mkavulich Oct 12, 2022
4e06bf0
Set up logging in setup.py
mkavulich Oct 12, 2022
b49ce0b
Add check that config.yaml contains only variables found in config_de…
mkavulich Oct 13, 2022
c68d217
Add checks for required python version and checks to run_WE2E_tests.sh
mkavulich Oct 13, 2022
24211c1
More updates, fixes, and cleanup
mkavulich Oct 13, 2022
2cad66b
More error/logging cleanup in setup.py
mkavulich Oct 13, 2022
6e22e7d
More error/logging cleanup in setup.py and other files
mkavulich Oct 13, 2022
f749d15
More error/logging cleanup in setup.py
mkavulich Oct 14, 2022
c3cc0d3
Better logging name strategy, more error/logging cleanup in setup.py …
mkavulich Oct 14, 2022
0535f8d
Finish error/logging cleanup in setup.py, set_thompson_mp_fix_files.py
mkavulich Oct 15, 2022
f0507fb
Last set of initial changes! Now just need to test and review...
mkavulich Oct 15, 2022
fe53633
First big change from more extensive testing:
mkavulich Oct 15, 2022
a91df94
Add testing subprocess code back in per Daniel Abdi's advice; this is
mkavulich Oct 15, 2022
2ba941a
Forgot to set up logger for check_for_preexist_dir_file.py; not sure …
mkavulich Oct 15, 2022
a90be2d
More fixes to Daniels tests
mkavulich Oct 15, 2022
6389c76
Add missing import to fix failing test
mkavulich Oct 19, 2022
c76df4f
Address some comments from Daniel: implement logging.info as its own
mkavulich Oct 19, 2022
3835b9b
Fail with error if model executable does not exist
mkavulich Oct 19, 2022
6f56ed6
Revert "Fail with error if model executable does not exist"
mkavulich Oct 19, 2022
5b7093e
Restore "verbose" functionality now that we have a function
mkavulich Oct 20, 2022
2d4f5b0
Missed one VERBOSE pass
mkavulich Oct 20, 2022
d2c9cbf
The f-string "=" specifier is not supported for python 3.6 (our minim…
mkavulich Oct 20, 2022
73a5c50
Address reviewer comments
mkavulich Oct 21, 2022
d581228
Comment to clarify use of manual "raise" in setup.py
mkavulich Oct 21, 2022
d525918
One more comment addressed
mkavulich Oct 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions tests/WE2E/run_WE2E_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,63 @@ WE2Edir="$TESTSdir/WE2E"
#
#-----------------------------------------------------------------------
#
# Run python checks
#
#-----------------------------------------------------------------------
#

# This line will return two numbers: the python major and minor versions
pyversion=($(/usr/bin/env python3 -c 'import platform; major, minor, patch = platform.python_version_tuple(); print(major); print(minor)'))

#Now, set an error check variable so that we can print all python errors rather than just the first
pyerrors=0

# Check that the call to python3 returned no errors, then check if the
# python3 minor version is 6 or higher
if [[ -z "$pyversion" ]];then
print_info_msg "\

Error: python3 not found"
pyerrors=$((pyerrors+1))
else
if [[ ${#pyversion[@]} -lt 2 ]]; then
print_info_msg "\

Error retrieving python3 version"
pyerrors=$((pyerrors+1))
elif [[ ${pyversion[1]} -lt 6 ]]; then
print_info_msg "\

Error: python version must be 3.6 or higher
python version: ${pyversion[*]}"
pyerrors=$((pyerrors+1))
fi
fi

#Next, check for the non-standard python packages: jinja2, yaml, and f90nml
pkgs=(jinja2 yaml f90nml)
for pkg in ${pkgs[@]} ; do
if ! /usr/bin/env python3 -c "import ${pkg}" &> /dev/null; then
print_info_msg "\

Error: python module ${pkg} not available"
pyerrors=$((pyerrors+1))
fi
done

#Finally, check if the number of errors is >0, and if so exit with helpful message
if [ $pyerrors -gt 0 ];then
print_err_msg_exit "\
Errors found: check your python environment

Instructions for setting up python environments can be found on the web:
https://github.com/ufs-community/ufs-srweather-app/wiki/Getting-Started

"
fi
#
#-----------------------------------------------------------------------
#
Comment thread
danielabdi-noaa marked this conversation as resolved.
# Save current shell options (in a global array). Then set new options
# for this script or function.
#
Expand Down
2 changes: 1 addition & 1 deletion ush/config_defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ user:
#
#-----------------------------------------------------------------------
MACHINE: "BIG_COMPUTER"
ACCOUNT: "project_name"
ACCOUNT: ""

#----------------------------
# PLATFORM config parameters
Expand Down
Loading