From 478d7b97ec951206d4b69772275235b8d56194d6 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Tue, 29 Oct 2024 12:13:43 -0400 Subject: [PATCH] Delete unused code --- .buildkite/pipeline.yml | 6 +- .../self_reference_or_path.jl | 57 ------------------- 2 files changed, 3 insertions(+), 60 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 43c0e9a66a..a8126280d9 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -223,7 +223,7 @@ steps: julia --color=yes --project=examples examples/hybrid/driver.jl --config_file $CONFIG_PATH/sphere_baroclinic_wave_conservation_ft64.yml --job_id sphere_baroclinic_wave_conservation_ft64 artifact_paths: "sphere_baroclinic_wave_conservation_ft64/output_active/*" - + - label: ":computer: baroclinic wave check conservation with sources" command: > julia --color=yes --project=examples examples/hybrid/driver.jl --config_file $CONFIG_PATH/sphere_baroclinic_wave_conservation_source.yml @@ -352,7 +352,7 @@ steps: artifact_paths: "aquaplanet_rhoe_equil_clearsky_tvinsol_0M_slabocean/output_active/*" agents: slurm_mem: 20GB - + - label: ":computer: aquaplanet (ρe_tot) slabocean equilmoist allsky radiation monin_obukhov varying insolation float64" command: > julia --color=yes --project=examples examples/hybrid/driver.jl @@ -361,7 +361,7 @@ steps: artifact_paths: "aquaplanet_rhoe_equil_clearsky_tvinsol_0M_slabocean_ft64/output_active/*" agents: slurm_mem: 20GB - + - label: ":computer: aquaplanet (ρe_tot) rcemipii with diagnostic edmf" command: > julia --color=yes --project=examples examples/hybrid/driver.jl diff --git a/reproducibility_tests/self_reference_or_path.jl b/reproducibility_tests/self_reference_or_path.jl index 8472e29653..efc729a54a 100644 --- a/reproducibility_tests/self_reference_or_path.jl +++ b/reproducibility_tests/self_reference_or_path.jl @@ -81,60 +81,3 @@ function self_reference_or_path() end return path end - -""" - get_main_branch_buildkite_path() - -Return the folder of the most recent buildkite run that contains a `ref_counter.jl` file, -and therefore also contains hdf5 files with output data. - -This is very similar to `self_reference_or_path`, except that it always returns a path, not -`:self_reference`. Functionality could be merged in a future PR. -""" -function get_main_branch_buildkite_path() - # TODO: Combine this method with `self_reference_or_path`, above. - cluster_data_prefix = "/central/scratch/esm/slurm-buildkite/climaatmos-main" - if !ispath(cluster_data_prefix) - if get(ENV, "BUILDKITE_PIPELINE_SLUG", nothing) == "climaatmos-ci" - error("No path found for comparison against main") - else - @warn "Buildkite reference data is not available locally; skipping \ - comparison against main" - return "" - end - end - - buildkite_paths = readdir(cluster_data_prefix; join = true) - filter!(buildkite_paths) do path - isdir(path) - end - if isempty(buildkite_paths) - @warn("no buildkite paths found") - return "" - end - sort!( - buildkite_paths; - by = f -> Dates.unix2datetime(stat(f).mtime), - rev = true, - ) # most recent build first - - # Find ref counters - ref_counters = -ones(Int, length(buildkite_paths)) - for (i, path) in enumerate(buildkite_paths) - ref_counter_file_main = joinpath(path, "ref_counter.jl") - if isfile(ref_counter_file_main) # set ref_counter value if file exists. - ref_counters[i] = - parse(Int, first(readlines(ref_counter_file_main))) - end - end - if all(ref_counters .== -1) - @warn("No `ref_counter.jl` files found") - return "" - end - - most_recent_max_counter_ind = argmax(ref_counters) - main_branch_data_path = buildkite_paths[most_recent_max_counter_ind] - @info "Comparing PR profiles against main with commit id: \ - $(basename(main_branch_data_path))" - return main_branch_data_path -end