You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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*."""importsubprocessfrompathlibimportPathimportpytaskfromsrc.configimportBLDfromsrc.configimportSRC@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("*.*")), ],)deftask_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-nautosrc/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
The text was updated successfully, but these errors were encountered:
Great, that works! Thanks a lot. However, even better is BLD / "00_documentation" / "html" / "00_index.html" as it fixes the issue of running in parallel as well as the issue of pytask not recognising whether the html output was created at all. This will be fixed in future version of the templates of HMG.
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 foldersrc/00_documentation
. The task in that folder is the following:Now, I am running:
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
The text was updated successfully, but these errors were encountered: