Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase minimum julia version to v1.10 #101

Merged
merged 3 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,17 @@ jobs:
fail-fast: false
matrix:
version:
- '1.9'
- '1.10'
# - 'nightly'
os:
- ubuntu-latest
- windows-latest
arch:
- x64
include:
- version: '1.9'
- version: '1.10'
os: macOS-latest
arch: arm64
- version: '1.7'
os: ubuntu-latest
arch: x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ for human readability.

#### Changed

- The required Julia version is updated to v1.10.

#### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ StaticArrays = "0.12, 1.0"
TimerOutputs = "0.5"
Trixi = "0.5, 0.6, 0.7, 0.8, 0.9"
WriteVTK = "1.7"
julia = "1.7"
julia = "1.10"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.7 and newer.
with Julia v1.10 and newer.

Trixi2Vtk is a registered Julia package. Hence, you can install it by executing
the following commands in the Julia REPL:
Expand Down
62 changes: 29 additions & 33 deletions test/test_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -396,45 +396,41 @@ end
end
end

if VERSION >= v"1.8"
# Julia v1.7 heavily downgrades Trixi.jl. Subcell limiting is not yet supported.
# Therefore, only perform tests with Julia v1.8 or newer.
@testset "Subcell limiting coefficients" begin
isdir(outdir) && rm(outdir, recursive=true)
run_trixi(joinpath(examples_dir(), "tree_2d_dgsem", "elixir_euler_sedov_blast_wave_sc_subcell.jl"),
maxiters=10, initial_refinement_level=4)
@testset "Subcell limiting coefficients" begin
isdir(outdir) && rm(outdir, recursive=true)
run_trixi(joinpath(examples_dir(), "tree_2d_dgsem", "elixir_euler_sedov_blast_wave_sc_subcell.jl"),
maxiters=10, initial_refinement_level=4)

@timed_testset "without reinterpolation" begin
# Create and test output without reinterpolation
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000010.h5"), output_directory=outdir, reinterpolate=false)
outfilename = "solution_" * LEADING_ZEROS * "000010.vtu"
out_file = joinpath(outdir, outfilename)
@timed_testset "without reinterpolation" begin
# Create and test output without reinterpolation
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000010.h5"), output_directory=outdir, reinterpolate=false)
outfilename = "solution_" * LEADING_ZEROS * "000010.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
testname = "2d-treemesh-shockcapturing-subcell-no-reinterp"
cp(out_file, joinpath(artifacts_dir, testname * "-" * outfilename), force=true)
# save output file to `artifacts` to facilitate debugging of failing tests
testname = "2d-treemesh-shockcapturing-subcell-no-reinterp"
cp(out_file, joinpath(artifacts_dir, testname * "-" * outfilename), force=true)

# remote file path is actually a URL so it always has the same path structure
remote_filename = "2d/treemesh/dgsem_sedov_subcell_no_interp_10.vtu"
ref_file = get_test_reference_file("dgsem_sedov_subcell_no_interp_10.vtu", remote_filename)
compare_point_data(out_file, ref_file)
end
# remote file path is actually a URL so it always has the same path structure
remote_filename = "2d/treemesh/dgsem_sedov_subcell_no_interp_10.vtu"
ref_file = get_test_reference_file("dgsem_sedov_subcell_no_interp_10.vtu", remote_filename)
compare_point_data(out_file, ref_file)
end

@timed_testset "with reinterpolation" begin
# Create and test output without reinterpolation
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000010.h5"), output_directory=outdir, reinterpolate=true)
outfilename = "solution_" * LEADING_ZEROS * "000010.vtu"
out_file = joinpath(outdir, outfilename)
@timed_testset "with reinterpolation" begin
# Create and test output without reinterpolation
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000010.h5"), output_directory=outdir, reinterpolate=true)
outfilename = "solution_" * LEADING_ZEROS * "000010.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
testname = "2d-treemesh-shockcapturing-subcell-reinterp"
cp(out_file, joinpath(artifacts_dir, testname * "-" * outfilename), force=true)
# save output file to `artifacts` to facilitate debugging of failing tests
testname = "2d-treemesh-shockcapturing-subcell-reinterp"
cp(out_file, joinpath(artifacts_dir, testname * "-" * outfilename), force=true)

# remote file path is actually a URL so it always has the same path structure
remote_filename = "2d/treemesh/dgsem_sedov_subcell_interp_10.vtu"
ref_file = get_test_reference_file("dgsem_sedov_subcell_interp_10.vtu", remote_filename)
compare_cell_data(out_file, ref_file)
end
# remote file path is actually a URL so it always has the same path structure
remote_filename = "2d/treemesh/dgsem_sedov_subcell_interp_10.vtu"
ref_file = get_test_reference_file("dgsem_sedov_subcell_interp_10.vtu", remote_filename)
compare_cell_data(out_file, ref_file)
end
end
end
Expand Down
6 changes: 1 addition & 5 deletions test/test_trixi2vtk.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ end
# Note: The purpose of using a specific commit hash (instead of `main`) is to be able to tie a given
# version of Trixi2Vtk to a specific version of the test file repository. This way, also tests
# for older Trixi2Vtk releases should continue to work.
if VERSION < v"1.8"
const TEST_REFERENCE_COMMIT = "c0a966b06489f9b2ee3aefeb0a5c0dae733df36f"
else
const TEST_REFERENCE_COMMIT = "e51f3613ac1adfcfd2bf1d74a2756034dab0579c"
end
const TEST_REFERENCE_COMMIT = "1ba4ac00a41c856d2c0aa7b51b81358d267625d6"

# Local folder to store downloaded reference files. If you change this, also adapt `../.gitignore`!
const TEST_REFERENCE_DIR = "reference_files"
Expand Down
Loading