Skip to content

Commit b2333bb

Browse files
committed
fix outputdir, release v0.1.2
1 parent 21d29c9 commit b2333bb

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
version:
14-
- '1.10.4'
14+
- '1.11.0'
1515
os:
1616
- ubuntu-latest
1717
- macOS-latest

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ParameterSpace"
22
uuid = "1cbe449d-ba56-45e5-b823-2aefb7650dd9"
33
authors = ["islent <[email protected]>"]
4-
version = "0.1.1"
4+
version = "0.1.2"
55

66
[deps]
77
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"

src/ParameterSpace.jl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ function analyse_function(func::Function, Params, arg...;
102102
tuning[!, :result] = Any[]
103103

104104
if !isnothing(outputdir)
105+
if !isdir(outputdir)
106+
mkpath(outputdir)
107+
end
108+
105109
file = open(joinpath(outputdir, filename), "w")
106110
write(file, join(names(tuning), ";") * "\n")
107111
end
@@ -204,13 +208,17 @@ end
204208
result = analyse_program(command, content, "param.txt", params, analyse, args = [-15])
205209
```
206210
"""
207-
function analyse_program(command::Cmd, content::String, filename::String, Params, analyse::Function = emptyfunction; args = [], OutputDir = "output")
211+
function analyse_program(command::Cmd, content::String, filename::String, Params, analyse::Function = emptyfunction;
212+
args = [], outputdir = "output",
213+
)
208214
# Construct parameter space
209215
Cases = collect(Iterators.product([p.Range for p in Params]...))
210216
@info "Total parameter combinations: $(length(Cases))"
211217

212-
mkoutputdir(OutputDir)
213-
cd(OutputDir)
218+
if !isdir(outputdir)
219+
mkpath(outputdir)
220+
end
221+
cd(outputdir)
214222

215223
tuning = DataFrame()
216224
for p in Params

0 commit comments

Comments
 (0)