In PR #530, new functionality was introduced to sectors.py:SectorPluginBase:create_test_plot where we conditionally either return fig, ax, mapobj or perform fig.savefig. This is likely bad practice and we should be consistent in whether or not we return something within GeoIPS functions. This create_test_plot likely should be broken into two functions, one of which saves a figure, and then other which returns those objects mentioned.
Requested Update
Description
In PR #530, new functionality was introduced to
sectors.py:SectorPluginBase:create_test_plot
where we conditionally either returnfig, ax, mapobj
or performfig.savefig
. This is likely bad practice and we should be consistent in whether or not we return something within GeoIPS functions. Thiscreate_test_plot
likely should be broken into two functions, one of which saves a figure, and then other which returns those objects mentioned.Background and Motivation
See this comment from #530.
Code to demonstrate issue
sectors.py:SectorPluginBase:create_test_plot
Checklist for Completion
sectors.py:SectorPluginBase:create_test_plot
into two functions, one which returns, the other which saves a figure.