From e0a4bf0f7f47efe5d7bc185a4de94e59e7d70466 Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Tue, 13 Jul 2021 13:21:53 +0100 Subject: [PATCH 1/4] added a sorted print statement. --- esmvalcore/_recipe_checks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esmvalcore/_recipe_checks.py b/esmvalcore/_recipe_checks.py index 1133a36639..69b79a1791 100644 --- a/esmvalcore/_recipe_checks.py +++ b/esmvalcore/_recipe_checks.py @@ -142,7 +142,7 @@ def data_availability(input_files, var, dirnames, filenames): if missing_years: raise RecipeError( "No input data available for years {} in files {}".format( - ", ".join(str(year) for year in missing_years), input_files)) + ", ".join(str(year) for year in sorted(missing_years)), input_files)) def tasks_valid(tasks): From 2a371af8823d1d1e587280ef07a1bfb5b5e5f452 Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Tue, 13 Jul 2021 14:20:54 +0100 Subject: [PATCH 2/4] Update esmvalcore/_recipe_checks.py --- esmvalcore/_recipe_checks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esmvalcore/_recipe_checks.py b/esmvalcore/_recipe_checks.py index 69b79a1791..71caae2d13 100644 --- a/esmvalcore/_recipe_checks.py +++ b/esmvalcore/_recipe_checks.py @@ -142,7 +142,8 @@ def data_availability(input_files, var, dirnames, filenames): if missing_years: raise RecipeError( "No input data available for years {} in files {}".format( - ", ".join(str(year) for year in sorted(missing_years)), input_files)) + ", ".join(str(year) for year in sorted(missing_years)), + input_files)) def tasks_valid(tasks): From 122d5be6b2b85010707324d27befb06b6a02eacf Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Wed, 14 Jul 2021 12:36:38 +0100 Subject: [PATCH 3/4] Update esmvalcore/_recipe_checks.py Co-authored-by: Javier Vegas-Regidor --- esmvalcore/_recipe_checks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esmvalcore/_recipe_checks.py b/esmvalcore/_recipe_checks.py index 71caae2d13..89e27bfe1e 100644 --- a/esmvalcore/_recipe_checks.py +++ b/esmvalcore/_recipe_checks.py @@ -142,7 +142,7 @@ def data_availability(input_files, var, dirnames, filenames): if missing_years: raise RecipeError( "No input data available for years {} in files {}".format( - ", ".join(str(year) for year in sorted(missing_years)), + ", ".join(str(year) for year in sorted(missing_years)), input_files)) From b0dfd2a89a89621c9f2381fcce9a04ba34c51bbc Mon Sep 17 00:00:00 2001 From: Javier Vegas-Regidor Date: Wed, 14 Jul 2021 14:55:20 +0200 Subject: [PATCH 4/4] Fix failing test --- tests/integration/test_recipe_checks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/test_recipe_checks.py b/tests/integration/test_recipe_checks.py index 5cec9b2abf..1a4f0e290c 100644 --- a/tests/integration/test_recipe_checks.py +++ b/tests/integration/test_recipe_checks.py @@ -40,7 +40,7 @@ (FILES[:-1], dict(VAR), ERR_RANGE.format('2025', FILES[:-1])), (FILES[:-2], dict(VAR), ERR_RANGE.format('2024, 2025', FILES[:-2])), ([FILES[1]] + [FILES[3]], dict(VAR), - ERR_RANGE.format('2024, 2025, 2020, 2022', [FILES[1]] + [FILES[3]])), + ERR_RANGE.format('2020, 2022, 2024, 2025', [FILES[1]] + [FILES[3]])), ]