From 261401265d0580b87741d7ebbb840461aabea3ae Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Wed, 3 Jun 2026 12:39:11 -0400 Subject: [PATCH] Centralize CI on SciML reusable workflows Convert ModelingToolkitCourse CI to the centralized SciML reusable workflows (pinned @v1, every caller uses `secrets: "inherit"`): - Tests.yml: new caller of tests.yml@v1 (no Tests workflow existed before). - Documentation.yml: inline Documenter build -> documentation.yml@v1, preserving the Julia 1.11 pin (1.12 upstream-compat) and coverage. - FormatCheck.yml: inline fredrikekre/runic-action -> runic.yml@v1. - SpellCheck.yml: inline crate-ci/typos -> spellcheck.yml@v1. - Downgrade.yml: new caller of downgrade.yml@v1 (julia lts, skip Pkg,TOML). - Removed CompatHelper.yml (handled by dependabot julia ecosystem). - dependabot.yml: dropped crate-ci/typos ignore; added julia ecosystem over / and /docs (daily, all-julia-packages group). Fixed two prose typos (re-aranging -> re-arranging, warrenty -> warranty) and added _typos.toml to whitelist the DiCMOBiGraph identifier. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/dependabot.yml | 13 ++++++++++--- .github/workflows/CompatHelper.yml | 26 -------------------------- .github/workflows/Documentation.yml | 23 ++++++----------------- .github/workflows/Downgrade.yml | 24 ++++++++++++++++++++++++ .github/workflows/FormatCheck.yml | 9 +++------ .github/workflows/SpellCheck.yml | 10 +++------- .github/workflows/Tests.yml | 21 +++++++++++++++++++++ _typos.toml | 3 +++ docs/src/lectures/lecture1.md | 2 +- docs/src/lectures/lecture3.md | 2 +- 10 files changed, 72 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/CompatHelper.yml create mode 100644 .github/workflows/Downgrade.yml create mode 100644 .github/workflows/Tests.yml create mode 100644 _typos.toml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index af89ce9..b777cff 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,6 +5,13 @@ updates: directory: "/" # Location of package manifests schedule: interval: "weekly" - ignore: - - dependency-name: "crate-ci/typos" - update-types: ["version-update:semver-patch", "version-update:semver-minor"] \ No newline at end of file + - package-ecosystem: "julia" + directories: + - "/" + - "/docs" + schedule: + interval: "daily" + groups: + all-julia-packages: + patterns: + - "*" diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml deleted file mode 100644 index 7349454..0000000 --- a/.github/workflows/CompatHelper.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: CompatHelper - -on: - schedule: - - cron: '00 * * * *' - issues: - types: [opened, reopened] - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - julia-version: [1] - julia-arch: [x86] - os: [ubuntu-latest] - steps: - - uses: julia-actions/setup-julia@latest - with: - version: ${{ matrix.julia-version }} - - name: Pkg.add("CompatHelper") - run: julia -e 'using Pkg; Pkg.add("CompatHelper")' - - name: CompatHelper.main() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: julia -e 'using CompatHelper; CompatHelper.main(;subdirs=["", "docs"])' diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index f9508fb..4946024 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -9,22 +9,11 @@ on: pull_request: schedule: - cron: '9 16 * * 3' + jobs: build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: julia-actions/setup-julia@latest - with: - version: '1.11' # Pinned due to Julia 1.12 compatibility issues in upstream packages - - name: Install dependencies - run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - - name: Build and deploy - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key - run: julia --project=docs/ --code-coverage=user docs/make.jl - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v5 - with: - files: lcov.info + name: "Documentation" + uses: "SciML/.github/.github/workflows/documentation.yml@v1" + with: + julia-version: "1.11" # Pinned due to Julia 1.12 compatibility issues in upstream packages + secrets: "inherit" diff --git a/.github/workflows/Downgrade.yml b/.github/workflows/Downgrade.yml new file mode 100644 index 0000000..53d7df2 --- /dev/null +++ b/.github/workflows/Downgrade.yml @@ -0,0 +1,24 @@ +name: Downgrade + +on: + pull_request: + branches: + - main + paths-ignore: + - 'docs/**' + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + downgrade: + name: "Downgrade" + uses: "SciML/.github/.github/workflows/downgrade.yml@v1" + with: + julia-version: "lts" + skip: "Pkg,TOML" + secrets: "inherit" diff --git a/.github/workflows/FormatCheck.yml b/.github/workflows/FormatCheck.yml index d22e82d..32f2e1f 100644 --- a/.github/workflows/FormatCheck.yml +++ b/.github/workflows/FormatCheck.yml @@ -11,9 +11,6 @@ on: jobs: runic: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: fredrikekre/runic-action@v1 - with: - version: '1' + name: "Runic" + uses: "SciML/.github/.github/workflows/runic.yml@v1" + secrets: "inherit" diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 105c8a3..a134515 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -4,10 +4,6 @@ on: [pull_request] jobs: typos-check: - name: Spell Check with Typos - runs-on: ubuntu-latest - steps: - - name: Checkout Actions Repository - uses: actions/checkout@v6 - - name: Check spelling - uses: crate-ci/typos@v1.16.23 \ No newline at end of file + name: "Spell Check with Typos" + uses: "SciML/.github/.github/workflows/spellcheck.yml@v1" + secrets: "inherit" diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml new file mode 100644 index 0000000..120f402 --- /dev/null +++ b/.github/workflows/Tests.yml @@ -0,0 +1,21 @@ +name: "Tests" + +on: + pull_request: + branches: + - main + paths-ignore: + - 'docs/**' + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + tests: + name: "Tests" + uses: "SciML/.github/.github/workflows/tests.yml@v1" + secrets: "inherit" diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 0000000..8787713 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,3 @@ +[default.extend-identifiers] +# ModelingToolkit / BipartiteGraphs type name, not a typo of "COM" +DiCMOBiGraph = "DiCMOBiGraph" diff --git a/docs/src/lectures/lecture1.md b/docs/src/lectures/lecture1.md index 5f6d176..dcbc439 100644 --- a/docs/src/lectures/lecture1.md +++ b/docs/src/lectures/lecture1.md @@ -574,7 +574,7 @@ There's a couple things we can do now to ensure the system is correct. First, w full_equations(sys) ``` -The first equation (after re-aranging) it can be seen is the classic *mass-spring-damper* equation. +The first equation (after re-arranging) it can be seen is the classic *mass-spring-damper* equation. ```math m \cdot \ddot{x} + d \cdot \dot{x} + k \cdot x = f diff --git a/docs/src/lectures/lecture3.md b/docs/src/lectures/lecture3.md index 153c0a8..d16cac8 100644 --- a/docs/src/lectures/lecture3.md +++ b/docs/src/lectures/lecture3.md @@ -474,7 +474,7 @@ The simplest way to choose ``h`` is to make it proportional to the current error q = \frac{LTE}{TOL} ``` -* If ``q < 1``, then ``TOL > LTE`` and therefore we should not accept this step as doing so will make a step beyond the user's tolerance. And note that this would void our warrenty on the global error being bounded, since we need the LTE is "bounded" (at least approximately) at every step to then have any statement about the global error. Thus the calculation with the current $h$ is rejected, the $h$ is changed to $qh$ and the step is recomputed with this smaller time step. +* If ``q < 1``, then ``TOL > LTE`` and therefore we should not accept this step as doing so will make a step beyond the user's tolerance. And note that this would void our warranty on the global error being bounded, since we need the LTE is "bounded" (at least approximately) at every step to then have any statement about the global error. Thus the calculation with the current $h$ is rejected, the $h$ is changed to $qh$ and the step is recomputed with this smaller time step. * If ``q \geq 1``, then ``TOL \leq LTE`` and thus the step is good. Therefore we accept the step and grow ``h``, for example making the new ``h`` equal to ``qh``. Importantly, this means that rejection is way more expensive than acceptance, and therefore it's always good to be a little conservative with step growth. Thus generally the changes are done with a factor, ``Cqh``, where this ``C = 0.9`` or 0.8 or similar.