Skip to content

Commit 4ca52ac

Browse files
committed
Option to not use data prefix
1 parent 2b03015 commit 4ca52ac

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/settings.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ end
4040
solver_settings::SolverSettings = SolverSettings()
4141
end
4242

43-
function VSMSettings(filename)
43+
function VSMSettings(filename; data_prefix=true)
4444
# Uwe's suggested 3-line approach using StructMapping.jl (adapted)
45-
data = YAML.load_file(joinpath("data", filename))
45+
if data_prefix
46+
data = YAML.load_file(joinpath("data", filename))
47+
else
48+
data = YAML.load_file(filename)
49+
end
4650

4751
# Use StructMapping for basic structure conversion
4852
# But handle special fields manually due to enum conversion needs
@@ -110,4 +114,4 @@ function Base.show(io::IO, vsm_settings::VSMSettings)
110114
print(io, replace(repr(wing), "\n" => "\n "))
111115
end
112116
print(io, replace(repr(vsm_settings.solver_settings), "\n" => "\n "))
113-
end
117+
end

0 commit comments

Comments
 (0)