Skip to content

Commit d026e80

Browse files
esantorellafacebook-github-bot
authored andcommitted
More informative error when someone adds a module without updating the corresponding rst file (meta-pytorch#1653)
Summary: Pull Request resolved: meta-pytorch#1653 A couple OSS users who have managed to get every other check passing have run into this error, and it isn't clear how to fix it without reading the source code. Example: https://github.com/pytorch/botorch/actions/runs/4084789012/jobs/7041911357 Reviewed By: Balandat Differential Revision: D43001050 fbshipit-source-id: d211c58fea5c987f947e23716e538cddce022340
1 parent 7e1350b commit d026e80

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/validate_sphinx.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ def validate_complete_sphinx(path_to_botorch: str) -> None:
6969
# Verify that all top-level modules have a corresponding rst
7070
missing_rsts = modules.difference(rsts)
7171
if not len(missing_rsts) == 0:
72-
raise RuntimeError(f"Not all modules have corresponding rst: {missing_rsts}")
72+
raise RuntimeError(
73+
f"""Not all modules have corresponding rst:
74+
{missing_rsts}
75+
Please add them to the appropriate rst file in {SPHINX_RST_PATH}.
76+
"""
77+
)
7378

7479
# Track all modules that are not in docs (so can print all)
7580
modules_not_in_docs = []

0 commit comments

Comments
 (0)