From 81ee4a5188fbbe0f6d8bdd9830520f445c9b0cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 16 Feb 2024 18:37:01 +0100 Subject: [PATCH 1/4] Typos --- docs/make_work.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/make_work.jl b/docs/make_work.jl index 8a5ee65d35f4..764a5335d6c9 100644 --- a/docs/make_work.jl +++ b/docs/make_work.jl @@ -1,6 +1,6 @@ # # This file is included by docs/make.jl and by a helper function -# in src/Oscar.jl +# in src/utils/docs.jl # module BuildDoc @@ -139,7 +139,7 @@ function doit( joinpath(Oscar.oscardir, "docs", "oscar_references.bib"); style=oscar_style ) - # Copy documentation from Hecke, Nemo, AnstratAlgebra + # Copy documentation from Hecke, Nemo, AbstractAlgebra other_packages = [ (Oscar.Hecke, Oscar.heckedir), (Oscar.Nemo, Oscar.nemodir), From 5d609181cb6e4c4567299f6ee4130c3062d6523c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 16 Feb 2024 18:58:22 +0100 Subject: [PATCH 2/4] Make the "show source" buttons in the docs work again --- docs/make_work.jl | 22 +++++++++++++++++++++- src/utils/utils.jl | 1 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/make_work.jl b/docs/make_work.jl index 764a5335d6c9..52a9d6205827 100644 --- a/docs/make_work.jl +++ b/docs/make_work.jl @@ -172,6 +172,20 @@ function doit( end end + function get_rev(uuid::Base.UUID) + deps = Documenter.Pkg.dependencies() + @assert haskey(deps, uuid) + if !isnothing(deps[uuid].git_revision) + return deps[uuid].git_revision + else + return "v$(deps[uuid].version)" + end + end + aarev = get_rev(Base.UUID("c3fe647b-3220-5bb0-a1ea-a7954cac585d")) + nemorev = get_rev(Base.UUID("2edaba10-b0f1-5616-af89-8c11ac63239a")) + heckerev = get_rev(Base.UUID("3e1990a7-5d81-5526-99ce-9ba3ff248f21")) + singularrev = get_rev(Base.UUID("bcd08a7b-43d2-5ff7-b6d4-c458787f915c")) + cd(joinpath(Oscar.oscardir, "docs")) do DocMeta.setdocmeta!(Oscar, :DocTestSetup, Oscar.doctestsetup(); recursive=true) DocMeta.setdocmeta!(Oscar.Hecke, :DocTestSetup, :(using Hecke); recursive=true) @@ -184,6 +198,7 @@ function doit( makedocs(; format=Documenter.HTML(; + edit_link=nothing, # TODO: make work for imported pages prettyurls=!local_build, collapselevel=1, size_threshold=409600, @@ -197,7 +212,12 @@ function doit( warnonly=warnonly, checkdocs=:none, pages=doc, - remotes=nothing, # TODO: make work with Hecke, Nemo, AbstractAlgebra, see https://github.com/oscar-system/Oscar.jl/issues/588 + remotes=Dict( + Oscar.aadir => (Remotes.GitHub("Nemocas", "AbstractAlgebra.jl"), aarev), + Oscar.nemodir => (Remotes.GitHub("Nemocas", "Nemo.jl"), nemorev), + Oscar.heckedir => (Remotes.GitHub("thofma", "Hecke.jl"), heckerev), + Oscar.singulardir => (Remotes.GitHub("oscar-system", "Singular.jl"), singularrev), + ), plugins=[bib], ) end diff --git a/src/utils/utils.jl b/src/utils/utils.jl index 1d3d07cd7241..942aa935bb9c 100644 --- a/src/utils/utils.jl +++ b/src/utils/utils.jl @@ -5,6 +5,7 @@ const jll_deps = String["Antic_jll", "Arb_jll", "Calcium_jll", "FLINT_jll", "GAP const aadir = Base.pkgdir(AbstractAlgebra) const nemodir = Base.pkgdir(Nemo) const heckedir = Base.pkgdir(Hecke) +const singulardir = Base.pkgdir(Singular) include("versioninfo.jl") include("docs.jl") From 32e993bacfa7a67fd9fc0baa0bc43120fea8cc09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 16 Feb 2024 19:09:54 +0100 Subject: [PATCH 3/4] Enable the "Edit page on GitHub" buttons --- docs/make_work.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/make_work.jl b/docs/make_work.jl index 52a9d6205827..86b43c8d3c4a 100644 --- a/docs/make_work.jl +++ b/docs/make_work.jl @@ -166,7 +166,11 @@ function doit( end src = normpath(root, file) dst = normpath(dstbase, relpath(root, srcbase), file) - cp(src, dst; force=true) + if endswith(file, ".md") + symlink(src, dst) + else + cp(src, dst; force=true) + end chmod(dst, 0o644) end end @@ -198,7 +202,6 @@ function doit( makedocs(; format=Documenter.HTML(; - edit_link=nothing, # TODO: make work for imported pages prettyurls=!local_build, collapselevel=1, size_threshold=409600, From 8911097502c195a4ecd98c95822fb545be3772f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Mon, 19 Feb 2024 11:53:54 +0100 Subject: [PATCH 4/4] Address comment --- docs/make_work.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/make_work.jl b/docs/make_work.jl index 86b43c8d3c4a..ac86a8cd5a89 100644 --- a/docs/make_work.jl +++ b/docs/make_work.jl @@ -185,10 +185,10 @@ function doit( return "v$(deps[uuid].version)" end end - aarev = get_rev(Base.UUID("c3fe647b-3220-5bb0-a1ea-a7954cac585d")) - nemorev = get_rev(Base.UUID("2edaba10-b0f1-5616-af89-8c11ac63239a")) - heckerev = get_rev(Base.UUID("3e1990a7-5d81-5526-99ce-9ba3ff248f21")) - singularrev = get_rev(Base.UUID("bcd08a7b-43d2-5ff7-b6d4-c458787f915c")) + aarev = get_rev(Base.PkgId(Oscar.AbstractAlgebra).uuid) + nemorev = get_rev(Base.PkgId(Oscar.Nemo).uuid) + heckerev = get_rev(Base.PkgId(Oscar.Hecke).uuid) + singularrev = get_rev(Base.PkgId(Oscar.Singular).uuid) cd(joinpath(Oscar.oscardir, "docs")) do DocMeta.setdocmeta!(Oscar, :DocTestSetup, Oscar.doctestsetup(); recursive=true)