docs: rework docs-project, allow doctest option #606
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To make the
build_doc()
process a little more robust I have removed everything except forDocumenter*
fromdocs/Project.toml
. (Also Kroki, i.e. this obsoletes #603)These entries caused various issues because without a corresponding Manifest.toml telling julia to use the Oscar-dev-dir the Pkg resolver failed in some cases. But keeping a manifest in that place can cause other issues, because people tend to forget to explicitly update that project.
The docs building process works like this in the background:
build_doc
is called a new environment with a copy of thisdocs/Project.toml
is created in/tmp/jl_something
Pkg.develop
with the currently active path indoc_init
(called automatically frombuild_doc
)This also makes sure that the doctests and the docbuild are run with the correct versions of Oscar, Hecke, Nemo, AbstractAlgebra (e.g. if one uses a dev'd version of one of these).
All the resulting docs and temporary files are still in the
docs
subdirectory. (Only Project.toml and Manifest.toml are in that temporary directory)I have also added
doctest
andstrict
flags tobuild_doc()
which default tofalse
. (fixes #604)Except for these flags there are no user-facing changes here.
For the CI I have added a keyword argument to
doc_init
to use a custom path for the docs-project now used in.github/workflows/Docu.yml
to make sure that directory is still alive for the next github actions steps.