Skip to content

Commit 68a96f5

Browse files
authored
Release v0.1.0 (#18)
Final small fixes (was missing a license, I just picked MIT since we are both using that everywhere, no strong opinions though)
1 parent 4a7498a commit 68a96f5

7 files changed

Lines changed: 43 additions & 19 deletions

File tree

.github/workflows/format.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Runic formatting
22
on:
33
push:
44
branches:
5-
- 'master'
5+
- 'main'
66
- 'release-'
77
tags:
88
- '*'
@@ -13,10 +13,6 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v6
16-
# - uses: julia-actions/setup-julia@v2
17-
# with:
18-
# version: '1'
19-
# - uses: julia-actions/cache@v2
2016
- uses: fredrikekre/runic-action@v1
2117
with:
2218
version: '1'

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
docs/build
2-
docs/Manifest.toml
3-
Manifest.toml
42
docs/src/changelog.md
3+
*Manifest.toml
4+
5+
LocalPreferences.toml
6+
JuliaLocalPreferences.toml

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Ronny Bergmann, Lukas Devos
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

docs/make.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ run_on_CI = (get(ENV, "CI", nothing) == "true")
3636
# Copy and reformat changelog
3737

3838
# (d) add contributing.md and changelog.md to the docs – and link to releases and issues
39+
const base_repository = "github.com/JuliaManifolds/AlgorithmsInterface.jl"
3940

40-
function add_links(line::String, url::String = "https://github.com/JuliaManifolds/Manopt.jl")
41+
function add_links(line::String, url::String = "https://$base_repository")
4142
# replace issues (#XXXX) -> ([#XXXX](url/issue/XXXX))
4243
while (m = match(r"\(\#([0-9]+)\)", line)) !== nothing
4344
id = m.captures[1]
@@ -53,7 +54,7 @@ function add_links(line::String, url::String = "https://github.com/JuliaManifold
5354
end
5455

5556
generated_path = joinpath(@__DIR__, "src")
56-
base_url = "https://github.com/JuliaManifolds/Manopt.jl/blob/master/"
57+
base_url = "https://$base_repository/blob/main/"
5758
isdir(generated_path) || mkdir(generated_path)
5859
for (md_file, doc_file) in [("Changelog.md", "changelog.md")]
5960
open(joinpath(generated_path, doc_file), "w") do io
@@ -102,6 +103,6 @@ makedocs(;
102103
expandfirst = ["interface.md", "stopping_criterion.md"],
103104
plugins = [bib, links],
104105
)
105-
deploydocs(; repo = "github.com/JuliaManifolds/AlgorithmsInterface.jl", push_preview = true)
106+
deploydocs(; repo = base_repository, push_preview = true)
106107
#back to main env
107108
Pkg.activate()

src/stopping_criterion.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ when _all_ of them indicate to stop.
140140
141141
# Constructor
142142
143-
StopWhenAll(c::NTuple{N, StoppingCriterion} where {N})
143+
StopWhenAll(c::AbstractVector{<:StoppingCriterion})
144144
StopWhenAll(c::StoppingCriterion...)
145145
"""
146146
struct StopWhenAll{TCriteria <: Tuple} <: StoppingCriterion
147147
criteria::TCriteria
148+
StopWhenAll(c::StoppingCriterion...) = new{typeof(c)}(c)
148149
end
149-
StopWhenAll(c::AbstractVector{<:StoppingCriterion}) = StopWhenAll(Tuple(c))
150-
StopWhenAll(c...) = StopWhenAll(c)
150+
StopWhenAll(c::AbstractVector{<:StoppingCriterion}) = StopWhenAll(c...)
151151
function indicates_convergence(stop_when_all::StopWhenAll)
152152
return any(indicates_convergence, stop_when_all.criteria)
153153
end

src/test_suite.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ using ..AlgorithmsInterface
1010
struct DummyAlgorithm{S <: AlgorithmsInterface.StoppingCriterion} <: AlgorithmsInterface.Algorithm
1111
stopping_criterion::S
1212
end
13+
1314
struct DummyProblem <: AlgorithmsInterface.Problem end
14-
mutable struct DummyState{S <: AlgorithmsInterface.StoppingCriterionState} <: AlgorithmsInterface.State
15+
16+
mutable struct DummyState{V, S <: AlgorithmsInterface.StoppingCriterionState} <: AlgorithmsInterface.State
17+
iterate::V
1518
stopping_criterion_state::S
1619
iteration::Int
1720
end
21+
1822
end

test/stopping_criterion.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ problem = AIT.DummyProblem()
1313
algorithm = AIT.DummyAlgorithm(s1)
1414
s1_state = initialize_state(problem, algorithm, s1)
1515
@test !indicates_convergence(s1, s1_state)
16-
state_finished = AIT.DummyState(s1_state, 2)
17-
alg_state = AIT.DummyState(s1_state, 1)
16+
state_finished = AIT.DummyState(nothing, s1_state, 2)
17+
alg_state = AIT.DummyState(nothing, s1_state, 1)
1818
@test is_finished(problem, algorithm, state_finished)
1919
@test !is_finished(problem, algorithm, alg_state)
2020
# Fake a stop:
@@ -31,7 +31,7 @@ end
3131

3232
algorithm = AIT.DummyAlgorithm(s1)
3333
s1_state = initialize_state(problem, algorithm, s1)
34-
alg_state = AIT.DummyState(s1_state, 0)
34+
alg_state = AIT.DummyState(nothing, s1_state, 0)
3535
# Iteration 0: Start timer
3636
@test !is_finished!(problem, algorithm, alg_state)
3737
@test !is_finished(problem, algorithm, alg_state)
@@ -63,7 +63,7 @@ end
6363
@test contains(s1_str, "Overall: not reached")
6464

6565
@test isnothing(AlgorithmsInterface.get_reason(s1, s1_state))
66-
alg_state = AIT.DummyState(s1_state, 1)
66+
alg_state = AIT.DummyState(nothing, s1_state, 1)
6767
@test !is_finished(problem, algorithm, alg_state)
6868
# Fake start timer
6969
s1_state.criteria_states[2].start = Nanosecond(time_ns())
@@ -109,7 +109,7 @@ end
109109
@test contains(s1_str, "Overall: not reached")
110110

111111
@test isnothing(AlgorithmsInterface.get_reason(s1, s1_state))
112-
alg_state = AIT.DummyState(s1_state, 1)
112+
alg_state = AIT.DummyState(nothing, s1_state, 1)
113113
@test !is_finished!(problem, algorithm, alg_state)
114114
@test !is_finished(problem, algorithm, alg_state)
115115
s1_state.criteria_states[2].time = Second(2)

0 commit comments

Comments
 (0)