-
Notifications
You must be signed in to change notification settings - Fork 9
Description
following up on the comment from @neelasha23 in our team brainstorming:
shortening the CI and doc building time is essential since we're blocked while waiting for this to finish, sharing a few thoughts
ci
I recently added a flag to our repos so pytest prints tests that take >5 seconds to finish, this can help us spot slow tests and fix them. there might be cases where we have no choice, but in the majority of cases we should strive to have fast tests; we could go beyond printing logs and enforce this by failing slow tests. if we don't enforce it as a rule, then we'd have to run periodic checks to look for slow tests
another solution would be to find a vendor that can run our tests in more powerful hardware. I remember seeing some of them. This can be a quick win.
Finally, can also try running pytest in parallel, there's an extension that allows doing that; the challenge there is that if our tests are not fully isolated, we might sun into issues that will be hard to debug.
docs
similarly, as with the CI, we could print the running time for each notebook so we spot slow ones. I think jupyter-book has an option to timeout slow notebooks so that's another option.
we can also check if readthedocs has an option to build our docs in faster hardware.
running notebooks in parallel is also another option, but in this case, we'll have to implement it ourselves. an alternative can be a caching layer. readthedocs doesn't cache anything since it starts from an empty container but jupyter-book has caching built-in. so we could build something that fetches the latest successful docs build from master/main so we can benefit from it. But I'm unsure if readthedocs has an API for downloading previous builds