Skip to content

Commit

Permalink
Merge branch 'master' into mbaran/about-manifolds
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran committed Dec 10, 2024
2 parents 9c8fb15 + 76d6a5f commit 87c50f2
Show file tree
Hide file tree
Showing 21 changed files with 877 additions and 317 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.0-0"]
julia-version: ["lts", "1", "pre"]
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v4
Expand Down
17 changes: 16 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,27 @@ All notable changes to this project 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.15.23] unreleased
## [0.15.24] unreleased

### Added

* A new tutorial about manifolds.

## [0.15.23] 09/12/2024

### Added

* a field `point` to `ValidationFibreVector` to potentially store the point of the vector.
* a field `store_base_point` to `ValidationManifold` to indicate whether for new fibre vectors the base point should be stored.
* a keyword `ignore_contexts` to `ValidationManifold` to ignore certain contexts from validation, such as `:Input`, `:Output`, `:Point`, or `:Vector`.
* a keyword `ignore_functions` to `ValidationFibreVector` to ignore certain contexts within a single function. This is provided as a dictionary with the key being the (allocating) function and the value is a context or vector of contexts.

### Changed

* the internal function `array_value` was renamed to `internal_value` and is now exported, since it can be also used on elements that store values different from arrays,
e.g. a `ValidationMPoint` storing a subtype of a `ManifoldPoint`. `array_value` is hence deprecated.
* Minimum Julia version is now 1.10 (the LTS which replaced 1.6)

## [0.15.22] 15/11/2024

### Added
Expand Down
4 changes: 1 addition & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"

