diff --git a/examples/anasol/runtests.jl b/examples/anasol/runtests.jl index 45db824a..39fcc4e0 100644 --- a/examples/anasol/runtests.jl +++ b/examples/anasol/runtests.jl @@ -200,7 +200,7 @@ Test.@testset "Anasol" begin Test.@test isapprox(good_residuals, residuals_results, atol=1e-8) # Test Mads.getsourcekeys(md) - Test.@test sk == ["Source1_dz", "Source1_f", "Source1_t0", "Source1_x", "Source1_dy", "Source1_dx", "Source1_z", "Source1_t1", "Source1_y"] + Test.@test sk == ["Source1_x", "Source1_y", "Source1_z", "Source1_dx", "Source1_dy", "Source1_dz", "Source1_f", "Source1_t0", "Source1_t1"] # Test Mads.getparamsmin(md), getparamsmax, getparamsinit_min, getparamsinit_max Test.@test isapprox(m1, good_params_min, atol=1e-8) diff --git a/examples/contamination/runtests.jl b/examples/contamination/runtests.jl index 23562177..4102b3b1 100644 --- a/examples/contamination/runtests.jl +++ b/examples/contamination/runtests.jl @@ -188,7 +188,9 @@ end Mads.@stdouterrcapture Mads.addsource!(md) Mads.@stdouterrcapture Mads.removesource!(md) -Mads.rmdir("w01-w13a_w20a_restart") +Mads.rmfile(joinpath(workdir, "w01-w13a_w20a-match.svg")) +Mads.rmfile(joinpath(workdir,"w01-w13a_w20a.initialresults")) +Mads.rmfile(joinpath(workdir,"w01-w13a_w20a_saltelli_5.jld2")) Mads.veryquietoff() Mads.graphon() diff --git a/examples/contamination/w01-w13a_w20a.initialresults b/examples/contamination/w01-w13a_w20a.initialresults deleted file mode 100644 index 36c1fc3b..00000000 --- a/examples/contamination/w01-w13a_w20a.initialresults +++ /dev/null @@ -1,3 +0,0 @@ -OF: 1.690343089455085e7 -lambda: NaN -OrderedCollections.OrderedDict{Union{String, Symbol}, Float64}("vx" => 35.96220220262771, "source1_t0" => 9.038310530327282, "source1_t1" => 37.76819701889558) diff --git a/examples/contamination/w01-w13a_w20a_saltelli_5.jld2 b/examples/contamination/w01-w13a_w20a_saltelli_5.jld2 deleted file mode 100644 index 84da4505..00000000 Binary files a/examples/contamination/w01-w13a_w20a_saltelli_5.jld2 and /dev/null differ diff --git a/examples/models/internal-linear-model/internal-linearmodel.initialresults b/examples/models/internal-linear-model/internal-linearmodel.initialresults deleted file mode 100644 index 4e9a9543..00000000 --- a/examples/models/internal-linear-model/internal-linearmodel.initialresults +++ /dev/null @@ -1,3 +0,0 @@ -OF: 46.0 -lambda: NaN -OrderedCollections.OrderedDict{Union{String, Symbol}, Float64}("a" => 1.0, "b" => -1.0) diff --git a/examples/models/internal-linear-model/internal-linearmodel_efast_385.jld2 b/examples/models/internal-linear-model/internal-linearmodel_efast_385.jld2 deleted file mode 100644 index 9f1fcda3..00000000 Binary files a/examples/models/internal-linear-model/internal-linearmodel_efast_385.jld2 and /dev/null differ diff --git a/examples/models/internal-linear-model/internal-linearmodel_saltelli_5.jld2 b/examples/models/internal-linear-model/internal-linearmodel_saltelli_5.jld2 deleted file mode 100644 index 968535ac..00000000 Binary files a/examples/models/internal-linear-model/internal-linearmodel_saltelli_5.jld2 and /dev/null differ diff --git a/src/MadsIO.jl b/src/MadsIO.jl index 780796fd..815ee31b 100644 --- a/src/MadsIO.jl +++ b/src/MadsIO.jl @@ -262,13 +262,13 @@ Example: md = Mads.loadmadsfile("input_file_name.mads") ``` """ -function loadmadsfile(filename::AbstractString; bigfile::Bool=false, format::AbstractString="yaml", quiet::Bool=Mads.quiet) +function loadmadsfile(filename::AbstractString; bigfile::Bool=false, format::AbstractString="yaml", quiet::Bool=Mads.quiet, dicttype=OrderedCollections.OrderedDict{Any,Any}) if bigfile madsdata = loadbigyamlfile(filename) end if !bigfile || isnothing(madsdata) if format == "yaml" - madsdata = loadyamlfile(filename) + madsdata = loadyamlfile(filename; dicttype=dicttype) elseif format == "json" madsdata = loadjsonfile(filename) end @@ -276,7 +276,7 @@ function loadmadsfile(filename::AbstractString; bigfile::Bool=false, format::Abs while typeof(madsdata) <: AbstractString # Windows links fix filename = joinpath(splitdir(filename)[1], madsdata) if format == "yaml" - madsdata = loadyamlfile(filename) + madsdata = loadyamlfile(filename; dicttype=dicttype) elseif format == "json" madsdata = loadjsonfile(filename) end diff --git a/src/MadsYAML.jl b/src/MadsYAML.jl index e7f7c91e..5eeabb41 100644 --- a/src/MadsYAML.jl +++ b/src/MadsYAML.jl @@ -13,8 +13,8 @@ Returns: - data in the yaml input file """ -function loadyamlfile(filename::AbstractString) - yamldata = YAML.load_file(filename; dicttype=OrderedCollections.OrderedDict{String,Any}) +function loadyamlfile(filename::AbstractString; dicttype=OrderedCollections.OrderedDict{Any,Any}) + yamldata = YAML.load_file(filename; dicttype=dicttype) return yamldata end