-
Notifications
You must be signed in to change notification settings - Fork 482
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
Break out doctesting / refactor #774
Conversation
bec7ca3
to
16ee87b
Compare
So.. this should work now.. theoretically. One hurdle I came across as I was trying to test it with the Julia manual, is that it actually breaks nearly all the doctests in docstrings. This is because they usually rely on Now, this is not necessarily a bad thing. The whole idea of this is to be able to run doctest without having to go through all the hoops of figuring out which docstring ends where etc. It is also weird that the validity of a doctest depends on some metadata far away in a manual So I've prototyped a way to add doctest metadata to modules instead. Essentially, every module gets a special The question is: when should you actually add the metadata? Ideally, it would be close to the docstrings.
|
binding.mod != docstring module
Ok, this is close to being finished now I think. I've updated the OP with a summary of what this adds and changes (Documenter will also export a Bikeshedding invitation: I can't decide if it should be |
DocMeta tests use isnothing.
This commits empty dev/ docs to gh-pages, introduced in #774.
This refactors a few parts of the build pipeline to make it possible to run doctests without having to compile the whole document (close #198, close #535, close #756).
doctest = :only
tomakedocs
, which only runs doctests and skips the later build steps.doctest = :fix
also skips compilation and rendering of the docs now.DocMeta
module (e.g.DocMeta.setdocmeta!(module, :DocTestSetup, :(using Foo)
). Only supports:DocTestSetup
at the moment.doctest(::Vector{Module})
function to easily run doctests in a module.The changes are a bit more extensive than they necessarily should be, but I am also trying to clean up and refactor the internals in the process. There is a bit more info about where I want to go with these changes in the wiki.
This is still very much a WIP and I think I might have to rethink some decisions here. Also needs testing, tests etc. Any drive-by comments will be much appreciated though.This is now ready for review.