Skip to content

Commit

Permalink
Merge branch 'ThummeTo:main' into patch-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
0815Creeper authored Aug 23, 2024
2 parents 6ac2460 + e776903 commit 35d45d3
Show file tree
Hide file tree
Showing 46 changed files with 5,147 additions and 6,952 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ jobs:
import Pkg;
Pkg.instantiate();
Pkg.add(path="./PkgEval.jl")'
julia --project=. ./test/FMI2/eval.jl
julia --project=. ./test/eval.jl
14 changes: 14 additions & 0 deletions .github/workflows/Formatter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Format suggestions
on:
pull_request:
# this argument is not required if you don't use the `suggestion-label` input
types: [ opened, reopened, synchronize, labeled, unlabeled ]
jobs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/julia-format@v3
with:
version: '1' # Set `version` to '1.0.54' if you need to use JuliaFormatter.jl v1.0.54 (default: '1')
suggestion-label: 'format-suggest' # leave this unset or empty to show suggestions for all PRs

44 changes: 32 additions & 12 deletions .github/workflows/callbackFunctions.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CallbackFunctions

on:
workflow_dispatch:
pull_request:
push:
branches:
Expand All @@ -15,17 +16,21 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
arch: ['']
include:
- os: windows-latest
arch: -A Win32
env:
BUILD_TYPE: RelWithDebInfo
CMAKE_SOURCE_DIR: ${{github.workspace}}/src/FMI2/callbackFunctions
CMAKE_INSTALL_DIR: ${{github.workspace}}/src/FMI2/callbackFunctions

steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure CMake
run: cmake -S ${{env.CMAKE_SOURCE_DIR}}/callbackFunctions -B ${{env.CMAKE_SOURCE_DIR}}/callbackFunctions/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake -S ${{env.CMAKE_SOURCE_DIR}}/callbackFunctions -B ${{env.CMAKE_SOURCE_DIR}}/callbackFunctions/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.arch }}

- name: Build C++ Sources
run: cmake --build ${{env.CMAKE_SOURCE_DIR}}/callbackFunctions/build --config ${{env.BUILD_TYPE}} --target install
Expand All @@ -39,22 +44,29 @@ jobs:
run: ${{env.CMAKE_SOURCE_DIR}}/callbackFunctions/build/test

- name: Archive production artifacts (win)
if: success() && matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
if: success() && matrix.os == 'windows-latest' && matrix.arch == ''
uses: actions/upload-artifact@v4
with:
name: callbackFunctions-win-binaries
path: src/FMI2/callbackFunctions/binaries/win64/

- name: Archive production artifacts (win32)
if: success() && matrix.os == 'windows-latest' && matrix.arch != ''
uses: actions/upload-artifact@v4
with:
name: callbackFunctions-win32-binaries
path: src/FMI2/callbackFunctions/binaries/win32/

- name: Archive production artifacts (linux)
if: success() && matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: callbackFunctions-linux-binaries
path: src/FMI2/callbackFunctions/binaries/linux64/

- name: Archive production artifacts (darwin)
if: success() && matrix.os == 'macos-latest'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: callbackFunctions-mac-binaries
path: src/FMI2/callbackFunctions/binaries/darwin64/
Expand All @@ -64,29 +76,37 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Download windows binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: callbackFunctions-win-binaries
path: src/FMI2/callbackFunctions/binaries/win64/

- name: Download windows x86 binaries
uses: actions/download-artifact@v4
with:
name: callbackFunctions-win32-binaries
path: src/FMI2/callbackFunctions/binaries/win32/

- name: Download linux binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: callbackFunctions-linux-binaries
path: src/FMI2/callbackFunctions/binaries/linux64/

- name: Download darwin binaries
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: callbackFunctions-mac-binaries
path: src/FMI2/callbackFunctions/binaries/darwin64/

- name: "Auto commit"
if: ${{ github.event_name == 'push' }}
uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch'}}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update callbackFunctions
push_options: '--force-with-lease'


