From 4886efcaf7a1bcf82080b4cb8fc8d590cd8ac27f Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 11 Oct 2024 13:02:35 +0100 Subject: [PATCH 1/3] Make default for `figsize` a Vector so it can be written to TOML This is needed so that `makie_post_processing.generate_example_input_file()` can work. Also requires us to convert `figsize` back to a `Tuple` before we use it, because a `Tuple` is required by Makie. --- .../makie_post_processing/src/makie_post_processing.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makie_post_processing/makie_post_processing/src/makie_post_processing.jl b/makie_post_processing/makie_post_processing/src/makie_post_processing.jl index 1034df1a0..b881ddfa7 100644 --- a/makie_post_processing/makie_post_processing/src/makie_post_processing.jl +++ b/makie_post_processing/makie_post_processing/src/makie_post_processing.jl @@ -826,7 +826,7 @@ function _setup_single_input!(this_input_dict::OrderedDict{String,Any}, include_patterns=String[], exclude_patterns=String[], ranks=mk_int[], - figsize=(600,800) + figsize=[600,800] ) # We allow top-level options in the post-processing input file @@ -8492,7 +8492,7 @@ function timing_data(run_info::Tuple; plot_prefix=nothing, threshold=nothing, if figsize === nothing if input !== nothing - figsize = input.figsize + figsize = Tuple(input.figsize) else figsize = (600,800) end @@ -8602,7 +8602,7 @@ function timing_data(run_info; plot_prefix=nothing, threshold=nothing, if figsize === nothing if input !== nothing - figsize = input.figsize + figsize = Tuple(input.figsize) else figsize = (600,800) end From 2466dbc5c9595245f2705694469c9d217ab249c3 Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 11 Oct 2024 13:07:21 +0100 Subject: [PATCH 2/3] Make Python venv setup more portable in machine setup scripts Avoids errors when `python` is not a valid shell command, or when it runs Python-2 instead of Python-3. --- machines/shared/machine_setup_stage_two.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machines/shared/machine_setup_stage_two.jl b/machines/shared/machine_setup_stage_two.jl index 5c8714d1e..12b847917 100644 --- a/machines/shared/machine_setup_stage_two.jl +++ b/machines/shared/machine_setup_stage_two.jl @@ -11,7 +11,7 @@ batch_system = mk_preferences["batch_system"] if mk_preferences["use_plots"] == "y" python_venv_path = joinpath(repo_dir, "machines", "artifacts", "mk_venv") activate_path = joinpath(python_venv_path, "bin", "activate") - run(`bash -c "python -m venv --system-site-packages $python_venv_path; source $activate_path; PYTHONNOUSERSITE=1 pip install matplotlib"`) + run(`bash -c "/usr/bin/env python3 -m venv --system-site-packages $python_venv_path; source $activate_path; PYTHONNOUSERSITE=1 pip install matplotlib"`) if batch_system open("julia.env", "a") do io println(io, "source $activate_path") From d8f43ed269324bc79f68175c9bb9b917785e2383 Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 11 Oct 2024 13:11:34 +0100 Subject: [PATCH 3/3] Mention makie_post_processing.generate_example_input_file() in docs --- docs/src/post_processing_notes.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/src/post_processing_notes.md b/docs/src/post_processing_notes.md index 6ef936e99..d474a6892 100644 --- a/docs/src/post_processing_notes.md +++ b/docs/src/post_processing_notes.md @@ -19,6 +19,11 @@ julia> makie_post_process("runs/example-run1/", "runs/example-run2/", "runs/exam What this function does is controlled by the settings in an input file, by default `post_processing_input.toml`. +!!! note "Example input file" + You can generate an example input file, with all the options shown (with + their default values) but commented out, by running + `makie_post_processing.generate_example_input_file()`. + To run from the command line ```julia julia --project run_makie_post_processing.jl dir1 [dir2 [dir3 ...]]