From df92874853e2294dcdbe3a649eda38a1e213aa1c Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Fri, 25 Nov 2022 15:10:40 +0100 Subject: [PATCH 1/3] update CI to Julia v1.7 and fix tests --- .github/workflows/ci.yml | 2 +- Project.toml | 4 ++-- README.md | 2 +- test/test_2d.jl | 8 ++++---- test/test_3d.jl | 6 +++--- test/test_manual.jl | 2 +- test/test_trixi2vtk.jl | 10 ++++------ 7 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dba318a..04847c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: fail-fast: false matrix: version: - - '1.6' + - '1.7' # - 'nightly' os: - ubuntu-latest diff --git a/Project.toml b/Project.toml index 91ef8bb..d0bce13 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Trixi2Vtk" uuid = "bc1476a1-1ca6-4cc3-950b-c312b255ff95" -authors = ["Michael Schlottke-Lakemper "] +authors = ["Michael Schlottke-Lakemper ", "Hendrik Ranocha "] version = "0.3.9-pre" [deps] @@ -20,4 +20,4 @@ StaticArrays = "0.12, 1.0" TimerOutputs = "0.5" Trixi = "0.4" WriteVTK = "1.7" -julia = "1.6" +julia = "1.7" diff --git a/README.md b/README.md index 7f2beb6..2d6fcfd 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ generate publication-quality visualizations. Trixi2Vtk is part of the ## Installation If you have not yet installed Julia, please [follow the instructions for your operating system](https://julialang.org/downloads/platform/). Trixi2Vtk works -with Julia v1.5. +with Julia v1.7. Trixi2Vtk is a registered Julia package. Hence, you can install it by executing the following commands in the Julia REPL: diff --git a/test/test_2d.jl b/test/test_2d.jl index ea4e3a1..5909be3 100644 --- a/test/test_2d.jl +++ b/test/test_2d.jl @@ -19,7 +19,7 @@ end @testset "2D" begin @testset "TreeMesh" begin isdir(outdir) && rm(outdir, recursive=true) - run_trixi(joinpath("tree_2d_dgsem", "elixir_advection_extended.jl"), maxiters=1) + run_trixi(joinpath(examples_dir(), "tree_2d_dgsem", "elixir_advection_extended.jl"), maxiters=1) @timed_testset "uniform mesh" begin if Sys.iswindows() @@ -75,7 +75,7 @@ end @testset "StructuredMesh" begin isdir(outdir) && rm(outdir, recursive=true) - run_trixi(joinpath("structured_2d_dgsem", "elixir_advection_waving_flag.jl"), maxiters=1) + run_trixi(joinpath(examples_dir(), "structured_2d_dgsem", "elixir_advection_waving_flag.jl"), maxiters=1) @timed_testset "waving flag" begin if Sys.isapple() @@ -122,7 +122,7 @@ end @testset "UnstructuredMesh2D" begin isdir(outdir) && rm(outdir, recursive=true) - run_trixi(joinpath("unstructured_2d_dgsem", "elixir_euler_basic.jl"), maxiters=1) + run_trixi(joinpath(examples_dir(), "unstructured_2d_dgsem", "elixir_euler_basic.jl"), maxiters=1) @timed_testset "basic" begin if Sys.isapple() @@ -148,7 +148,7 @@ end @testset "P4estMesh" begin isdir(outdir) && rm(outdir, recursive=true) - run_trixi(joinpath("p4est_2d_dgsem", "elixir_euler_source_terms_nonconforming_unstructured_flag.jl"), initial_refinement_level=0, maxiters=1) + run_trixi(joinpath(examples_dir(), "p4est_2d_dgsem", "elixir_euler_source_terms_nonconforming_unstructured_flag.jl"), initial_refinement_level=0, maxiters=1) @timed_testset "nonperiodic" begin if Sys.isapple() diff --git a/test/test_3d.jl b/test/test_3d.jl index 694ce6e..15e454b 100644 --- a/test/test_3d.jl +++ b/test/test_3d.jl @@ -19,7 +19,7 @@ end @testset "3D" begin @testset "TreeMesh" begin isdir(outdir) && rm(outdir, recursive=true) - run_trixi(joinpath("tree_3d_dgsem", "elixir_advection_extended.jl"), maxiters=1) + run_trixi(joinpath(examples_dir(), "tree_3d_dgsem", "elixir_advection_extended.jl"), maxiters=1) @timed_testset "uniform mesh" begin test_trixi2vtk("solution_000000.h5", outdir, @@ -40,7 +40,7 @@ end @testset "StructuredMesh" begin isdir(outdir) && rm(outdir, recursive=true) - run_trixi(joinpath("structured_3d_dgsem", "elixir_advection_basic.jl"), maxiters=1) + run_trixi(joinpath(examples_dir(), "structured_3d_dgsem", "elixir_advection_basic.jl"), maxiters=1) @timed_testset "basic" begin if Sys.isapple() @@ -66,7 +66,7 @@ end @testset "P4estMesh" begin isdir(outdir) && rm(outdir, recursive=true) - run_trixi(joinpath("p4est_3d_dgsem", "elixir_advection_amr_unstructured_curved.jl"), maxiters=1) + run_trixi(joinpath(examples_dir(), "p4est_3d_dgsem", "elixir_advection_amr_unstructured_curved.jl"), maxiters=1) @timed_testset "unstructured curved" begin if Sys.isapple() diff --git a/test/test_manual.jl b/test/test_manual.jl index 66eeb70..bb05478 100644 --- a/test/test_manual.jl +++ b/test/test_manual.jl @@ -18,7 +18,7 @@ isdir(outdir) && rm(outdir, recursive=true) @timed_testset "trixi2vtk error triggers" begin isdir(outdir) && rm(outdir, recursive=true) - run_trixi(joinpath("tree_2d_dgsem", "elixir_advection_extended.jl"), maxiters=1) + run_trixi(joinpath(examples_dir(), "tree_2d_dgsem", "elixir_advection_extended.jl"), maxiters=1) @testset "no input file" begin @test_throws ErrorException trixi2vtk() diff --git a/test/test_trixi2vtk.jl b/test/test_trixi2vtk.jl index 49f6983..6b1b3b9 100644 --- a/test/test_trixi2vtk.jl +++ b/test/test_trixi2vtk.jl @@ -1,14 +1,12 @@ -using Test: @test_nowarn, @test, @testset +using Test: @test_nowarn, @test, @testset, @test_skip using SHA using Trixi using Trixi2Vtk -# pathof(Trixi) returns /path/to/Trixi/src/Trixi.jl, dirname gives the parent directory -const EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples") - -function run_trixi(elixir; parameters...) - @test_nowarn trixi_include(joinpath(EXAMPLES_DIR, elixir); parameters...) +function run_trixi(elixir; kwargs...) + # evaluate examples in the scope of the module they're called from + trixi_include(@__MODULE__, elixir; kwargs...) end From 4a46384a4906d2efd1424aa6aa663839f14f4a06 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Fri, 25 Nov 2022 15:12:58 +0100 Subject: [PATCH 2/3] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index d0bce13..a9b563f 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Trixi2Vtk" uuid = "bc1476a1-1ca6-4cc3-950b-c312b255ff95" -authors = ["Michael Schlottke-Lakemper ", "Hendrik Ranocha "] +authors = ["Michael Schlottke-Lakemper ", "Hendrik Ranocha "] version = "0.3.9-pre" [deps] From 026492d958e8ac691cf8cd0e32f997eac5440540 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Fri, 25 Nov 2022 15:26:27 +0100 Subject: [PATCH 3/3] use newer ORdinaryDiffEq.jl in tests --- test/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Project.toml b/test/Project.toml index 734376c..b2d49ec 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -8,5 +8,5 @@ Trixi = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb" [compat] Documenter = "0.27" -OrdinaryDiffEq = "5.44" +OrdinaryDiffEq = "6" Trixi = "0.4"