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

Update ValidationManifold #217

Merged
merged 31 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
60d04f3
A first commit updating doc strings, adding the point.
kellertuer Nov 23, 2024
df8d3ae
accidentally deleted a line.
kellertuer Nov 23, 2024
9cc62ef
Trying to adapt converts – not yet fully successful.
kellertuer Nov 23, 2024
d5959a7
fix a tests.
kellertuer Nov 23, 2024
a32c28e
Runs formatter.
kellertuer Nov 23, 2024
24a4c0d
Fix conversion types.
kellertuer Nov 24, 2024
6cc6ce0
Start with the ignores dictionary.
kellertuer Nov 30, 2024
d5712ca
Add the ignore dictionary and test it prototypically on one function.
kellertuer Nov 30, 2024
c9313d4
Rework how to store ignores and a nicer dispatch.
kellertuer Dec 1, 2024
180fda9
Add new scheme to all is_point and is_vector calls.
kellertuer Dec 1, 2024
0bdce6c
Fix tests.
kellertuer Dec 2, 2024
15697aa
Unify _msg, add functions from the interface file.
kellertuer Dec 2, 2024
d956042
make _msg also handle errors, hence tests pass again, where two error…
kellertuer Dec 2, 2024
d12b3fe
Debugging and Test coverage.
kellertuer Dec 2, 2024
a8bbc1f
minor fix
mateuszbaran Dec 2, 2024
9cc2e6b
A bit more test coverage.
kellertuer Dec 2, 2024
bc296c3
A few final tests for today.
kellertuer Dec 2, 2024
dcf2773
Discard part that is (due to previous dispatched) no longer necessary.
kellertuer Dec 2, 2024
ea9de3b
Remove a few prefx emojis.
kellertuer Dec 7, 2024
5a22a53
code coverage and discuccions from review.
kellertuer Dec 7, 2024
35a8ecd
Follow the same scheme as Manifolds.jl and make LTS (1.10) the lower …
kellertuer Dec 7, 2024
30aef05
Remove dependency on Requires.jl, since we raised LTS.
kellertuer Dec 7, 2024
ccea1e8
improve test to be a bit more silent.
kellertuer Dec 7, 2024
3e09b79
prepare for logo prefixes here as well.
kellertuer Dec 7, 2024
e822729
fix a typo in a filename.
kellertuer Dec 7, 2024
b075bcb
small improvements
mateuszbaran Dec 9, 2024
2efe152
add two missing tests
mateuszbaran Dec 9, 2024
161d00d
promote base points on new TVectors.
kellertuer Dec 9, 2024
06e4414
also update existing base points if a vector is mutated.
kellertuer Dec 9, 2024
44c4b8a
improve test cov.
kellertuer Dec 9, 2024
51dbfa6
fix two within
mateuszbaran Dec 9, 2024
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
15 changes: 15 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ 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] 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
6 changes: 2 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name = "ManifoldsBase"
uuid = "3362f125-f0bb-47a3-aa74-596ffd7ef2fb"
authors = ["Seth Axen <[email protected]>", "Mateusz Baran <[email protected]>", "Ronny Bergmann <[email protected]>", "Antoine Levitt <[email protected]>"]
version = "0.15.22"
version = "0.15.23"

[deps]
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 @@ -60,7 +60,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
Loading