Skip to content

Commit 750916e

Browse files
kellertuerlkdvos
andauthored
Work on Code coverage and Metadata (#15)
@lkdvos is the author entry for you correct? Besides that this PR does * a badge for Aqua * a Changelog * a small CI so we remember to always update the changelog. * work on the remaining code coverage I would also prefer to squash-merge PRs, is that ok? --------- Co-authored-by: Lukas Devos <ldevos98@gmail.com>
1 parent 2935954 commit 750916e

20 files changed

Lines changed: 303 additions & 156 deletions

.github/workflows/changelog.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Check Changelog
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
Check-Changelog:
7+
name: Check Changelog Action
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: tarides/changelog-check-action@v3
11+
with:
12+
changelog: Changelog.md

.github/workflows/spell_check.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Spell Check
2+
3+
on: [pull_request, workflow_dispatch]
4+
5+
jobs:
6+
typos-check:
7+
name: Spell Check with Typos
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Actions Repository
11+
uses: actions/checkout@v6
12+
- name: Check spelling
13+
uses: crate-ci/typos@v1.45.0

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
docs/build
22
docs/Manifest.toml
33
Manifest.toml
4+
docs/src/changelog.md

Changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
All notable Changes to the Julia package `AlgorithmsInterface.jl` are documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0] 2026/05/01
9+
10+
Initial release.

Project.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "AlgorithmsInterface"
22
uuid = "d1e3940c-cd12-4505-8585-b0a4b322527d"
3-
authors = ["Ronny Bergmann <git@ronnybergmann.net>"]
3+
authors = ["Ronny Bergmann <git@ronnybergmann.net>", "Lukas Devos <ldevos98@gmail.com>"]
44
version = "0.1.0"
55

66
[deps]
@@ -16,4 +16,3 @@ julia = "1.10"
1616

1717
[workspace]
1818
projects = ["test", "docs"]
19-

Readme.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
`AlgorithmsInterface.jl` is a Julia package to provide a common interface to run iterative tasks.
44
**Algorithm** here refers to an iterative sequence of commands, that are run until a certain stopping criterion is met.
55

6-
[![docs][docs-dev-img]][docs-dev-url] [![CI][ci-img]][ci-url] [![runic][runic-img]][runic-url] [![codecov][codecov-img]][codecov-url]
6+
[![docs][docs-dev-img]][docs-dev-url] [![CI][ci-img]][ci-url] [![runic][runic-img]][runic-url] [![codecov][codecov-img]][codecov-url] [![aqua][aqua-img]][aqua-url]
77

88
[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg
99
[docs-dev-url]: https://JuliaManifolds.github.io/AlgorithmsInterface.jl/dev/
@@ -17,6 +17,9 @@
1717
[runic-img]: https://img.shields.io/badge/code_style-%E1%9A%B1%E1%9A%A2%E1%9A%BE%E1%9B%81%E1%9A%B2-black
1818
[runic-url]: https://github.com/fredrikekre/Runic.jl
1919

20+
[aqua-img]: https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg
21+
[aqua-url]: https://github.com/JuliaTesting/Aqua.jl
22+
2023
# Statement of need
2124

2225
A first approach to algorithms is a simple for-loop for a maximum number of iterations.
@@ -28,7 +31,7 @@ Finally, a common interface also allows to easily combine existing algorithms, h
2831

2932
# Main features
3033

31-
See the [intial discussion](https://github.com/JuliaManifolds/AlgorithmsInterface.jl/discussions/1)
34+
See the [initial discussion](https://github.com/JuliaManifolds/AlgorithmsInterface.jl/discussions/1)
3235
as well as the [overview on existing things](https://github.com/JuliaManifolds/AlgorithmsInterface.jl/discussions/2)
3336

3437
## Further ideas

docs/make.jl

Lines changed: 56 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,62 @@ if "--help" ∈ ARGS
1717
exit(0)
1818
end
1919

20-
using Pkg
21-
Pkg.activate(@__DIR__)
22-
Pkg.develop(PackageSpec(; path = (@__DIR__) * "/../"))
23-
Pkg.resolve()
24-
Pkg.instantiate()
20+
# if docs is not the current active environment, switch to it
21+
# (from https://github.com/JuliaIO/HDF5.jl/pull/1020/) 
22+
if Base.active_project() != joinpath(@__DIR__, "Project.toml")
23+
using Pkg
24+
Pkg.activate(@__DIR__)
25+
Pkg.instantiate()
26+
end
2527

28+
#
29+
# Load packages
2630
using Documenter, DocumenterCitations, DocumenterInterLinks
2731
using AlgorithmsInterface
2832

2933
run_on_CI = (get(ENV, "CI", nothing) == "true")
3034

35+
#
36+
# Copy and reformat changelog
37+
38+
# (d) add contributing.md and changelog.md to the docs – and link to releases and issues
39+
40+
function add_links(line::String, url::String = "https://github.com/JuliaManifolds/Manopt.jl")
41+
# replace issues (#XXXX) -> ([#XXXX](url/issue/XXXX))
42+
while (m = match(r"\(\#([0-9]+)\)", line)) !== nothing
43+
id = m.captures[1]
44+
line = replace(line, m.match => "([#$id]($url/issues/$id))")
45+
end
46+
# replace ## [X.Y.Z] -> with a link to the release [X.Y.Z](url/releases/tag/vX.Y.Z)
47+
while (m = match(r"\#\# \[([0-9]+.[0-9]+.[0-9]+)\] (.*)", line)) !== nothing
48+
tag = m.captures[1]
49+
date = m.captures[2]
50+
line = replace(line, m.match => "## [$tag]($url/releases/tag/v$tag) ($date)")
51+
end
52+
return line
53+
end
54+
55+
generated_path = joinpath(@__DIR__, "src")
56+
base_url = "https://github.com/JuliaManifolds/Manopt.jl/blob/master/"
57+
isdir(generated_path) || mkdir(generated_path)
58+
for (md_file, doc_file) in [("Changelog.md", "changelog.md")]
59+
open(joinpath(generated_path, doc_file), "w") do io
60+
# Point to source license file
61+
println(
62+
io,
63+
"""
64+
```@meta
65+
EditURL = "$(base_url)$(md_file)"
66+
```
67+
""",
68+
)
69+
# Write the contents out below the meta block
70+
for line in eachline(joinpath(dirname(@__DIR__), md_file))
71+
println(io, add_links(line))
72+
end
73+
end
74+
end
75+
3176
bib = CitationBibliography(joinpath(@__DIR__, "src", "references.bib"); style = :alpha)
3277
links = InterLinks()
3378
makedocs(;
@@ -47,8 +92,12 @@ makedocs(;
4792
"Interface" => "interface.md",
4893
"Stopping criteria" => "stopping_criterion.md",
4994
"Logging" => "logging.md",
50-
"Notation" => "notation.md",
51-
"References" => "references.md",
95+
"Miscellanea" => [
96+
"Internals" => "internals.md",
97+
"Notation" => "notation.md",
98+
"Changelog" => "changelog.md",
99+
"References" => "references.md",
100+
],
52101
],
53102
expandfirst = ["interface.md", "stopping_criterion.md"],
54103
plugins = [bib, links],

docs/src/assets/logo-text-dark.png

-116 KB
Binary file not shown.
-57.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)