Skip to content

Commit

Permalink
removed debug statements
Browse files Browse the repository at this point in the history
example and tests-latest actions where successfully tested on 17 Dec 2024 18:56 GMT
  • Loading branch information
0815Creeper committed Dec 17, 2024
1 parent 4e2cba4 commit 2554e6c
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 16 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/Example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:
push:
branches:
- main
#TODO
- tests-on-fmPy-0.4.1-unformatted
paths:
- 'src/**'
- 'examples/**'
Expand Down Expand Up @@ -142,8 +140,7 @@ jobs:
call-docu:
needs: [jupyter, pluto]
#TODO
if: (github.event_name != 'pull_request' && github.ref_name == 'main') || github.ref_name == 'tests-on-fmPy-0.4.1-unformatted'
if: github.event_name != 'pull_request' && github.ref_name == 'main'
runs-on: ubuntu-latest
env:
HAS_TRIGGER_TOKEN: ${{ secrets.FMI_DOC_TRIGGER_PAT != '' }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/TestLatest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:
push:
branches:
- main
#TODO
- tests-on-fmPy-0.4.1-unformatted
paths:
- 'src/**'
- 'test/**'
Expand Down
2 changes: 1 addition & 1 deletion examples/FMI2/BouncingBall/src/BouncingBall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ fmu_save_path = joinpath(tmpDir, "BouncingBall.fmu")

fmu = FMIBUILD_CONSTRUCTOR()
using FMIBuild: saveFMU # <= this must be excluded during export, because FMIBuild cannot execute itself (but it is able to build)
#TODO saveFMU(fmu, fmu_save_path; debug=true, compress=false) # <= this must be excluded during export, because saveFMU would start an infinite build loop with itself (debug=true allows debug messages, but is slow during execution!)
saveFMU(fmu, fmu_save_path; debug=true, compress=false) # <= this must be excluded during export, because saveFMU would start an infinite build loop with itself (debug=true allows debug messages, but is slow during execution!)

### some tests ###
using FMI, DifferentialEquations
Expand Down
2 changes: 1 addition & 1 deletion examples/FMI2/Manipulation/src/Manipulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fmu_save_path = joinpath(tmpDir, "Manipulation.fmu")
sourceFMU = FMIZoo.get_model_filename("SpringDamperPendulum1D", "Dymola", "2022x")
fmu = FMIBUILD_CONSTRUCTOR(dirname(sourceFMU))
import FMIBuild:saveFMU # <= this must be excluded during export, because FMIBuild cannot execute itself (but it is able to build)
#TODO saveFMU(fmu, fmu_save_path; resources=Dict(sourceFMU=>"SpringDamperPendulum1D.fmu")) # <= this must be excluded during export, because fmi2Save would start an infinte build loop with itself
saveFMU(fmu, fmu_save_path; resources=Dict(sourceFMU=>"SpringDamperPendulum1D.fmu")) # <= this must be excluded during export, because fmi2Save would start an infinte build loop with itself

# some tests
# using FMI
Expand Down
2 changes: 1 addition & 1 deletion examples/FMI2/NeuralFMU/src/NeuralFMU.jl
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ fmu_save_path = joinpath(tmpDir, "NeuralFMU.fmu")
sourceFMU = FMIZoo.get_model_filename("SpringDamperPendulum1D", "Dymola", "2022x")
fmu = FMIBUILD_CONSTRUCTOR(dirname(sourceFMU))
import FMIBuild:saveFMU # <= this must be excluded during export, because FMIBuild cannot execute itself (but it is able to build)
#TODO saveFMU(fmu, fmu_save_path; compress=false, debug=true, resources=Dict(sourceFMU=>"SpringDamperPendulum1D.fmu")) # <= this must be excluded during export, because fmi2Save would start an infinte build loop with itself
saveFMU(fmu, fmu_save_path; compress=false, debug=true, resources=Dict(sourceFMU=>"SpringDamperPendulum1D.fmu")) # <= this must be excluded during export, because fmi2Save would start an infinte build loop with itself

### some tests ###
# using FMI
Expand Down
4 changes: 2 additions & 2 deletions examples/jupyter-src/Export.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
"metadata": {},
"outputs": [],
"source": [
"#TODO saveFMU(fmu, fmu_save_path, fmu_source_path; debug=false, compress=false) # feel free to set debug true, disabled for documentation building\n",
"saveFMU(fmu, fmu_save_path, fmu_source_path; debug=false, compress=false) # feel free to set debug true, disabled for documentation building\n",
"#saveFMU(fmu_save_path, fmu_source_path; debug=false, compress=false) this meight be the format after the next release"
]
},
Expand All @@ -311,7 +311,7 @@
"outputs": [],
"source": [
"mkpath(\"Export_files\")\n",
"#TODO cp(fmu_save_path, joinpath(\"Export_files\", \"BouncingBall.fmu\"))"
"cp(fmu_save_path, joinpath(\"Export_files\", \"BouncingBall.fmu\"))"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions test/bouncing_ball/bouncing_ball.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ if Sys.iswindows()
),
)
# check if FMU exists now
#TODO @test isfile(fmu_save_path)
#TODO fsize = filesize(fmu_save_path) / 1024 / 1024
#TODO @test fsize > 300
@test isfile(fmu_save_path)
fsize = filesize(fmu_save_path) / 1024 / 1024
@test fsize > 300

# TODO: as Exported FMUs are currently not able to be simulated with FMPy, use BouncingBall from FMIZoo instead to test Pipeline
println(
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ using Test

@testset "FMU Manipulation" begin
if Sys.iswindows()
#TODO include("manipulation.jl")
include("manipulation.jl")
else
@warn "The test `FMU Manipulation` is currently only availale for Windows"
end
end

@testset "NeuralFMU" begin
if Sys.iswindows()
#TODO include("neuralFMU.jl")
include("neuralFMU.jl")
else
@warn "The test `NeuralFMU` is currently only availale for Windows"
end
Expand Down

0 comments on commit 2554e6c

Please sign in to comment.