[weakdeps]
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Expand All @@ -33,13 +32,12 @@ Plots = "1"
Printf = "1.6"
Random = "1.6"
RecursiveArrayTools = "2, 3"
Requires = "1"
ReverseDiff = "1"
StaticArrays = "1"
Statistics = "1.6"
Quaternions = "0.7"
Test = "1.6"
julia = "1.6"
julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand Down
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ makedocs(;
# for development, we disable prettyurls
format = Documenter.HTML(;
prettyurls = (get(ENV, "CI", nothing) == "true") || ("--prettyurls" ARGS),
assets = ["assets/favicon.ico", "assets/citations.css"],
assets = ["assets/favicon.ico", "assets/citations.css", "assets/link-icons.css"],
size_threshold_warn = 200 * 2^10, # raise slightly from 100 to 200 KiB
size_threshold = 300 * 2^10, # raise slightly 200 to to 300 KiB
),
Expand Down
41 changes: 41 additions & 0 deletions docs/src/assets/link-icons.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
a[href^="https://juliamanifolds.github.io/Manifolds.jl/"]::before {
content: "";
background-image: url('logo-manifolds.png');
background-size: contain;
background-repeat: no-repeat;
display: inline-block;
height: 1em;
width: 1em;
margin-right: 4px;
vertical-align: middle;
}

a[href^="https://manoptjl.org/"]::before {
content: "";
background-image: url('logo-manopt.png');
background-size: contain;
background-repeat: no-repeat;
display: inline-block;
height: 1em;
width: 1em;
margin-right: 4px;
vertical-align: middle;
}

a[href^="https://en.wikipedia.org/"]::before {
content: "";
background-image: url('wikipedia.png');
background-size: contain;
background-repeat: no-repeat;
display: inline-block;
height: 1em;
width: 1em;
margin-right: 4px;
vertical-align: middle;
}

@media (prefers-color-scheme: dark) {
a[href^="https://juliamanifolds.github.io/Manifolds.jl/"]::before {
background-image: url('logo-manifolds-dark.png');
}
}
Binary file added docs/src/assets/logo-manifolds-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/logo-manifolds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/logo-manopt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/wikipedia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 4 additions & 13 deletions ext/ManifoldsBasePlotsExt.jl
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
module ManifoldsBasePlotsExt

if isdefined(Base, :get_extension)
using ManifoldsBase
using Plots
using Printf: @sprintf
import ManifoldsBase: plot_slope
else
# imports need to be relative for Requires.jl-based workflows:
# https://github.com/JuliaArrays/ArrayInterface.jl/pull/387
using ..ManifoldsBase
using ..Plots
using ..ManifoldsBase: @sprintf # is from Printf, but loaded in ManifoldsBase, and since Printf loading works here only on full moon days between 12 and noon, this trick might do it?
import ..ManifoldsBase: plot_slope
end
using ManifoldsBase
using Plots
using Printf: @sprintf
import ManifoldsBase: plot_slope

function ManifoldsBase.plot_slope(
x,
Expand Down
14 changes: 3 additions & 11 deletions ext/ManifoldsBaseQuaternionsExt.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
module ManifoldsBaseQuaternionsExt

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

@inline function ManifoldsBase.allocate_result_type(
::AbstractManifold{ℍ},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,69 +1,34 @@
module ManifoldsBaseRecursiveArrayToolsExt

if isdefined(Base, :get_extension)
using ManifoldsBase
using RecursiveArrayTools
using ManifoldsBase: AbstractBasis, ProductBasisData, TangentSpaceType
using ManifoldsBase: number_of_components
using Random
using ManifoldsBase
using RecursiveArrayTools
using ManifoldsBase: AbstractBasis, ProductBasisData, TangentSpaceType
using ManifoldsBase: number_of_components
using Random

import ManifoldsBase:
allocate,
allocate_on,
allocate_result,
default_inverse_retraction_method,
default_retraction_method,
default_vector_transport_method,
_get_dim_ranges,
get_vector,
get_vectors,
inverse_retract,
parallel_transport_direction,
parallel_transport_to,
project,
riemann_tensor,
submanifold_component,
submanifold_components,
vector_transport_direction,
_vector_transport_direction,
_vector_transport_to,
vector_transport_to,
ziptuples
import Base: copyto!, getindex, setindex!, view
else
# imports need to be relative for Requires.jl-based workflows:
# https://github.com/JuliaArrays/ArrayInterface.jl/pull/387
using ..ManifoldsBase
using ..RecursiveArrayTools
using ..ManifoldsBase: AbstractBasis, ProductBasisData, TangentSpaceType
using ..ManifoldsBase: number_of_components
using ..Random

import ..ManifoldsBase:
allocate,
allocate_on,
allocate_result,
default_inverse_retraction_method,
default_retraction_method,
default_vector_transport_method,
_get_dim_ranges,
get_vector,
get_vectors,
inverse_retract,
parallel_transport_direction,
parallel_transport_to,
project,
_retract,
riemann_tensor,
submanifold_component,
submanifold_components,
vector_transport_direction,
_vector_transport_direction,
_vector_transport_to,
vector_transport_to,
ziptuples
import ..Base: copyto!, getindex, setindex!, view
end
import ManifoldsBase:
allocate,
allocate_on,
allocate_result,
default_inverse_retraction_method,
default_retraction_method,
default_vector_transport_method,
_get_dim_ranges,
get_vector,
get_vectors,
inverse_retract,
parallel_transport_direction,
parallel_transport_to,
project,
riemann_tensor,
submanifold_component,
submanifold_components,
vector_transport_direction,
_vector_transport_direction,
_vector_transport_to,
vector_transport_to,
ziptuples
import Base: copyto!, getindex, setindex!, view

include("ProductManifoldRecursiveArrayToolsExt.jl")

Expand Down
14 changes: 3 additions & 11 deletions ext/ManifoldsBaseStatisticsExt.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
module ManifoldsBaseStatisticsExt

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

function ManifoldsBase.find_best_slope_window(
X,
Expand Down
20 changes: 2 additions & 18 deletions src/ManifoldsBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ using LinearAlgebra
using Markdown: @doc_str
using Printf: @sprintf
using Random
using Requires

include("maintypes.jl")
include("numbers.jl")
Expand Down Expand Up @@ -1171,6 +1170,7 @@ include("DefaultManifold.jl")
include("ProductManifold.jl")
include("PowerManifold.jl")

include("deprecated.jl")
#
#
# Init
Expand Down Expand Up @@ -1207,23 +1207,6 @@ function __init__()
end
end
end
# Extensions in the pre 1.9 fallback using Requires.jl
@static if !isdefined(Base, :get_extension)
@require RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" begin
include(
"../ext/ManifoldsBaseRecursiveArrayToolsExt/ManifoldsBaseRecursiveArrayToolsExt.jl",
)
end
@require Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" begin
include("../ext/ManifoldsBasePlotsExt.jl")
end
@require Quaternions = "94ee1d12-ae83-5a48-8b1c-48b8ff168ae0" begin
include("../ext/ManifoldsBaseQuaternionsExt.jl")
end
@require Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" begin
include("../ext/ManifoldsBaseStatisticsExt.jl")
end
end
end
#
#
Expand Down Expand Up @@ -1368,6 +1351,7 @@ export ×,
hat!,
injectivity_radius,
inner,
internal_value,
inverse_retract,
inverse_retract!,
isapprox,
Expand Down
Loading

0 comments on commit 87c50f2

Please sign in to comment.