Skip to content

Commit

Permalink
Merge branch 'master' into compathelper/new_version/2023-10-29-00-44-…
Browse files Browse the repository at this point in the history
…20-625-00995730585
  • Loading branch information
gdalle authored Jul 29, 2024
2 parents c9bd7c4 + bff801b commit 7098428
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
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@v1
uses: julia-actions/setup-julia@v2
with:
version: '1'
arch: ${{ runner.arch }}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/DocsPreviewCleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ on:
pull_request:
types: [closed]

# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time
concurrency:
group: doc-preview-cleanup
cancel-in-progress: false

jobs:
doc-preview-cleanup:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
Expand Down
24 changes: 22 additions & 2 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
name: TagBot
on:
schedule:
- cron: 0 * * * *
issue_comment:
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'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
- x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v3
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
Expand All @@ -55,9 +55,13 @@ jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
contents: write # Required when authenticating with `GITHUB_TOKEN`, not needed when authenticating with SSH deploy keys
pull-requests: read # Required when using `push_preview=true`
statuses: write # Optional, used to report documentation build statuses
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- run: |
Expand Down
6 changes: 4 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ReverseDiff"
uuid = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
version = "1.15.1"
version = "1.15.3"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand All @@ -25,6 +25,7 @@ DiffTests = "< 0.1.2"
ForwardDiff = "0.10"
FunctionWrappers = "1"
LinearAlgebra = "<0.0.1, 1"
IrrationalConstants = "0.2"
LogExpFunctions = "0.3"
MacroTools = "0.5"
NaNMath = "0.3, 1"
Expand All @@ -37,7 +38,8 @@ julia = "1"
[extras]
DiffTests = "de460e47-3fe3-5279-bb4a-814414816d5d"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
IrrationalConstants = "92d709cd-6900-40b7-9082-c6be49f344b6"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["DiffTests", "FillArrays", "Test"]
test = ["DiffTests", "FillArrays", "IrrationalConstants", "Test"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# ReverseDiff

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliadiff.org/ReverseDiff.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliadiff.org/ReverseDiff.jl/dev)
[![Build status](https://github.com/JuliaDiff/ReverseDiff.jl/workflows/CI/badge.svg)](https://github.com/JuliaDiff/ReverseDiff.jl/actions)
[![codecov.io](https://codecov.io/github/JuliaDiff/ReverseDiff.jl/coverage.svg?branch=master)](https://codecov.io/github/JuliaDiff/ReverseDiff.jl?branch=master)

[**Go To ReverseDiff's Documentation**](https://juliadiff.org/ReverseDiff.jl/)

[**See ReverseDiff Usage Examples**](https://github.com/JuliaDiff/ReverseDiff.jl/tree/master/examples)

ReverseDiff is a fast and compile-able tape-based **reverse mode automatic differentiation (AD)** that
Expand Down
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ makedocs(;
)

deploydocs(;
repo="github.com/JuliaDiff/ReverseDiff.jl", push_preview=true,
repo="github.com/JuliaDiff/ReverseDiff.jl.git", push_preview=true,
)
2 changes: 1 addition & 1 deletion src/ReverseDiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ using ChainRulesCore
# Not all operations will be valid over all of these types, but that's okay; such cases
# will simply error when they hit the original operation in the overloaded definition.
const ARRAY_TYPES = (:AbstractArray, :AbstractVector, :AbstractMatrix, :Array, :Vector, :Matrix)
const REAL_TYPES = (:Bool, :Integer, :(Irrational{:ℯ}), :(Irrational{}), :Rational, :BigFloat, :BigInt, :AbstractFloat, :Real, :Dual)
const REAL_TYPES = (:Bool, :Integer, :AbstractIrrational, :Rational, :BigFloat, :BigInt, :AbstractFloat, :Real, :Dual)

const SKIPPED_UNARY_SCALAR_FUNCS = Symbol[:isinf, :isnan, :isfinite, :iseven, :isodd, :isreal, :isinteger]
const SKIPPED_BINARY_SCALAR_FUNCS = Symbol[:isequal, :isless, :<, :>, :(==), :(!=), :(<=), :(>=)]
Expand Down
2 changes: 1 addition & 1 deletion src/tape.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function Base.show(io::IO, instruction::AbstractInstruction, pad = "")
end

function Base.show(io::IO, tp::InstructionTape)
println("$(length(tp))-element InstructionTape:")
println(io, length(tp), "-element InstructionTape:")
i = 1
for instruction in tp
print(io, "$i => ")
Expand Down
1 change: 1 addition & 0 deletions test/TapeTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ for Instr in (SpecialInstruction, ScalarInstruction)
@test tp[1].input[2] == y
@test tp[1].output === z
@test tp[1].cache === c
@test startswith(string(tp), "1-element InstructionTape:")

ReverseDiff.record!(NULL_TAPE, Instr, +, (x, y, k), z, c)
@test isempty(NULL_TAPE)
Expand Down
2 changes: 2 additions & 0 deletions test/TrackedTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ using ReverseDiff, Test
using ReverseDiff: TrackedReal, TrackedArray

import ForwardDiff
import IrrationalConstants: log2π

include(joinpath(dirname(@__FILE__), "utils.jl"))

Expand Down Expand Up @@ -609,6 +610,7 @@ empty!(tp)
@test promote_type(T, Integer) === TrackedReal{BigInt,Float64,A}
@test promote_type(T, typeof(ℯ)) === TrackedReal{BigFloat,Float64,A}
@test promote_type(T, typeof(π)) === TrackedReal{BigFloat,Float64,A}
@test promote_type(T, typeof(log2π)) === TrackedReal{BigFloat,Float64,A}
@test promote_type(T, Rational{Int}) === TrackedReal{Rational{BigInt},Float64,A}
@test promote_type(T, BigFloat) === TrackedReal{BigFloat,Float64,A}
@test promote_type(T, BigInt) === T
Expand Down

0 comments on commit 7098428

Please sign in to comment.