diff --git a/tests/integration/generated/directions_compy.md b/tests/integration/generated/directions_compy.md index b83b5ddb..8d48b087 100644 --- a/tests/integration/generated/directions_compy.md +++ b/tests/integration/generated/directions_compy.md @@ -86,32 +86,17 @@ cp /compyfs/www/zppy_test_resources/expected_complete_run expected_complete_run_ ### test_bash_generation ``` -rm -rf /compyfs/www/zppy_test_resources/expected_bash_files cd -# Your output will now become the new expectation. -# You can just move (i.e., not copy) the output since re-running this test will re-generate the output. -mv test_bash_generation_output/post/scripts /compyfs/www/zppy_test_resources/expected_bash_files -# Rerun test -python -u -m unittest tests/integration/test_bash_generation.py +chmod u+x tests/integration/generated/update_bash_generation_expected_files_compy.sh +./tests/integration/generated/update_bash_generation_expected_files_compy.sh ``` ### test_bundles ``` -rm -rf /compyfs/www/zppy_test_resources/expected_bundles -# Your output will now become the new expectation. -# Copy output so you don't have to rerun zppy to generate the output. -cp -r /compyfs/www/fors729/zppy_test_bundles_www//v2.LR.historical_0201 /compyfs/www/zppy_test_resources/expected_bundles -mkdir -p /compyfs/www/zppy_test_resources/expected_bundles/bundle_files -cp -r /compyfs/fors729/zppy_test_bundles_output//v2.LR.historical_0201/post/scripts/bundle*.bash /compyfs/www/zppy_test_resources/expected_bundles/bundle_files -cd /compyfs/www/zppy_test_resources/expected_bundles -# Remove the image check failures, so they don't end up in the expected files. -rm -rf image_check_failures -# This file will list all the expected images. -find . -type f -name '*.png' > ../image_list_expected_bundles.txt cd -# Rerun test -python -u -m unittest tests/integration/test_bundles.py +chmod u+x tests/integration/generated/update_bundles_expected_files_compy.sh +./tests/integration/generated/update_bundles_expected_files_compy.sh ``` ### test_campaign @@ -132,30 +117,17 @@ mv test_campaign_high_res_v1_output/post/scripts/*.settings /compyfs/www/zppy_te ### test_complete_run ``` -rm -rf /compyfs/www/zppy_test_resources/expected_complete_run -# Your output will now become the new expectation. -# Copy output so you don't have to rerun zppy to generate the output. -cp -r /compyfs/www/fors729/zppy_test_complete_run_www//v2.LR.historical_0201 /compyfs/www/zppy_test_resources/expected_complete_run -cd /compyfs/www/zppy_test_resources/expected_complete_run -# Remove the image check failures, so they don't end up in the expected files. -rm -rf image_check_failures -# This file will list all the expected images. -find . -type f -name '*.png' > ../image_list_expected_complete_run.txt cd -# Rerun test -python -u -m unittest tests/integration/test_complete_run.py +chmod u+x tests/integration/generated/update_complete_run_expected_files_compy.sh +./tests/integration/generated/update_complete_run_expected_files_compy.sh ``` ### test_defaults ``` -rm -rf /compyfs/www/zppy_test_resources/test_defaults_expected_files -mkdir -p /compyfs/www/zppy_test_resources/test_defaults_expected_files -# Your output will now become the new expectation. -# You can just move (i.e., not copy) the output since re-running this test will re-generate the output. -mv test_defaults_output/post/scripts/*.settings /compyfs/www/zppy_test_resources/test_defaults_expected_files -# Rerun test -python -u -m unittest tests/integration/test_defaults.py +cd +chmod u+x tests/integration/generated/update_defaults_expected_files_compy.sh +./tests/integration/generated/update_defaults_expected_files_compy.sh ``` ## Commands to generate official expected results for a release diff --git a/tests/integration/generated/test_complete_run_compy.cfg b/tests/integration/generated/test_complete_run_compy.cfg index 192afdf1..5718dff6 100644 --- a/tests/integration/generated/test_complete_run_compy.cfg +++ b/tests/integration/generated/test_complete_run_compy.cfg @@ -70,11 +70,13 @@ years = "1850:1854:2", vars = "LAISHA,LAISUN" ts_fmt = "cmip" - [[ land_monthly_glb ]] + [[ lnd_monthly_glb ]] frequency = "monthly" - input_files = "eam.h0" - input_subdir = "archive/atm/hist" + input_files = "elm.h0" + input_subdir = "archive/lnd/hist" mapping_file = "glb" + vars = "LAISHA,LAISUN" + years = "1850:1860:5", [[ rof_monthly ]] extra_vars = 'areatotal2' @@ -179,6 +181,7 @@ climo_years ="1850-1854", "1855-1860", experiment_name = "v2.LR.historical_0201" figstr = "v2_historical_0201" moc_file=mocTimeSeries_1850-1860.nc +plots_lnd = "LAISHA,LAISUN" ts_num_years = 5 ts_years = "1850-1854", "1850-1860", walltime = "00:30:00" @@ -186,7 +189,7 @@ years = "1850-1860", [ilamb] active = True -grids = '180x360_aave' +grid = '180x360_aave' nodes = 8 partition = "slurm" short_name = 'v2.LR.historical_0201' diff --git a/tests/integration/generated/test_debug_compy.cfg b/tests/integration/generated/test_debug_compy.cfg index 951b188d..ddec59fc 100644 --- a/tests/integration/generated/test_debug_compy.cfg +++ b/tests/integration/generated/test_debug_compy.cfg @@ -47,7 +47,7 @@ years = "1850:1854:2", [ilamb] active = True -grids = '180x360_aave' +grid = '180x360_aave' nodes = 8 partition = "slurm" short_name = 'v2.LR.historical_0201' diff --git a/tests/integration/generated/update_bash_generation_expected_files_compy.sh b/tests/integration/generated/update_bash_generation_expected_files_compy.sh new file mode 100644 index 00000000..655e4e23 --- /dev/null +++ b/tests/integration/generated/update_bash_generation_expected_files_compy.sh @@ -0,0 +1,10 @@ +# Run this script to update expected files for test_bash_generation.py +# Run from the top level of the zppy repo +# Run as `./tests/integration/generated/update_bash_generation_expected_files.sh` + +rm -rf /compyfs/www/zppy_test_resources/expected_bash_files +# Your output will now become the new expectation. +# You can just move (i.e., not copy) the output since re-running this test will re-generate the output. +mv test_bash_generation_output/post/scripts /compyfs/www/zppy_test_resources/expected_bash_files +# Rerun test +python -u -m unittest tests/integration/test_bash_generation.py diff --git a/tests/integration/generated/update_bundles_expected_files_compy.sh b/tests/integration/generated/update_bundles_expected_files_compy.sh new file mode 100644 index 00000000..b376e881 --- /dev/null +++ b/tests/integration/generated/update_bundles_expected_files_compy.sh @@ -0,0 +1,20 @@ +# Run this script to update expected files for test_bundles.py +# Run from the top level of the zppy repo +# Run as `./tests/integration/generated/update_bundles_expected_files.sh` + +# Remove old expected files. +rm -rf /compyfs/www/zppy_test_resources/expected_bundles +# Your output will now become the new expectation. +# Copy output so you don't have to rerun zppy to generate the output. +cp -r /compyfs/www/fors729/zppy_test_bundles_www/unique_id/v2.LR.historical_0201 /compyfs/www/zppy_test_resources/expected_bundles +mkdir -p /compyfs/www/zppy_test_resources/expected_bundles/bundle_files +cp -r /compyfs/fors729/zppy_test_bundles_output/unique_id/v2.LR.historical_0201/post/scripts/bundle*.bash /compyfs/www/zppy_test_resources/expected_bundles/bundle_files +zppy_top_level=$(pwd) +cd /compyfs/www/zppy_test_resources/expected_bundles +# Remove the image check failures, so they don't end up in the expected files. +rm -rf image_check_failures +# This file will list all the expected images. +find . -type f -name '*.png' > ../image_list_expected_bundles.txt +cd ${zppy_top_level} +# Rerun test +python -u -m unittest tests/integration/test_bundles.py diff --git a/tests/integration/generated/update_campaign_expected_files_compy.sh b/tests/integration/generated/update_campaign_expected_files_compy.sh index 5e3779c7..3623d97e 100755 --- a/tests/integration/generated/update_campaign_expected_files_compy.sh +++ b/tests/integration/generated/update_campaign_expected_files_compy.sh @@ -1,6 +1,6 @@ # Run this script to update expected files for test_campaign.py # Run from the top level of the zppy repo -# Run as `./tests/integration/update_campaign_expected_files.sh` +# Run as `./tests/integration/generated/update_campaign_expected_files.sh` for campaign in "cryosphere" "cryosphere_override" "high_res_v1" "none" "water_cycle" "water_cycle_override" do diff --git a/tests/integration/generated/update_complete_run_expected_files_compy.sh b/tests/integration/generated/update_complete_run_expected_files_compy.sh new file mode 100644 index 00000000..ed264f09 --- /dev/null +++ b/tests/integration/generated/update_complete_run_expected_files_compy.sh @@ -0,0 +1,18 @@ +# Run this script to update expected files for test_complete_run.py +# Run from the top level of the zppy repo +# Run as `./tests/integration/generated/update_complete_run_expected_files.sh` + +# Remove old expected files. +rm -rf /compyfs/www/zppy_test_resources/expected_complete_run +# Your output will now become the new expectation. +# Copy output so you don't have to rerun zppy to generate the output. +cp -r /compyfs/www/fors729/zppy_test_complete_run_www/unique_id/v2.LR.historical_0201 /compyfs/www/zppy_test_resources/expected_complete_run +zppy_top_level=$(pwd) +cd /compyfs/www/zppy_test_resources/expected_complete_run +# Remove the image check failures, so they don't end up in the expected files. +rm -rf image_check_failures +# This file will list all the expected images. +find . -type f -name '*.png' > ../image_list_expected_complete_run.txt +cd ${zppy_top_level} +# Rerun test +python -u -m unittest tests/integration/test_complete_run.py diff --git a/tests/integration/generated/update_defaults_expected_files_compy.sh b/tests/integration/generated/update_defaults_expected_files_compy.sh new file mode 100644 index 00000000..64bfb634 --- /dev/null +++ b/tests/integration/generated/update_defaults_expected_files_compy.sh @@ -0,0 +1,11 @@ +# Run this script to update expected files for test_defaults.py +# Run from the top level of the zppy repo +# Run as `./tests/integration/generated/update_defaults_expected_files.sh` + +rm -rf /compyfs/www/zppy_test_resources/test_defaults_expected_files +mkdir -p /compyfs/www/zppy_test_resources/test_defaults_expected_files +# Your output will now become the new expectation. +# You can just move (i.e., not copy) the output since re-running this test will re-generate the output. +mv test_defaults_output/post/scripts/*.settings /compyfs/www/zppy_test_resources/test_defaults_expected_files +# Rerun test +python -u -m unittest tests/integration/test_defaults.py