Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieugomez committed Jun 21, 2024
1 parent 52c8ebf commit 967da83
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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 }}
4 changes: 2 additions & 2 deletions src/derivatives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 967da83

Please sign in to comment.