Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes and dependabot bumps #137

Merged
merged 5 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/Eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
julia-arch: [x64]

steps:
# Required by PkgEval.jl as xvfb runs into issues with ubuntu 24. See ci.yml workflow of PkgEval.jl repo
- name: "Allow unprivileged user namespaces"
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out repository
uses: actions/checkout@v4
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/TestLTS.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test v1.6 (LTS)
name: Test (LTS)

on:
workflow_dispatch:
Expand All @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
julia-version: ['1.6']
julia-version: ['lts']
julia-arch: [x64]
os: [ubuntu-latest, windows-latest]
experimental: [false]
Expand All @@ -35,6 +35,10 @@ jobs:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}

# Set up julia-cache
- name: Set up julia-cache
uses: julia-actions/cache@v2

# Set up cache
- name: "Set up cache"
uses: actions/cache@v4
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/TestLatest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}

# Set up julia-cache
- name: Set up julia-cache
uses: julia-actions/cache@v2

# Set up cache
- name: "Set up cache"
uses: actions/cache@v4
Expand Down Expand Up @@ -62,8 +66,8 @@ jobs:

# Run codecov
- name: "Run CodeCov"
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: lcov.info
files: lcov.info
4 changes: 1 addition & 3 deletions src/FMI2/int.jl
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ end
export fmi2GetFMUstate

"""
fmi2FreeFMUstate!(c::FMU2Component, state::fmi2FMUstate)
fmi2FreeFMUstate(c::FMU2Component, state::fmi2FMUstate)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change, did you upstream test this (so check of FMI/FMIFlux still work?).
Why do you want to change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say, this is not a breaking change, it is a docstring (although it meight break the FMI-Doc action, but that will be easier to fix afterwards)


Free the memory for the allocated FMU state

Expand All @@ -946,8 +946,6 @@ Free the memory for the allocated FMU state
- FMISpec2.0.2[p.16]: 2.1.2 Platform Dependent Definitions (fmi2TypesPlatform.h)
- FMISpec2.0.2[p.16]: 2.1.3 Status Returned by Functions
- FMISpec2.0.2[p.25]: 2.1.8 Getting and Setting the Complete FMU State

See also [`fmi2FreeFMUstate`](@ref).
"""
function fmi2FreeFMUstate(c::FMU2Component, state::fmi2FMUstate)
stateRef = Ref(state)
Expand Down
4 changes: 2 additions & 2 deletions src/FMI2/md.jl
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ function parseUnknown(md::fmi2ModelDescription, node::EzXML.Node)
if length(dependenciesSplit) > 0
varDep.dependencies = collect(parse(UInt, e) for e in dependenciesSplit)
end
else
else
varDep.dependencies = UInt[]
end
end
Expand All @@ -421,7 +421,7 @@ function parseUnknown(md::fmi2ModelDescription, node::EzXML.Node)
stringToDependencyKind(md, e) for e in dependenciesKindSplit
)
end
else
else
varDep.dependenciesKind = fmi2DependencyKind[]
end
end
Expand Down
4 changes: 2 additions & 2 deletions src/FMI3/md.jl
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ function parseDependencies(md::fmi3ModelDescription, node::EzXML.Node)
if length(dependenciesSplit) > 0
varDep.dependencies = collect(parse(UInt, e) for e in dependenciesSplit)
end
else
else
varDep.dependencies = UInt[]
end
end
Expand All @@ -477,7 +477,7 @@ function parseDependencies(md::fmi3ModelDescription, node::EzXML.Node)
varDep.dependenciesKind =
collect(stringToDependencyKind(md, e) for e in dependenciesKindSplit)
end
else
else
varDep.dependenciesKind = fmi3DependencyKind[]
end
end
Expand Down
7 changes: 5 additions & 2 deletions test/FMI3/model_description.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ myFMU = loadFMU("BouncingBall", "ModelicaReferenceFMUs", "0.0.30", "3.0")

@test myFMU.modelDescription.numberOfEventIndicators == 1
@test myFMU.modelDescription.eventIndicatorValueReferences == [1]
@test typeof(myFMU.modelDescription.modelStructure.eventIndicators[1]) == fmi3VariableDependency
@test typeof(myFMU.modelDescription.modelStructure.eventIndicators[1]) ==
fmi3VariableDependency

@test isnothing(myFMU.modelDescription.modelStructure.continuousStateDerivatives[1].dependencies)
@test isnothing(
myFMU.modelDescription.modelStructure.continuousStateDerivatives[1].dependencies,
)


info(myFMU) # check if there is an error thrown
Expand Down
Loading