From 8a48ea64bd7ec0bc47762849f75790e92ee44f10 Mon Sep 17 00:00:00 2001 From: Jeff Fessler Date: Sat, 11 May 2024 20:58:51 -0400 Subject: [PATCH] Standardize yml (#25) * Standardize make.jl * Standardize yml * fix typo * Add _typos --- .github/workflows/CompatHelper.yml | 18 +++++++++++++++++- .github/workflows/SpellCheck.yml | 13 +++++++++++++ .github/workflows/TagBot.yml | 2 ++ _typos.toml | 4 ++++ docs/make.jl | 10 +++++----- src/ndgrid-step-range-len.jl | 4 ++-- 6 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/SpellCheck.yml create mode 100644 _typos.toml diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index 385af0b..e4ee926 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -1,13 +1,26 @@ name: CompatHelper + on: schedule: - cron: 0 0 * * 0 # weekly workflow_dispatch: - +permissions: + contents: write + pull-requests: write jobs: CompatHelper: runs-on: ubuntu-latest steps: + - name: Check if Julia is already available in the PATH + id: julia_in_path + run: which julia + continue-on-error: true + - name: Install Julia, but only if it is not already available in the PATH + uses: julia-actions/setup-julia@latest + with: + version: '1' + # arch: ${{ runner.arch }} + if: steps.julia_in_path.outcome != 'success' - name: "Add the General registry via Git" run: | import Pkg @@ -30,3 +43,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} + +# based on: +# https://github.com/JuliaRegistries/CompatHelper.jl diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml new file mode 100644 index 0000000..c344f6d --- /dev/null +++ b/.github/workflows/SpellCheck.yml @@ -0,0 +1,13 @@ +name: Spell Check + +on: [pull_request] + +jobs: + typos-check: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v4 + - name: Check spelling + uses: crate-ci/typos@master diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index f49313b..6d2efc1 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -1,9 +1,11 @@ name: TagBot + on: issue_comment: types: - created workflow_dispatch: + jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 0000000..197ebeb --- /dev/null +++ b/_typos.toml @@ -0,0 +1,4 @@ +[default] +extend-ignore-identifiers-re = [ + "GridOT", +] diff --git a/docs/make.jl b/docs/make.jl index 58d53a0..b7ba836 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -2,8 +2,8 @@ execute = isempty(ARGS) || ARGS[1] == "run" org, reps = :JuliaArrays, :LazyGrids eval(:(using $reps)) -using Documenter -using Literate +import Documenter +import Literate # https://juliadocs.github.io/Documenter.jl/stable/man/syntax/#@example-block ENV["GKSwstype"] = "100" @@ -23,7 +23,7 @@ binder_root_url = repo = eval(:($reps)) -DocMeta.setdocmeta!(repo, :DocTestSetup, :(using $reps); recursive=true) +Documenter.DocMeta.setdocmeta!(repo, :DocTestSetup, :(using $reps); recursive=true) # preprocessing inc1 = "include(\"../../../inc/reproduce.jl\")" @@ -77,7 +77,7 @@ format = Documenter.HTML(; assets = ["assets/custom.css"], ) -makedocs(; +Documenter.makedocs(; modules = [repo], authors = "Jeff Fessler and contributors", sitename = "$repo.jl", @@ -90,7 +90,7 @@ makedocs(; ) if isci - deploydocs(; + Documenter.deploydocs(; repo = "github.com/$base", devbranch = "main", devurl = "dev", diff --git a/src/ndgrid-step-range-len.jl b/src/ndgrid-step-range-len.jl index e41416f..f067782 100644 --- a/src/ndgrid-step-range-len.jl +++ b/src/ndgrid-step-range-len.jl @@ -18,8 +18,8 @@ struct GridSL{T,d,D, R, S} <: AbstractGrid{T,d,D} function GridSL(dims::Dims{D}, v::StepRangeLen{T,R,S}, d::Int) where {D, T, R, S} 1 ≤ d ≤ D || throw(ArgumentError("$d for $dims")) - eltype(v.len) == Int || throw("non-Int v.len unsuported") - eltype(v.offset) == Int || throw("non-Int v.offset unsuported") + eltype(v.len) == Int || throw("non-Int v.len unsupported") + eltype(v.offset) == Int || throw("non-Int v.offset unsupported") new{T,d,D,R,S}(dims, v.ref, v.step, v.len, v.offset) end end