Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to Julia 1.11 #50

Merged
merged 2 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ["1.6", "1.10", "~1.11.0-0"]
julia-version: ["lts", "1", "pre"]
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: "1.10"
version: "1"
- uses: julia-actions/julia-docdeploy@v1
env:
PYTHON: ""
Expand Down
8 changes: 7 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ All notable changes to this Julia package will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.13] unreleased
## [0.3.14] unreleased

### Changed

* Julia compat lower bound bumped from 1.6 to 1.10 (the new LTS)

## [0.3.13] November 13, 2024

### Added

Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ManifoldDiff"
uuid = "af67fdf4-a580-4b9f-bbec-742ef357defd"
authors = ["Seth Axen <[email protected]>", "Mateusz Baran <[email protected]>", "Ronny Bergmann <[email protected]>"]
version = "0.3.13"
version = "0.3.14"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down Expand Up @@ -34,7 +34,7 @@ ManifoldsBase = "0.15"
RecursiveArrayTools = "2, 3"
Requires = "1"
StaticArrays = "1"
julia = "1.6"
julia = "1.10"

[extras]
ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2"
Expand Down
14 changes: 3 additions & 11 deletions ext/ManifoldDiffFiniteDiffExt.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
module ManifoldDiffFiniteDiffExt

if isdefined(Base, :get_extension)
using ManifoldDiff
using ManifoldDiff: FiniteDiffBackend
using FiniteDiff
else
# imports need to be relative for Requires.jl-based workflows:
# https://github.com/JuliaArrays/ArrayInterface.jl/pull/387
using ..ManifoldDiff
using ..ManifoldDiff: FiniteDiffBackend
using ..FiniteDiff
end
using ManifoldDiff
using ManifoldDiff: FiniteDiffBackend
using FiniteDiff

function ManifoldDiff._derivative(f, p, ::FiniteDiffBackend{Method}) where {Method}
return FiniteDiff.finite_difference_derivative(f, p, Method)
Expand Down
14 changes: 3 additions & 11 deletions ext/ManifoldDiffFiniteDifferencesExt.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
module ManifoldDiffFiniteDifferencesExt

if isdefined(Base, :get_extension)
using ManifoldDiff
using ManifoldDiff: FiniteDifferencesBackend
using FiniteDifferences
else
# imports need to be relative for Requires.jl-based workflows:
# https://github.com/JuliaArrays/ArrayInterface.jl/pull/387
using ..ManifoldDiff
using ..ManifoldDiff: FiniteDifferencesBackend
using ..FiniteDifferences
end
using ManifoldDiff
using ManifoldDiff: FiniteDifferencesBackend
using FiniteDifferences

function ManifoldDiff.FiniteDifferencesBackend()
return FiniteDifferencesBackend(central_fdm(5, 1))
Expand Down
14 changes: 3 additions & 11 deletions ext/ManifoldDiffForwardDiffExt.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
module ManifoldDiffForwardDiffExt

if isdefined(Base, :get_extension)
using ManifoldDiff
using ManifoldDiff: ForwardDiffBackend
using ForwardDiff
else
# imports need to be relative for Requires.jl-based workflows:
# https://github.com/JuliaArrays/ArrayInterface.jl/pull/387
using ..ManifoldDiff
using ..ManifoldDiff: ForwardDiffBackend
using ..ForwardDiff
end
using ManifoldDiff
using ManifoldDiff: ForwardDiffBackend
using ForwardDiff

function ManifoldDiff._derivative(f, p, ::ForwardDiffBackend)
return ForwardDiff.derivative(f, p)
Expand Down
14 changes: 3 additions & 11 deletions ext/ManifoldDiffReverseDiffExt.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
module ManifoldDiffReverseDiffExt

if isdefined(Base, :get_extension)
using ManifoldDiff
using ManifoldDiff: ReverseDiffBackend
using ReverseDiff
else
# imports need to be relative for Requires.jl-based workflows:
# https://github.com/JuliaArrays/ArrayInterface.jl/pull/387
using ..ManifoldDiff
using ..ManifoldDiff: ReverseDiffBackend
using ..ReverseDiff
end
using ManifoldDiff
using ManifoldDiff: ReverseDiffBackend
using ReverseDiff

function ManifoldDiff._gradient(f, p, ::ReverseDiffBackend)
return ReverseDiff.gradient(f, p)
Expand Down
14 changes: 3 additions & 11 deletions ext/ManifoldDiffZygoteExt.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
module ManifoldDiffZygoteExt

if isdefined(Base, :get_extension)
using ManifoldDiff
using ManifoldDiff: ZygoteDiffBackend
using Zygote
else
# imports need to be relative for Requires.jl-based workflows:
# https://github.com/JuliaArrays/ArrayInterface.jl/pull/387
using ..ManifoldDiff
using ..ManifoldDiff: ZygoteDiffBackend
using ..Zygote
end
using ManifoldDiff
using ManifoldDiff: ZygoteDiffBackend
using Zygote

function ManifoldDiff._gradient(f, p, ::ZygoteDiffBackend)
return Zygote.gradient(f, p)[1]
Expand Down
22 changes: 0 additions & 22 deletions src/ManifoldDiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -181,28 +181,6 @@ include("embedded_diff.jl")


function __init__()
@static if !isdefined(Base, :get_extension)
@require FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" begin
include("../ext/ManifoldDiffFiniteDiffExt.jl")
end

@require FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000" begin
include("../ext/ManifoldDiffFiniteDifferencesExt.jl")
end

@require ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" begin
include("../ext/ManifoldDiffForwardDiffExt.jl")
end

@require ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" begin
include("../ext/ManifoldDiffReverseDiffExt.jl")
end

@require Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" begin
include("../ext//ManifoldDiffZygoteExt.jl")
end
end

# There is likely no way to set defaults without Requires.jl
@require FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000" begin
if default_differential_backend() === NoneDiffBackend()
Expand Down
Loading