Firstly, thanks for the great plugin, especially the documentation!
I'm trying to speed up the init time of our pytest suite (ie, speed up the time before we actually start running tests), because our users often iterate on one test at a time, which typically take 1-3 seconds to run. Importing pandas is currently ~0.5sec of our boot up time, coming from pytest-harvest. A small fraction of our tests use pandas, and where we use it, we've been careful to delay the import until the functions that use it, so that we don't pay this penalty across all tests.
From a cursory glance, this line and this line could be moved inside the get_session_results_df() function definition, and the error message re-worked, so that you only pay the import cost if you use the function, rather than every time you load the plugin.
If this sounds OK, I can put up a PR changing this.
Firstly, thanks for the great plugin, especially the documentation!
I'm trying to speed up the init time of our pytest suite (ie, speed up the time before we actually start running tests), because our users often iterate on one test at a time, which typically take 1-3 seconds to run. Importing pandas is currently ~0.5sec of our boot up time, coming from pytest-harvest. A small fraction of our tests use pandas, and where we use it, we've been careful to delay the import until the functions that use it, so that we don't pay this penalty across all tests.
From a cursory glance, this line and this line could be moved inside the
get_session_results_df()
function definition, and the error message re-worked, so that you only pay the import cost if you use the function, rather than every time you load the plugin.If this sounds OK, I can put up a PR changing this.