Skip to content

Commit

Permalink
Upgrade Documenter, and add make target to fix doctests (#26515)
Browse files Browse the repository at this point in the history
* upgrade Documenter to v0.15.0

* add make target to fix all (outdated) doctests:

    make -C doc doctest-fix
  • Loading branch information
fredrikekre committed Mar 20, 2018
1 parent 71fba36 commit f0c09df
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
18 changes: 12 additions & 6 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ JULIAHOME := $(abspath $(SRCDIR)/..)
include $(JULIAHOME)/Make.inc
JULIA_EXECUTABLE := $(call spawn,$(build_bindir)/julia)

.PHONY: help clean cleanall html pdf linkcheck doctest check deps deploy
.PHONY: help clean cleanall html pdf linkcheck doctest doctest-fix check deps deploy

help:
@echo "Please use 'make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " pdf to make standalone PDF file"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation"
@echo " check to run linkcheck and doctests"
@echo " html to make standalone HTML files"
@echo " pdf to make standalone PDF file"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation"
@echo " doctest-fix to update all doctests embedded in the documentation"
@echo " check to run linkcheck and doctests"

UnicodeData.txt:
$(JLDOWNLOAD) http:https://www.unicode.org/Public/9.0.0/ucd/UnicodeData.txt
Expand Down Expand Up @@ -55,6 +56,11 @@ doctest: deps
$(JULIA_EXECUTABLE) --color=yes $(call cygpath_w,$(SRCDIR)/make.jl) -- doctest
@echo "Checks finished."

doctest-fix: deps
@echo "Updating all embedded 'doctests'."
$(JULIA_EXECUTABLE) --color=yes $(call cygpath_w,$(SRCDIR)/make.jl) -- doctest-fix
@echo "Update finished."

check: deps
@echo "Running all embedded 'doctests' and checking external links."
$(JULIA_EXECUTABLE) --color=yes $(call cygpath_w,$(SRCDIR)/make.jl) -- doctest linkcheck
Expand Down
4 changes: 2 additions & 2 deletions doc/REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Compat 0.56.0 0.56.0+
Compat 0.58.0 0.58.0+
DocStringExtensions 0.4.3 0.4.3+
Documenter 0.14.0 0.14.0+
Documenter 0.15.0 0.15.0+
2 changes: 1 addition & 1 deletion doc/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ makedocs(
build = joinpath(@__DIR__, "_build/html/en"),
modules = [Base, Core, BuildSysImg, [Base.root_module(Base, stdlib.stdlib) for stdlib in STDLIB_DOCS]...],
clean = true,
doctest = "doctest" in ARGS,
doctest = ("doctest-fix" in ARGS) ? (:fix) : ("doctest" in ARGS),
linkcheck = "linkcheck" in ARGS,
linkcheck_ignore = ["https://bugs.kde.org/show_bug.cgi?id=136779"], # fails to load from nanosoldier?
strict = false,
Expand Down

0 comments on commit f0c09df

Please sign in to comment.