Skip to content

Commit 679742a

Browse files
authored
Switch Quarto rendering in the docs to JuliaNotebookRunner (#36)
* Switch Quarto rendering to a pure Julia solution. * runs formatter. * Add changelog entry
1 parent 56650ad commit 679742a

File tree

9 files changed

+25
-43
lines changed

9 files changed

+25
-43
lines changed

.github/workflows/documenter.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: quarto-dev/quarto-actions/setup@v2
1616
with:
17-
version: "1.4.551"
17+
version: "1.7.29"
1818
- uses: julia-actions/setup-julia@latest
1919
with:
2020
version: "1.11"
@@ -40,16 +40,6 @@ jobs:
4040
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('tutorials/*.qmd') }}
4141
restore-keys: |
4242
${{ runner.os }}-${{ env.cache-name }}-
43-
- name: Cache CondaPkg
44-
id: cache-condaPkg
45-
uses: actions/cache@v4
46-
env:
47-
cache-name: cache-condapkg
48-
with:
49-
path: docs/.CondaPkg
50-
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('docs/CondaPkg.toml') }}
51-
restore-keys: |
52-
${{ runner.os }}-${{ env.cache-name }}-
5343
- name: "Documenter rendering (including Quarto)"
5444
run: "docs/make.jl --quarto"
5545
env:

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable Changes to the Julia package `LieGroups.jl` will be documented in th
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.1] unreleased
9+
10+
### Changed
11+
12+
* the tutorials are now rendered with `quarto` using the [`QuartoNotebookRunner.jl`](https://github.com/PumasAI/QuartoNotebookRunner.jl) and are hence purely julia based.
13+
814
## [0.1.0] 2025-04-22
915

1016
Everything denoted by “formerly” refers to the previous name in [`Manifolds.jl`](https://juliamanifolds.github.io/Manifolds.jl/stable/).

docs/CondaPkg.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/Project.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
[deps]
2-
CondaPkg = "992eb4ea-22a4-4c89-a5bb-47a3300528ab"
32
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
43
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
54
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
65
LieGroups = "6774de46-80ba-43f8-ba42-e41071ccfc5f"
76
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
87

98
[compat]
10-
CondaPkg = "0.2"
119
Documenter = "1"
1210
DocumenterCitations = "1.3"
1311
DocumenterInterLinks = "1"
14-
LinearAlgebra = "1.11"
12+
LinearAlgebra = "1.11"

docs/make.jl

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -67,32 +67,27 @@ end
6767
#
6868
# (b) if docs is not the current active environment, switch to it
6969
# (from https://github.com/JuliaIO/HDF5.jl/pull/1020/) 
70+
using Pkg
7071
if Base.active_project() != joinpath(@__DIR__, "Project.toml")
71-
using Pkg
7272
Pkg.activate(@__DIR__)
73-
# local temp hack - load ManifoldsBase and Manifold in dev as well
74-
Pkg.develop(PackageSpec(; path=(@__DIR__) * "/../"))
75-
Pkg.resolve()
76-
Pkg.instantiate()
7773
end
74+
# load LieGroups in dev mode
75+
Pkg.develop(PackageSpec(; path=(@__DIR__) * "/../"))
76+
Pkg.resolve()
77+
Pkg.instantiate()
7878

7979
# (c) If quarto is set, or we are on CI, run quarto
8080
if run_quarto || run_on_CI
81-
using CondaPkg
82-
CondaPkg.withenv() do
83-
@info "Rendering Quarto"
84-
tutorials_folder = (@__DIR__) * "/../tutorials"
85-
# instantiate the tutorials environment if necessary
86-
Pkg.activate(tutorials_folder)
87-
# For a breaking release -> also set the tutorials folder to the most recent version
88-
Pkg.develop(PackageSpec(; path=(@__DIR__) * "/../"))
89-
Pkg.resolve()
90-
Pkg.instantiate()
91-
Pkg.build("IJulia") # build `IJulia` to the right version.
92-
Pkg.activate(@__DIR__) # but return to the docs one before
93-
run(`quarto render $(tutorials_folder)`)
94-
return nothing
95-
end
81+
@info "Rendering Quarto"
82+
tutorials_folder = (@__DIR__) * "/../tutorials"
83+
# instantiate the tutorials environment if necessary
84+
Pkg.activate(tutorials_folder)
85+
# For a breaking release -> also set the tutorials folder to the most recent version
86+
Pkg.develop(PackageSpec(; path=(@__DIR__) * "/../"))
87+
Pkg.resolve()
88+
Pkg.instantiate()
89+
Pkg.activate(@__DIR__) # but return to the docs one before
90+
run(`quarto render $(tutorials_folder)`)
9691
else
9792
# fallback to at least create empty files for tutorials that are directly linked from the docs
9893
touch(joinpath(@__DIR__, "src/tutorials/getstarted.md"))

src/group_operations/multiplication_operation_abelian.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ function lie_bracket!(
344344
return fill!(Z, 0)
345345
end
346346

347-
348347
_doc_log_abelmult = """
349348
log(G::LieGroup{𝔽,<:AbelianMultiplicationGroupOperation}, h)
350349
log(G::LieGroup{𝔽,<:AbelianMultiplicationGroupOperation}, g, h)

src/groups/circle_group.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ CircleGroup(::Union{ManifoldsBase.AbstractNumbers,Circle,Euclidean,Sphere})
8787

8888
#
8989
#
90-
# Common definitions
90+
# Common definitions

src/groups/circle_group_real.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ function get_vector_lie!(
178178
return get_vector!(M, X, identity_element(G, T), c, DefaultOrthonormalBasis(ℝ))
179179
end
180180

181-
182181
identity_element(::_RealCircleGroup) = 0.0
183182

184183
Base.inv(::_RealCircleGroup, p::Number) = sym_rem(-p)
@@ -201,7 +200,6 @@ function lie_bracket(
201200
return zero(X)
202201
end
203202

204-
205203
_doc_log_real_circ = """
206204
log(::LieGroup{ℝ, AdditionGroupOperation, Circle{ℝ}}, g)
207205
log!(::LieGroup{ℝ, AdditionGroupOperation, Circle{ℝ}}, X, g)
@@ -246,7 +244,6 @@ function ManifoldsBase.log!(G::_RealCircleGroup, X, ::Identity{AdditionGroupOper
246244
return zero_vector!(LieAlgebra(G), X)
247245
end
248246

249-
250247
function Base.show(io::IO, ::_RealCircleGroup)
251248
return print(io, "CircleGroup(ℝ)")
252249
end

tutorials/_quarto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ format:
2020
variant: -raw_html+tex_math_dollars
2121
wrap: preserve
2222

23-
jupyter: julia-1.11
23+
engines: ['julia']

0 commit comments

Comments
 (0)