Skip to content

Commit 9df0a9f

Browse files
committed
added dependabot
1 parent 3cd20ee commit 9df0a9f

File tree

5 files changed

+29
-12
lines changed

5 files changed

+29
-12
lines changed

.github/dependabot.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
labels:
8+
- "dependencies"
9+
- "github-actions"

cross_checks/Project.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
33
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
44
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
55
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
6+
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
67
FMI = "14a09403-18e3-468f-ad8a-74f8dda2d9ac"
78
FMICore = "8af89139-c281-408e-bce2-3005eb87462f"
89
FMIImport = "9fcbc62e-52a0-44e9-a616-1359a0008194"

cross_checks/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ optional arguments:
3636
--os OS The operating system for which the cross
3737
checks should be excecuted (default:
3838
"windows-latest")
39-
--ccrepo CCREPO The Url to the git repository that contains
39+
--ccrepo CCREPO The URL to the git repository that contains
4040
the cross checks. (default:
4141
"https://github.com/modelica/fmi-cross-check")
4242
--ccbranch CCBRANCH The name of the branch in which the results

cross_checks/cross_check.jl

+16-9
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,30 @@ using CSV
1313
using DelimitedFiles
1414
using Tables
1515
using Statistics
16+
using DifferentialEquations
1617

1718
import Base64
1819

1920
include("cross_check_config.jl")
2021
include("cross_check_lib.jl")
2122

22-
# Main Array that holds all information about the excecuted cross checks and results
23+
# Main Array that holds all information about the executed cross checks and results
2324
crossChecks = []
2425

2526
getInputValues = function (t, u)
2627
return nothing
2728
end
2829

30+
getSolver = function()
31+
return Tsit5() # CVODE_BDF() # Rosenbrock23(autodiff=false)
32+
end
33+
2934
function parse_commandline()
3035
s = ArgParseSettings()
3136

3237
@add_arg_table s begin
3338
"--os"
34-
help = "The operating system for which the cross checks should be excecuted"
39+
help = "The operating system for which the cross checks should be executed"
3540
arg_type = String
3641
default = "windows-latest"
3742
"--ccrepo"
@@ -53,10 +58,10 @@ function parse_commandline()
5358
help = "Include FMUs that have caused the cross check runner to fail and exit"
5459
action = :store_true
5560
"--skipnotcompliant"
56-
help = "Reject officially not compliant FMUs and don't excecute them"
61+
help = "Reject officially not compliant FMUs and don't execute them"
5762
action = :store_true
5863
"--commitrejected"
59-
help = "Also commit the result file for FMUs that hasn't been excecuted (e.g. officially not compliant FMUs if they are not skipped)"
64+
help = "Also commit the result file for FMUs that hasn't been executed (e.g. officially not compliant FMUs if they are not skipped)"
6065
action = :store_true
6166
"--commitfailed"
6267
help = "Also commit the result file for failed FMUs"
@@ -118,7 +123,7 @@ function runCrossCheckFmu(
118123
getInputValues = function (t, u)
119124
for (valIndex, val) in enumerate(inputValues)
120125
if val.time >= t
121-
u[:] = inputValues[valIndex][2:end]
126+
u[:] = collect(inputValues[valIndex])[2:end]
122127
# a = collect(inputValues[valIndex])[2:end]
123128
# return a
124129
break
@@ -142,6 +147,7 @@ function runCrossCheckFmu(
142147
simData = simulateME(
143148
fmuToCheck,
144149
(tStart, tStop);
150+
solver=getSolver(),
145151
reltol = relTol,
146152
saveat = fmuRefValues[1],
147153
inputFunction = getInputValues,
@@ -164,6 +170,7 @@ function runCrossCheckFmu(
164170
simData = simulateME(
165171
fmuToCheck,
166172
(tStart, tStop);
173+
solver=getSolver(),
167174
reltol = relTol,
168175
saveat = fmuRefValues[1],
169176
recordValues = fmuRecordValueNames,
@@ -241,7 +248,7 @@ function main()
241248
println("#################### Start FMI Cross checks Run ####################")
242249
# parsing of cli arguments and setting of configuration
243250
parsed_args = parse_commandline()
244-
unpackPath = parsed_args["tempdir"]
251+
unpackPath = haskey(ENV, "crosscheck_tempdir") ? ENV["crosscheck_tempdir"] : parsed_args["tempdir"]
245252
fmiVersion = parsed_args["fmiversion"]
246253
crossCheckRepo = parsed_args["ccrepo"]
247254
crossCheckBranch = parsed_args["ccbranch"]
@@ -261,7 +268,7 @@ function main()
261268
end
262269

263270
# Loading all available cross checks
264-
fmiCrossCheckRepoPath = getFmuCrossCheckRepo(crossCheckRepo, unpackPath)
271+
fmiCrossCheckRepoPath = getFMICrossCheckRepo(crossCheckRepo, unpackPath)
265272

266273
# set up the github access for the fmi-cross-checks repo and checkout the respective branch
267274
github_token = get(ENV, "GITHUB_TOKEN", "")
@@ -346,15 +353,15 @@ function main()
346353
# Write Summary of Cross Check run
347354
println("#################### Start FMI Cross check Summary ####################")
348355
println("\tTotal Cross checks:\t\t\t$(count(c -> (true), crossChecks))")
349-
println("\tSuccessfull Cross checks:\t\t$(count(c -> (c.success), crossChecks))")
356+
println("\tSuccessful Cross checks:\t\t$(count(c -> (c.success), crossChecks))")
350357
println(
351358
"\tFailed Cross checks:\t\t\t$(count(c -> (!c.success && c.error === nothing && !c.skipped), crossChecks))",
352359
)
353360
println(
354361
"\tCross checks with errors:\t\t$(count(c -> (c.error !== nothing), crossChecks))",
355362
)
356363
println("\tSkipped Cross checks:\t\t\t$(count(c -> (c.skipped), crossChecks))")
357-
println("\tList of successfull Cross checks")
364+
println("\tList of successful Cross checks")
358365
for (index, success) in enumerate(filter(c -> (c.success), crossChecks))
359366
println("\u001B[32m\t\t$(index):\t$(success)\u001B[0m")
360367
end

cross_checks/cross_check_lib.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
"""
77
Returns the path where the FMU cross checks are saved locally.
88
This will also checkout the repository from a specified URL if they are not yet present in the specified path.
9-
Hint: This will not check the cross check repository for integrety
9+
Hint: This will not check the cross check repository for integrity
1010
# Arguments
1111
- `crossCheckRepo::String`: URL to the FMU Cross check repository that should be used. Note, if you want to push your results later, this should be a fork that you have access to
1212
- `unpackPath::Union{String, Nothing}`: optional path that is used to checkout the the fmu cross check repository. If no path is specified, a temporary path is created
1313
# Returns
1414
- `repoPath::String`: The path where the repository can be found locally (including the repository name)
1515
"""
16-
function getFmuCrossCheckRepo(
16+
function getFMICrossCheckRepo(
1717
crossCheckRepo::String,
1818
unpackPath::Union{String,Nothing} = nothing,
1919
)::String

0 commit comments

Comments
 (0)