Skip to content

Commit

Permalink
Don't require description for output from custom annotators
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHammarstedt committed Nov 1, 2024
1 parent 36dea44 commit 432015c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sparv/core/snake_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,15 @@ def rule_helper(rule: RuleStorage, config: dict, storage: SnakeStorage, config_m
skip = False
outputs_list = []
for output in param_value:
if rule.annotator and not output.description:
console.print(
"[red]WARNING:[/] "
f"Annotation '{output.name}' created by task '{rule.full_name}' is missing a description."
)
if not isinstance(output, BaseOutput):
if not output:
return False
output = param_type(output)
elif rule.annotator and not output.description and not rule.module_name.startswith(f"{registry.custom_name}."):
console.print(
"[red]WARNING:[/] "
f"Annotation '{output.name}' created by {rule.type} '{rule.full_name}' is missing a description."
)
if custom_suffix:
# Add suffix to output annotation name
output.name += custom_suffix
Expand Down

0 comments on commit 432015c

Please sign in to comment.