Hard changing the users matplotlib backend seems aggressive (considering not everyone uses a headless environment), but wouldn't be terrible if it wasn't part of the main package itself.
I would recommend moving all plotting functionality (i.e. anything requiring a matplotlib backend change) to a _plot.py file or something unrelated to the "beef" of the system itself, as currently 99% of the time importing sourcetracker will result in ugly warnings, like so:
Hard changing the users matplotlib backend seems aggressive (considering not everyone uses a headless environment), but wouldn't be terrible if it wasn't part of the main package itself.
I would recommend moving all plotting functionality (i.e. anything requiring a
matplotlib
backend change) to a_plot.py
file or something unrelated to the "beef" of the system itself, as currently 99% of the time importing sourcetracker will result in ugly warnings, like so: