Skip to content
Snippets Groups Projects
Commit fa65b064 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

check for graphviz installation in noxfile

parent c48437a1
No related branches found
No related tags found
1 merge request!436Introduce Nox for Local and CI Test Automation. Start Writing a Contributors Guide.
Pipeline #71915 canceled
......@@ -25,7 +25,7 @@ def get_cuda_version(session: nox.Session) -> None | tuple[int, ...]:
return tuple(int(v) for v in version_string.split("."))
except ValueError:
pass
session.warn("nvcc was found, but I am unable to determine the CUDA version.")
return None
......@@ -51,6 +51,17 @@ def install_cupy(
session.install(cupy_package)
def check_external_doc_dependencies(session: nox.Session):
dot_args = ["dot", "--version"]
try:
_ = subprocess.run(dot_args)
except FileNotFoundError:
session.error(
"Unable to build documentation: "
"command `dot` from the `graphviz` package (https://www.graphviz.org/) could not be found."
)
def editable_install(session: nox.Session, opts: Sequence[str] = ()):
if opts:
opts_str = "[" + ",".join(opts) + "]"
......@@ -105,6 +116,7 @@ def testsuite(session: nox.Session, cupy_version: str | None):
@nox.session(python=["3.10"], tags=["docs"])
def docs(session: nox.Session):
"""Build the documentation pages"""
check_external_doc_dependencies(session)
install_cupy(session, "12.3")
editable_install(session, ["doc"])
session.chdir("docs")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment