Skip to content
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

[v8] fail when command documentation does not build, fix for importlib_metadata v5 #6458

Merged
merged 2 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions docs/diracdoctools/cmd/commandReference.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def createScriptDoc(self, script: str):
if not helpMessage:
LOG.warning("NO DOC for %s", scriptName)
helpMessage = "Oops, we couldn't generate a description for this command."
self.exitcode = 1

# Script reference
fileContent = textwrap.dedent(
Expand Down
3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
LOG.info("Building command reference")
from diracdoctools.cmd.commandReference import run as buildCommandReference

buildCommandReference(configFile="../docs.conf")
if buildCommandReference(configFile="../docs.conf") != 0:
raise RuntimeError("Something went wrong with the documentation creation")

# singlehtml build needs too much memory, so we need to create less code documentation
buildType = "limited" if any("singlehtml" in arg for arg in sys.argv) else "full"
Expand Down
2 changes: 1 addition & 1 deletion src/DIRAC/Core/Base/Script.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __call__(self, func=None):
return functools.wraps(func)(self)

# Iterate through all known entry_points looking for self.scriptName
matches = [ep for ep in metadata.entry_points()["console_scripts"] if ep.name == self.scriptName]
matches = [ep for ep in metadata.entry_points(group="console_scripts") if ep.name == self.scriptName]
if not matches:
raise NotImplementedError("Something is very wrong")

Expand Down