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
In my experience, spatialdata-plot is quite verbose. While detailed logging is very helpful for warnings and debugging, I often encounter a wall of text even when everything is working correctly. This is due to the extensive use of logger.info() throughout the codebase.
Although users can manually adjust the logging level, I think the default behavior could be less verbose for normal, successful execution. I would suggest to either remove the logger.info() calls entirely, or introduce a verbose argument for the relevant methods (defaulting to False).
I’d be happy to have a go at this, but wanted to gather some opinions first. Is this a change that would be welcome?
Without knowing more, I'm a big fan of settings objects. They have the risk of making everything a setting so you need to be judicious, but this is a great use-case
Implemented in #524 — logging verbosity can now be controlled globally via spatialdata_plot.set_verbosity(). By default, INFO messages are suppressed.
You can test it with:
import spatialdata_plot
from spatialdata.datasets import blobs
blob = blobs()
# this used to trigger printing of an info message
# now it just outputs the plot
blob.pl.render_shapes("blobs_circles", method='datashader').pl.show()
# to get the old, more verbose behavior
spatialdata_plot.set_verbosity(True)
blob.pl.render_shapes("blobs_circles", method='datashader').pl.show()
Let me know if this is in line with what you envisioned or if I should change anything.
Activity
timtreis commentedon Dec 18, 2025
Agree with you, but I probably would implement this as a global switch similar to
scanpy.set_figure_paramsrather than at the function level.Opinions @ilan-gold @flying-sheep ?
ilan-gold commentedon Dec 18, 2025
Without knowing more, I'm a big fan of settings objects. They have the risk of making everything a setting so you need to be judicious, but this is a great use-case
MeyerBender commentedon Dec 19, 2025
Implemented in #524 — logging verbosity can now be controlled globally via
spatialdata_plot.set_verbosity(). By default, INFO messages are suppressed.You can test it with:
Let me know if this is in line with what you envisioned or if I should change anything.