From 357a124f10e2cabf8cabb5b9ced05a43593e6a89 Mon Sep 17 00:00:00 2001 From: cmdupuis3 Date: Tue, 7 Jul 2026 13:07:42 -0500 Subject: [PATCH 1/2] Connectivity benchmarks: gate larger files --- benchmarks/bench_connectivity.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/benchmarks/bench_connectivity.py b/benchmarks/bench_connectivity.py index 4deee0811..4134d2191 100644 --- a/benchmarks/bench_connectivity.py +++ b/benchmarks/bench_connectivity.py @@ -25,6 +25,11 @@ "7.5km": "/glade/campaign/cisl/vast/uxarray/data/dyamond/7.5km/grid.nc", "3.75km": "/glade/campaign/cisl/vast/uxarray/data/dyamond/3.75km/grid.nc"} +# Determines if all file paths exist and are accesible +all_paths_exist = True +for file_path in dyamond_path_dict.values(): + all_paths_exist = all_paths_exist and os.path.exists(file_path) + file_path_dict = oQU_path_dict | dyamond_path_dict From 509477a008ec238477d71a8065d31776e62dfd11 Mon Sep 17 00:00:00 2001 From: cmdupuis3 Date: Tue, 7 Jul 2026 14:37:28 -0500 Subject: [PATCH 2/2] Connectivity benchmarks: make gating actually work --- benchmarks/bench_connectivity.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/benchmarks/bench_connectivity.py b/benchmarks/bench_connectivity.py index 4134d2191..de1bf3895 100644 --- a/benchmarks/bench_connectivity.py +++ b/benchmarks/bench_connectivity.py @@ -30,14 +30,21 @@ for file_path in dyamond_path_dict.values(): all_paths_exist = all_paths_exist and os.path.exists(file_path) -file_path_dict = oQU_path_dict | dyamond_path_dict +file_path_dict = oQU_path_dict +if all_paths_exist: + file_path_dict = file_path_dict | dyamond_path_dict class GridBenchmark: """Class used as a template for benchmarks requiring a ``Grid`` in this module across both resolutions.""" param_names = ['resolution', ] - params = [['480km', '120km', '30km', '15km', '7.5km', '3.75km'], ] + + # Conditionally available; could get annoying if there are downstream tools relying on it. + if all_paths_exist: + params = [['480km', '120km', '30km', '15km', '7.5km', '3.75km'], ] + else: + params = [['480km', '120km'], ] def setup(self, resolution, *args, **kwargs): self.uxgrid = ux.open_grid(file_path_dict[resolution])