From 967da83e9bd66fff64c003ec35269c2a82c03263 Mon Sep 17 00:00:00 2001 From: Matthieu Gomez Date: Fri, 21 Jun 2024 08:57:57 -0400 Subject: [PATCH] update --- .github/workflows/TagBot.yml | 19 +++++++++++++++++++ src/derivatives.jl | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index 778c06f..ba6db9e 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -4,6 +4,22 @@ on: types: - created workflow_dispatch: + inputs: + lookback: + default: "3" +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' @@ -12,3 +28,6 @@ jobs: - uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} + # Edit the following line to reflect the actual name of the GitHub Secret containing your private key + ssh: ${{ secrets.DOCUMENTER_KEY }} + # ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }} \ No newline at end of file diff --git a/src/derivatives.jl b/src/derivatives.jl index 1d71a46..be9a661 100644 --- a/src/derivatives.jl +++ b/src/derivatives.jl @@ -7,7 +7,7 @@ struct FirstDerivative{T, X <: AbstractVector{<:Real}, Y <: AbstractVector{<: Re function FirstDerivative(x, y, bc, direction) size(x) == size(y) || throw(DimensionMismatch( "cannot match grid of length $(length(x)) with vector of length $(length(y))")) - direction ∈ (:forward, :backward) || throw(ArgumentError("direction must be :forward or :backward")) + direction ∈ (:forward, :backward, :upward, :downward) || throw(ArgumentError("direction must be :forward/:upward or :backward/:downward")) return new{float(eltype(y)), typeof(x), typeof(y)}(x, y, bc, direction) end end @@ -20,7 +20,7 @@ Base.IndexStyle(d::FirstDerivative) = IndexLinear() function Base.getindex(d::FirstDerivative{T}, i::Int) where {T} x, y, bc, direction = d.x, d.y, d.bc, d.direction - if direction == :forward + if direction ∈ (:forward, :upward) if i == length(x) return convert(T, bc[end]) else