Closed
Description
Good morning Tobi,
I thought about using pytask-parallel for a project where I also use sphinx to compile a documentation of my code. There seems to be an issue with that, however. Say, I have the .rst
documentation files in the folder src/00_documentation
. The task in that folder is the following:
"""
Build the pdf and html documentation using Sphinx.
`task_build_documentation` executes Sphinx via pytask-latex and stores the output in
*bld/00_documentation*.
"""
import subprocess
from pathlib import Path
import pytask
from src.config import BLD
from src.config import SRC
@pytask.mark.depends_on(
list(Path(__file__).resolve().parent.glob("*.rst"))
+ [SRC / "00_documentation" / "conf.py"]
)
@pytask.mark.parametrize(
"builder, produces",
[
("latexpdf", BLD / "00_documentation" / "latex" / "project_documentation.pdf"),
("html", (BLD / "00_documentation" / "html").rglob("*.*")),
],
)
def task_build_documentation(builder, produces):
subprocess.run(
[
"sphinx-build",
"-M",
builder,
SRC.joinpath("00_documentation").as_posix(),
BLD.joinpath("00_documentation").as_posix(),
]
)
Now, I am running:
pytask -n auto src/00_documentation/
I get the following error:
If you need further details for reproducing the error, I can share an example project with you! I hope this helps to improve the tool even further.
Best,
Sebastian