Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: rework docs-project, allow doctest option #606

Merged
merged 6 commits into from
Aug 9, 2021

Conversation

benlorenz
Copy link
Member

@benlorenz benlorenz commented Aug 9, 2021

To make the build_doc() process a little more robust I have removed everything except for Documenter* from docs/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:

  • When build_doc is called a new environment with a copy of this docs/Project.toml is created in /tmp/jl_something
  • All packages required for the doctests are added via Pkg.develop with the currently active path in doc_init (called automatically from build_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).
  • this temporary project is then instantiated and used for running the build+test

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 and strict flags to build_doc() which default to false. (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.

after #550 the docs project should not need the Oscar packages anymore
copy existing Project and develop all required packages in Oscar.doc_init
to make sure everything is loaded from the same paths as in the currently
loaded Oscar packages.
also avoids some resolve-issues and issues arising from outdated manifest files in docs/

There is also a flag to specify a custom directory for the docs-project which is used by the CI, but will modify the docs/Project.toml file.
Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine for me on two machines. Thanks!

@fingolfin fingolfin merged commit f355297 into master Aug 9, 2021
@fingolfin fingolfin deleted the bl/cleanup_docs_toml branch August 9, 2021 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: disable doctests by default, allow enabling
2 participants