Skip to content

Commit

Permalink
Follow the JuliaManifolds Groove: Move to LTS 1.10 (#431)
Browse files Browse the repository at this point in the history
* Follow the JuliaManifolds Groove: Move to LTS 1.10
* remove further unnecessary lines since Julia 1.10
* Bump version already.
  • Loading branch information
kellertuer authored Dec 25, 2024
1 parent 27ebea0 commit 41d852d
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 94 deletions.
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"]
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 @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: quarto-dev/quarto-actions/setup@v2
with:
version: "1.3.353"
version: "1.6.39"
- uses: julia-actions/setup-julia@latest
with:
version: "1.11"
Expand Down
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.5.5] unreleased

### Changed

* Minimum Julia version is now 1.10 (the LTS which replaced 1.6)

### Removed

* The geodesic regression example, first because it is not correct, second because it should become part of ManoptExamples.jl once it is correct.
Expand Down
22 changes: 10 additions & 12 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Manopt"
uuid = "0fc0a36d-df90-57f3-8f93-d78a9fc72bb5"
authors = ["Ronny Bergmann <[email protected]>"]
version = "0.5.4"
version = "0.5.5"

[deps]
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Expand All @@ -16,7 +16,6 @@ Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

Expand Down Expand Up @@ -44,29 +43,28 @@ ColorSchemes = "3.5.0"
ColorTypes = "0.9.1, 0.10, 0.11, 0.12"
Colors = "0.11.2, 0.12, 0.13"
DataStructures = "0.17, 0.18"
Dates = "1.6"
Dates = "1.10"
ForwardDiff = "0.10"
JuMP = "1.15"
LRUCache = "1.4"
LineSearches = "7.2.0"
LinearAlgebra = "1.6"
LinearAlgebra = "1.10"
ManifoldDiff = "0.3.8, 0.4"
Manifolds = "0.9.11, 0.10"
ManifoldsBase = "0.15.18"
ManoptExamples = "0.1.10"
Markdown = "1.6"
Markdown = "1.10"
Plots = "1.30"
Preferences = "1.4"
Printf = "1.6"
Printf = "1.10"
QuadraticModels = "0.9"
Random = "1.6"
Random = "1.10"
RecursiveArrayTools = "2, 3"
Requires = "0.5, 1"
RipQP = "0.6.4"
SparseArrays = "1.6"
Statistics = "1.6"
Test = "1.6"
julia = "1.8"
SparseArrays = "1.10"
Statistics = "1.10"
Test = "1.10"
julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand Down
23 changes: 5 additions & 18 deletions ext/ManoptJuMPExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,15 @@ module ManoptJuMPExt

using Manopt
using LinearAlgebra
if isdefined(Base, :get_extension)
using JuMP: JuMP
else
# imports need to be relative for Requires.jl-based workflows:
# https://github.com/JuliaArrays/ArrayInterface.jl/pull/387
using ..JuMP: JuMP
end
const MOI = JuMP.MOI
using JuMP: JuMP
using ManifoldsBase
using ManifoldDiff
const MOI = JuMP.MOI

function __init__()
# So that the user can use the convenient `Manopt.JuMP_Optimizer`
if isdefined(Base, :setglobal!)
setglobal!(Manopt, :JuMP_Optimizer, Optimizer)
setglobal!(Manopt, :JuMP_VectorizedManifold, VectorizedManifold)
setglobal!(Manopt, :JuMP_ArrayShape, ArrayShape)
else
Manopt.eval(:(const JuMP_Optimizer = $Optimizer))
Manopt.eval(:(const JuMP_VectorizedManifold = $VectorizedManifold))
Manopt.eval(:(const JuMP_ArrayShape = $ArrayShape))
end
setglobal!(Manopt, :JuMP_Optimizer, Optimizer)
setglobal!(Manopt, :JuMP_VectorizedManifold, VectorizedManifold)
setglobal!(Manopt, :JuMP_ArrayShape, ArrayShape)
return nothing
end

Expand Down
9 changes: 1 addition & 8 deletions ext/ManoptLRUCacheExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@ module ManoptLRUCacheExt
using Manopt
import Manopt: init_caches
using ManifoldsBase

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

# introduce LRU even as default.
function Manopt.init_caches(
Expand Down
9 changes: 1 addition & 8 deletions ext/ManoptLineSearchesExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@ module ManoptLineSearchesExt
using Manopt
import Manopt: LineSearchesStepsize
using ManifoldsBase

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

function (cs::Manopt.LineSearchesStepsize)(
mp::AbstractManoptProblem,
Expand Down
6 changes: 1 addition & 5 deletions ext/ManoptManifoldsExt/ManoptManifoldsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ using ManifoldDiff:
adjoint_differential_shortest_geodesic_startpoint,
adjoint_differential_shortest_geodesic_endpoint

if isdefined(Base, :get_extension)
using Manifolds
else
using ..Manifolds
end
using Manifolds

Rn(::Val{:Manifolds}, args...; kwargs...) = Euclidean(args...; kwargs...)

Expand Down
6 changes: 1 addition & 5 deletions ext/ManoptRecursiveArrayToolsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ import Manopt:
set_parameter!
using Manopt: _tex, _var, ManifoldDefaultsFactory, _produce_type

if isdefined(Base, :get_extension)
using RecursiveArrayTools
else
using ..RecursiveArrayTools
end
using RecursiveArrayTools

@doc raw"""
X = get_gradient(M::ProductManifold, ago::ManifoldAlternatingGradientObjective, p)
Expand Down
11 changes: 2 additions & 9 deletions ext/ManoptRipQPQuadraticModelsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,8 @@ using ManifoldsBase
using LinearAlgebra: tril
using SparseArrays: sparse

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

function convex_bundle_method_subsolver(
M::A, p_last_serious, linearization_errors, transported_subgradients
Expand Down
27 changes: 0 additions & 27 deletions src/Manopt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ using Preferences:
@load_preference, @set_preferences!, @has_preference, @delete_preferences!
using Printf
using Random: AbstractRNG, default_rng, shuffle!, rand, randn!, randperm
using Requires
using SparseArrays
using Statistics

Expand Down Expand Up @@ -273,32 +272,6 @@ function __init__()
end
end
end
#
# Requires fallback for Julia < 1.9
#
@static if !isdefined(Base, :get_extension) # COV_EXCL_LINE
@require JuMP = "4076af6c-e467-56ae-b986-b466b2749572" begin
include("../ext/ManoptJuMPExt.jl")
end
@require Manifolds = "1cead3c2-87b3-11e9-0ccd-23c62b72b94e" begin
include("../ext/ManoptManifoldsExt/ManoptManifoldsExt.jl")
end
@require RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" begin
include("../ext/ManoptRecursiveArrayToolsExt.jl")
end
@require LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" begin
include("../ext/ManoptLineSearchesExt.jl")
end
@require LRUCache = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" begin
include("../ext/ManoptLRUCacheExt.jl")
end
@require QuadraticModels = "f468eda6-eac5-11e8-05a5-ff9e497bcd19" begin
@require RipQP = "1e40b3f8-35eb-4cd8-8edd-3e515bb9de08" begin
include("../ext/ManoptRipQPQuadraticModelsExt.jl")
end
end
end

return nothing
end
#
Expand Down

0 comments on commit 41d852d

Please sign in to comment.