16 changes: 9 additions & 7 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
name = "FMIImport"
uuid = "9fcbc62e-52a0-44e9-a616-1359a0008194"
authors = ["TT <tobias.thummerer@informatik.uni-augsburg.de>", "LM <lars.mikelsons@informatik.uni-augsburg.de>", "JK <josef.kircher@student.uni-augsburg.de>"]
version = "0.16.2"
version = "1.0.4"

[deps]
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
EzXML = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615"
FMICore = "8af89139-c281-408e-bce2-3005eb87462f"
FMIBase = "900ee838-d029-460e-b485-d98a826ceef2"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
RelocatableFolders = "05181044-ff0b-4ac5-8273-598c1e38db00"
ZipFile = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea"

[weakdeps]
FMIZoo = "724179cf-c260-40a9-bd27-cccc6fe2f195"

[extensions]
FMIZooExt = ["FMIZoo"]

[compat]
Downloads = "1"
EzXML = "1.1.0"
FMICore = "0.19.0"
FMIBase = "1.0.0"
Libdl = "1"
RelocatableFolders = "1"
ZipFile = "0.10.0"
julia = "1.6"
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
[![Run PkgEval](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/Eval.yml/badge.svg)](https://github.com/ThummeTo/FMIImport.jl/actions/workflows/Eval.yml)
[![Coverage](https://codecov.io/gh/ThummeTo/FMIImport.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/ThummeTo/FMIImport.jl)
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle)

## How can I use FMIImport.jl?
[*FMIImport.jl*](https://github.com/ThummeTo/FMIImport.jl) is part of [*FMI.jl*](https://github.com/ThummeTo/FMI.jl). However, if you only need the import functionality without anything around and want to keep the dependencies as small as possible, [*FMIImport.jl*](https://github.com/ThummeTo/FMIImport.jl) might be the right way to go. You can install it via:
Expand All @@ -35,10 +36,11 @@ To keep dependencies nice and clean, the original package [*FMI.jl*](https://git
- [*FMI.jl*](https://github.com/ThummeTo/FMI.jl): High level loading, manipulating, saving or building entire FMUs from scratch
- [*FMIImport.jl*](https://github.com/ThummeTo/FMIImport.jl): Importing FMUs into Julia
- [*FMIExport.jl*](https://github.com/ThummeTo/FMIExport.jl): Exporting stand-alone FMUs from Julia Code
- [*FMIBase.jl*](https://github.com/ThummeTo/FMIBase.jl): Common concepts for import and export of FMUs
- [*FMICore.jl*](https://github.com/ThummeTo/FMICore.jl): C-code wrapper for the FMI-standard
- [*FMISensitivity.jl*](https://github.com/ThummeTo/FMISensitivity.jl): Static and dynamic sensitivities over FMUs
- [*FMIBuild.jl*](https://github.com/ThummeTo/FMIBuild.jl): Compiler/Compilation dependencies for FMIExport.jl
- [*FMIFlux.jl*](https://github.com/ThummeTo/FMIFlux.jl): Machine Learning with FMUs (differentiation over FMUs)
- [*FMIFlux.jl*](https://github.com/ThummeTo/FMIFlux.jl): Machine Learning with FMUs
- [*FMIZoo.jl*](https://github.com/ThummeTo/FMIZoo.jl): A collection of testing and example FMUs

## What Platforms are supported?
Expand Down
21 changes: 21 additions & 0 deletions ext/FMIZooExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Copyright (c) 2021 Frederic Bruder, Tobias Thummerer, Lars Mikelsons
# Licensed under the MIT license. See LICENSE file in the project root for details.
#

module FMIZooExt

using FMIImport, FMIZoo

function FMIImport.loadFMU(
modelName::AbstractString,
tool::AbstractString,
version::AbstractString,
fmiversion::AbstractString = "2.0";
kwargs...,
)
fname = get_model_filename(modelName, tool, version, fmiversion)
return FMIImport.loadFMU(fname; kwargs...)
end

end # FMIZooExt
Loading

0 comments on commit 35d45d3

Please sign in to comment.