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

Doc fixes for v0.14.0 #235

Closed
wants to merge 18 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: '1.9'
version: '1'
arch: x64

- name: "Copy examples, readme"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
Pkg.instantiate();
Pkg.add("Test");
Pkg.add(path="./PkgEval.jl")'
julia --project=. ./test/FMI2/eval.jl
julia --project=. ./test/eval.jl
84 changes: 36 additions & 48 deletions .github/workflows/Example.yml
Copy link
Contributor Author

Choose a reason for hiding this comment

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

due to adding ${{ matrix.julia-version }} to kernel name and no longer hardcoding this element, julia version has to be set to 1.10 above, as kernel with version 1 does not exist, only 1.10 exists

Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ on:
- 'Project.toml'

jobs:
sync-files:
jupyter:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest] # ubuntu-latest
file-name: [manipulation, modelica_conference_2021, multiple_instances, multiprocessing, multithreading, parameterize, simulate, parameter_optimization]
julia-version: ['1.8']
julia-version: ['1.10']
julia-arch: [x64]
experimental: [false]

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

- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}
Expand All @@ -44,59 +44,47 @@ jobs:
env:
FILE: examples/src/${{ matrix.file-name }}.ipynb
run: |
jupyter nbconvert --ExecutePreprocessor.kernel_name="julia-1.8" --to notebook --inplace --execute ${{ env.FILE }}
jupyter nbconvert --ExecutePreprocessor.kernel_name="julia-${{ matrix.julia-version }}" --to notebook --inplace --execute ${{ env.FILE }}
jupyter nbconvert --to script ${{ env.FILE }}
jupyter nbconvert --to markdown ${{ env.FILE }}

- name: Archive examples artifacts
if: success() && matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: examples
path: examples/src/${{ matrix.file-name }}*

auto-commit:
needs: sync-files
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: "run generated jl script to determine success of example building"
run: julia --project=examples/ examples/${{ matrix.file-name }}.jl

- name: Download examples
uses: actions/download-artifact@v3
with:
name: examples
path: examples/src/

- name: auto-commit
- name: "auto-commit (retry on merge)"
if: success() && github.event_name != 'pull_request' && github.branch == 'main'
uses: nick-fields/retry@v3
env:
CI_COMMIT_MESSAGE: Jupyter nbconvert synch - modified, paired .ipynb files
CI_COMMIT_MESSAGE: example-${{ matrix.os }}-${{ matrix.file-name }}-${{ matrix.julia-version }}-${{ matrix.julia-arch }}-${{ matrix.experimental }}[${{ github.ref }}]
CI_COMMIT_AUTHOR: github-actions[bot]
EXAMPLES_PATH: examples/src
# Fetch all and clear the stash list. Include all files from the examples/src folder to the stash and switch the branch.
# Reset the branch and remove all current files in the examples/src folder.
EXAMPLES_PATH: examples
# Fetch all and clear the stash list. Include all files from the examples folder to the stash and switch the branch.
# Reset the branch and remove all current files in the examples folder.
# Checkout the last stash to restore the new notebooks and apply the stash index to restore all other new files in the folder.
run: |
git fetch --all
git stash clear
git stash --include-untracked -- ${{ env.EXAMPLES_PATH }}
git switch examples
git reset --hard origin/examples
rm -rf ${{ env.EXAMPLES_PATH }}
git checkout stash -f -- ${{ env.EXAMPLES_PATH }}
git stash apply --index
git stash drop
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "${{ env.CI_COMMIT_AUTHOR }}@users.noreply.github.com"
git config --global core.autocrlf false
git add ${{ env.EXAMPLES_PATH }}
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push origin examples
with:
timeout_minutes: 999
max_attempts: 10
warning_on_retry: false
shell: bash
command: |
git fetch --all
git stash clear
git stash --include-untracked -- ${{ env.EXAMPLES_PATH }}
git switch examples
git reset --hard origin/examples
git checkout stash -f -- ${{ env.EXAMPLES_PATH }}
git stash apply --index
git stash drop
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "${{ env.CI_COMMIT_AUTHOR }}@users.noreply.github.com"
git config --global core.autocrlf false
git add ${{ env.EXAMPLES_PATH }}
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push origin examples || (git reset --soft HEAD~1 && (exit 1))

call-docu:
needs: auto-commit
if: github.event_name != 'pull_request'
needs: jupyter
if: github.event_name != 'pull_request' && github.branch == 'main'
runs-on: ubuntu-latest
steps:
# Trigger an repoisitory dispath event
Expand Down
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

16 changes: 3 additions & 13 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
name = "FMI"
uuid = "14a09403-18e3-468f-ad8a-74f8dda2d9ac"
authors = ["TT <[email protected]>", "LM <[email protected]>", "JK <[email protected]>"]
version = "0.13.3"
version = "0.14.0"

[deps]
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
FMIExport = "31b88311-cab6-44ed-ba9c-fe5a9abbd67a"
FMIImport = "9fcbc62e-52a0-44e9-a616-1359a0008194"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
ThreadPools = "b189fb0b-2eb5-4ed4-bc0c-d34c51242431"

[compat]
DifferentialEquations = "7.7.0 - 7.13"
Downloads = "1"
FMIExport = "0.3.0"
FMIImport = "0.16.0"
FMIExport = "0.4.0"
FMIImport = "1.0.0"
LinearAlgebra = "1"
ProgressMeter = "1.7.0 - 1.9"
Requires = "1.3.0"
ThreadPools = "2.1.1"
julia = "1.6"
Loading
Loading