-
Notifications
You must be signed in to change notification settings - Fork 77
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
I came across a minor issue with the plotting code: the draw_svg
warning for mutations above unplotted nodes uses the logging
module instead of the warnings
module, that we'd usually use for user warnings. I discovered this because I couldn't find a way to suppress it. The warning is currently this:
if len(unplotted) > 0:
logging.warning(
f"Mutations {unplotted} are above nodes which are not present in the "
"displayed tree, so are not plotted on the topology."
)
If we were to use warnings
instead, I'm guessing we'd do something like this? I'm not sure what stack level is appropriate here.
if len(unplotted) > 0:
warnings.warn(
f"Mutations {unplotted} are above nodes which are not present in the "
"displayed tree, so are not plotted on the topology.",
UserWarning,
stacklevel=2
)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working