Skip to content

Commit

Permalink
Bump dependencies. (#309)
Browse files Browse the repository at this point in the history
* Bump dependencies.
* Move ARC CG subsolver to the main module
* Update Changelog.md
* Add a workflow that makes sure we do not forget to add an entry to Changelog.md on PRs.
* Apply suggestions from code review
* Add Changelog to docs.

---------

Co-authored-by: Mateusz Baran <mateuszbaran89@gmail.com>
  • Loading branch information
kellertuer and mateuszbaran authored Oct 25, 2023
1 parent d6acf64 commit 7563b32
Show file tree
Hide file tree
Showing 16 changed files with 217 additions and 117 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Check Changelog
on:
pull_request:

jobs:
Check-Changelog:
name: Check Changelog Action
runs-on: ubuntu-latest
steps:
- uses: tarides/changelog-check-action@v2
with:
changelog: Changelog.md
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ docs/src/tutorials/*.md
docs/.CondaPkg
docs/src/tutorials/Optimize!_files
docs/src/tutorials/*.html
docs/src/changelog.md
64 changes: 63 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,68 @@ All notable Changes to the Julia package `Manopt.jl` will be documented in this
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.4.40] – 24/10/2023

### Added

* add a `--help` argument to `docs/make.jl` to document all availabel command line arguments
* add a `--exclude-tutorials` argument to `docs/make.jl`. This way, when quarto is not available
on a computer, the docs can still be build with the tutorials not being added to the menu
such that documenter does not expect them to exist.

### Changes

* Bump dependencies to `ManifoldsBase.jl` 0.15 and `Manifolds.jl` 0.9
* move the ARC CG subsolver to the main package, since `TangentSpace` is now already
available from `ManifoldsBase`.

## [0.4.39] – 09/10/2023

### Changes

* also use the pair of a retraction and the inverse retraction (see last update)
to perform the relaxation within the Douglas-Rachford algorithm.

## [0.4.38] – 08/10/2023

### Changes

* avoid allocations when calling `get_jacobian!` within the Levenberg-Marquard Algorithm.

### Fixed

* Fix a lot of typos in the documentation

## [0.4.37] – 28/09/2023

### Changes

* add more of the Riemannian Levenberg-Marquard algorithms parameters as keywords, so they
can be changed on call
* generalize the internal reflection of Douglas-Rachford, such that is also works with an
arbitrary pair of a reflection and an inverse reflection.

## [0.4.36] – 20/09/2023

### Fixed

* Fixed a bug that caused non-matrix points and vectors to fail when working with approcimate

## [0.4.35] – 14/09/2023

### Added

* The access to functions of the objective is now unified and encapsulated in proper `get_`
functions.

## [0.4.34] – 02/09/2023

### Added

* an `ManifoldEuclideanGradientObjetive` to allow the cost, gradient, and Hessian and other
first or second derivative based elements to be Euclidean and converted when needed.
* a keyword `objective_type=:Euclidean` for all solvers, that specifies that an Objective shall be created of the above type

## [0.4.33] - 24/08/2023

### Added
Expand Down Expand Up @@ -282,7 +344,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* a `max_stepsize` per manifold to avoid leaving the injectivity radius,
which it also defaults to

## {0.4.0] - 10/01/2023
## [0.4.0] - 10/01/2023

### Added

Expand Down
6 changes: 3 additions & 3 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 <manopt@ronnybergmann.net>"]
version = "0.4.39"
version = "0.4.40"

[deps]
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Expand Down Expand Up @@ -40,8 +40,8 @@ Colors = "0.11.2, 0.12"
DataStructures = "0.17, 0.18"
LRUCache = "1.4"
ManifoldDiff = "0.2, 0.3.3"
Manifolds = "0.8.75"
ManifoldsBase = "0.14.10"
Manifolds = "0.9"
ManifoldsBase = "0.15"
PolynomialRoots = "1"
Requires = "0.5, 1"
julia = "1.6"
Expand Down
6 changes: 3 additions & 3 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
[compat]
BenchmarkTools = "1.3"
CondaPkg = "0.2"
Documenter = "0.27"
Manifolds = "0.8.75"
ManifoldsBase = "0.13, 0.14"
Documenter = "1"
Manifolds = "0.8.81, 0.9"
ManifoldsBase = "0.14.12, 0.15"
109 changes: 67 additions & 42 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@
#
#

if "--help" ARGS
println(
"""
docs/make.jl
Render the `Manopt.jl` documenation with optinal arguments
Arguments
* `--exclude-docs` - exclude the tutorials from the menu of Documenter,
this can be used if you do not have Quarto installed to still be able to render the docs
locally on this machine. This option should not be set on CI.
* `--help` - print this help and exit without rendering the documentation
* `--quarto` – run the Quarto notebooks from the `tutorials/` folder before generating the documentation
this has to be run locally at least once for the `tutorials/*.md` files to exist that are included in
the documentation (see `--exclude-tutorials`) for the alternative.
If they are generated ones they are cached accordingly.
Then you can spare time in the rendering by not passing this argument.
""",
)
exit(0)
end

#
# (a) if docs is not the current active environment, switch to it
# (from https://github.com/JuliaIO/HDF5.jl/pull/1020/) 
Expand Down Expand Up @@ -29,6 +51,17 @@ if "--quarto" ∈ ARGS
end
end

tutorials_in_menu = true
if "--exclude-tutorials" ARGS
@warn """
You are excluding the tutorials from the Menu,
which might be done if you can not render them locally.
Remember that this should never be done on CI for the full documentation.
"""
tutorials_in_menu = false
end

# (c) load necessary packages for the docs
using Documenter
using DocumenterCitations
Expand All @@ -38,26 +71,42 @@ using LineSearches, LRUCache, Manopt, Manifolds, Plots
generated_path = joinpath(@__DIR__, "src")
base_url = "https://github.com/JuliaManifolds/Manopt.jl/blob/master/"
isdir(generated_path) || mkdir(generated_path)
open(joinpath(generated_path, "contributing.md"), "w") do io
# Point to source license file
println(
io,
"""
```@meta
EditURL = "$(base_url)CONTRIBUTING.md"
```
""",
)
# Write the contents out below the meta block
for line in eachline(joinpath(dirname(@__DIR__), "CONTRIBUTING.md"))
println(io, line)
for (md_file, doc_file) in
[("CONTRIBUTING.md", "contributing.md"), ("Changelog.md", "changelog.md")]
open(joinpath(generated_path, doc_file), "w") do io
# Point to source license file
println(
io,
"""
```@meta
EditURL = "$(base_url)$(md_file)"
```
""",
)
# Write the contents out below the meta block
for line in eachline(joinpath(dirname(@__DIR__), md_file))
println(io, line)
end
end
end

## Build titorials menu
tutorials_menu =
"How to..." => [
"Get started: Optimize!" => "tutorials/Optimize!.md",
"Speedup using Inplace computations" => "tutorials/InplaceGradient.md",
"Use Automatic Differentiation" => "tutorials/AutomaticDifferentiation.md",
"Define Objectives in the Embedding" => "tutorials/EmbeddingObjectives.md",
"Count and use a Cache" => "tutorials/CountAndCache.md",
"Print Debug Output" => "tutorials/HowToDebug.md",
"Record values" => "tutorials/HowToRecord.md",
"Implement a Solver" => "tutorials/ImplementASolver.md",
"Do Constrained Optimization" => "tutorials/ConstrainedOptimization.md",
"Do Geodesic Regression" => "tutorials/GeodesicRegression.md",
]
# (e) ...finally! make docs
bib = CitationBibliography(joinpath(@__DIR__, "src", "references.bib"); style=:alpha)
makedocs(
bib;
makedocs(;
format=Documenter.HTML(;
mathengine=MathJax3(), prettyurls=get(ENV, "CI", nothing) == "true"
),
Expand Down Expand Up @@ -86,36 +135,10 @@ makedocs(
],
authors="Ronny Bergmann and contributors.",
sitename="Manopt.jl",
strict=[
:doctest,
:linkcheck,
:parse_error,
:example_block,
:autodocs_block,
:cross_references,
:docs_block,
:eval_block,
:example_block,
:footnote,
:meta_block,
:missing_docs,
:setup_block,
],
pages=[
"Home" => "index.md",
"About" => "about.md",
"How to..." => [
"Get started: Optimize!" => "tutorials/Optimize!.md",
"Speedup using Inplace computations" => "tutorials/InplaceGradient.md",
"Use Automatic Differentiation" => "tutorials/AutomaticDifferentiation.md",
"Define Objectives in the Embedding" => "tutorials/EmbeddingObjectives.md",
"Count and use a Cache" => "tutorials/CountAndCache.md",
"Print Debug Output" => "tutorials/HowToDebug.md",
"Record values" => "tutorials/HowToRecord.md",
"Implement a Solver" => "tutorials/ImplementASolver.md",
"Do Constrained Optimization" => "tutorials/ConstrainedOptimization.md",
"Do Geodesic Regression" => "tutorials/GeodesicRegression.md",
],
(tutorials_in_menu ? [tutorials_menu] : [])...,
"Solvers" => [
"Introduction" => "solvers/index.md",
"Adaptive Regularization with Cubics" => "solvers/adaptive-regularization-with-cubics.md",
Expand Down Expand Up @@ -168,8 +191,10 @@ makedocs(
"Contributing to Manopt.jl" => "contributing.md",
"Extensions" => "extensions.md",
"Notation" => "notation.md",
"Changelog" => "changelog.md",
"References" => "references.md",
],
plugins=[bib],
)
deploydocs(; repo="github.com/JuliaManifolds/Manopt.jl", push_preview=true)
#back to main env
Expand Down
4 changes: 1 addition & 3 deletions docs/src/notation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

In this package, we follow the notation introduced in [Manifolds.jl – Notation](https://juliamanifolds.github.io/Manifolds.jl/latest/misc/notation.html)

with the following additional or slightly changed notation
with the following additional notation

| Symbol | Description | Also used | Comment |
|:--:|:--------------- |:--:|:-- |
| ```` | The [Levi-Cevita connection](https://en.wikipedia.org/wiki/Levi-Civita_connection) | | |
| ``\operatorname{grad}f`` | The Riemannian gradient | ``∇f``| due to possible confusion with the connection, we try to avoid ``∇f`` |
| ``\operatorname{Hess}f``| The Riemannian Hessian | |
2 changes: 1 addition & 1 deletion docs/src/solvers/ChambollePock.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The Riemannian Chambolle–Pock is a generalization of the Chambolle–Pock algorithm [ChambollePock:2011](@citet*)
It is also known as primal-dual hybrid gradient (PDHG) or primal-dual proximal splitting (PDPS) algorithm.

In order to minimize over $p∈\mathcal M§ the cost function consisting of
In order to minimize over $p∈\mathcal M$ the cost function consisting of

```math
F(p) + G(Λ(p)),
Expand Down
46 changes: 0 additions & 46 deletions ext/ManoptManifoldsExt/ARC_CG.jl

This file was deleted.

1 change: 0 additions & 1 deletion ext/ManoptManifoldsExt/ManoptManifoldsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ include("nonmutating_manifolds_functions.jl")
include("artificialDataFunctionsManifolds.jl")
include("ChambollePockManifolds.jl")
include("alternating_gradient.jl")
include("ARC_CG.jl")
end
3 changes: 3 additions & 0 deletions src/Manopt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ using ManifoldsBase:
NestedPowerRepresentation,
ParallelTransport,
PowerManifold,
ProductManifold,
ProjectionTransport,
QRRetraction,
TangentSpace,
^,
_read,
_write,
Expand Down Expand Up @@ -123,6 +125,7 @@ using ManifoldsBase:
set_component!,
shortest_geodesic,
shortest_geodesic!,
submanifold_components,
vector_transport_to,
vector_transport_to!,
zero_vector,
Expand Down
Loading

2 comments on commit 7563b32

@kellertuer
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/94059

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.40 -m "<description of version>" 7563b32d8c44689a82d9b2ac38663859259c0de1
git push origin v0.4.40

Please sign in to comment.