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

Allow running just doctests #32376

Merged
merged 1 commit into from
Aug 1, 2019
Merged

Conversation

mortenpi
Copy link
Contributor

@mortenpi mortenpi commented Jun 20, 2019

Adds doctest=only option to docs/make.jl so that you could run only doctests. This could maybe then be run as part of the normal test suite.

All doctests are now being tested, even the ones that are not in the manual. This actually revealed a bunch of docstrings that are not in the manual (some probably should) which contain broken doctests (should be fixed anyhow). For the moment they are "disabled", to get the rest of the manual to pass.

On the other hand, the docstrings are no longer tied to a manual page for doctesting purposes. This means that the @meta blocks in the manual .md files no longer have an effect on the docstrings. So instead there is a gensymed variable in each module that can contain that metadata. Most of these at-meta blocks were just using STDLIB for the given standard library, so the DocTestSetups are now added automatically in the make.jl file.

Very WIP at the moment, I am curious to see what happens with this on CI. It passes locally. It depends on JuliaDocs/Documenter.jl#774.

  • Fix the doctests that are marked disabled-doctest, probably in a separate PR (Add a few methods to manual & fix doctests #32417)
  • Remove the at-meta blocks from the standard library index.md files.
  • Have the doctest = :only option in a Documenter release and update docs/ manifest.

* Bump Documenter to 0.23.1
* Documenter now requires docstring doctests to have their own metadata
  in the corresponding module. Remove all the now redundant at-meta
  blocks from the standard library .md files and add the necessary
  module-level metadata in make.jl
@mortenpi mortenpi changed the title WIP/RFC: Allow running just doctests Allow running just doctests Aug 1, 2019
@mortenpi mortenpi marked this pull request as ready for review August 1, 2019 02:49
@mortenpi
Copy link
Contributor Author

mortenpi commented Aug 1, 2019

This should be good to go -- the doctesting feature is in a Documenter release now and the unnecessary at-meta blocks are gone. So, locally you can now run make -C doc/ doctest=only and it will only do doctests.

@fredrikekre fredrikekre merged commit 4324531 into JuliaLang:master Aug 1, 2019
@mortenpi mortenpi deleted the mp/doctest branch August 2, 2019 23:25
Keno pushed a commit that referenced this pull request Jun 5, 2024
* Bump Documenter to 0.23.1
* Documenter now requires docstring doctests to have their own metadata
  in the corresponding module. Remove all the now redundant at-meta
  blocks from the standard library .md files and add the necessary
  module-level metadata in make.jl
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.

2 participants