Skip to content

Reduce default verbosity of the package #523

Closed

Description

@MeyerBender

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?

Activity

  1. timtreis commented on Dec 18, 2025

    @timtreis
    Member

    Agree with you, but I probably would implement this as a global switch similar to scanpy.set_figure_params rather than at the function level.

    Opinions @ilan-gold @flying-sheep ?

  2. added
    enhancement
    🗣️ discussion
    on Dec 18, 2025
  3. ilan-gold commented on Dec 18, 2025

    @ilan-gold

    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

  4. MeyerBender commented on Dec 19, 2025

    @MeyerBender
    ContributorAuthor

    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.

  5. linked a pull request that will close this issueEnhancement/reduce verbosity #524on Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🗣️ discussionenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions