Skip to content

[MADE SAME CHANGES AS CORRESPONDING COMMIT!] Automatic PR for 80a75610-0589-4285-85cd-9cedf86e7d52 #106

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

Open
wants to merge 1 commit into
base: 80a75610-0589-4285-85cd-9cedf86e7d52-base
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ def _sphinx_build(self, kind: str):

Parameters
----------
kind : {'html', 'latex'}
kind : {'html', 'latex', 'linkcheck'}

Examples
--------
>>> DocBuilder(num_jobs=4)._sphinx_build('html')
"""
if kind not in ("html", "latex"):
raise ValueError(f"kind must be html or latex, not {kind}")
if kind not in ("html", "latex", "linkcheck"):
raise ValueError(f"kind must be html, latex or linkcheck, not {kind}")

cmd = ["sphinx-build", "-b", kind]
if self.num_jobs:
Expand Down Expand Up @@ -268,6 +268,12 @@ def latex_forced(self):
"""
return self.latex(force=True)

def linkcheck(self):
"""
Check the links in the documentation for validity.
"""
return self._sphinx_build("linkcheck")

@staticmethod
def clean():
"""
Expand Down Expand Up @@ -373,4 +379,4 @@ def main():


if __name__ == "__main__":
sys.exit(main())
sys.exit(main())