-
Notifications
You must be signed in to change notification settings - Fork 1.1k
the test suite is too slow #878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It's the API calls that make the iotools take long. I assume you're making that consideration for its impact on Azure Pipelines right? Locally, you can split tests into different processes to speed it up locally but that's not usable on a free version of Azure Pipelines. I explored parallelism for Azure Pipelines briefly when I was coming on board to helping admin pvlib. Azure Pipelines requires a paid account to enable more processes and even then I think it splits different test jobs rather than providing another core for the primary process. Maybe there's an async solution out there that could work to run something local while waiting for the API call but it'll have to be a turnkey solution to be worth the effort if it exists. Probably the only thing we could do at this point is minimize the amount of API calls unless. |
One idea is to mock the network calls by default [1] but leave the option to perform them when specifically requested [2]. [1] https://requests-mock.readthedocs.io/en/latest/pytest.html (edit -- the [2] link above is super out of date, not sure why it showed up for me on google. a little irrelevant since pytest-remotedata does the same thing anyway) |
I have two suggestions, in addition to Kevin's idea.
|
@CameronTStark I'm concerned about both CI speed and local performance. A lot of people seem to rely on the CI, so faster feedback is better for them. I typically run tests locally before pushing to github, starting with the relevant module and then the whole suite. I usually forget to install and use I'm in favor of running only the live network tests on one CI instance. I think that's a common pattern for other pydata projects. I'm also in favor of mocking calls where appropriate. My original hope was that we could simply request less data in some of these calls. I'm -1 on splitting |
I was a little scared of that too, but just mentioned it as a remote possibility, nuclear option, thx
I think a wiki or doc page in contribution guidelines (maybe I missed this) to clarify expected testing patterns and recommended PR test procedures could be helpful to align everyone |
@wholmgren now that pytest-remote data has been implemented are you satisfied with the speed or do you see more room for improvement? |
Yes, I'm happy with the speed when the remote data tests are excluded. I don't think it's worth the effort to make the remote tests faster at this point in time. Thanks everyone here for your help and ideas. |
The test suite is getting to be quite slow. Here are the 20 slowest tests on my mac:
I will work on the
forecast
tests. Any ideas for theiotools
tests?The text was updated successfully, but these errors were encountered: