Speed up unit tests#1426
Open
susannasiebert wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IO on GitHub action runners is exceedingly slow. This especially affected various pVACsplice tests which rely on a GTF reference. These, even when pared down to only a single chromosome, can still be hundreds of thousands of entries.
This PR replaces all gtf files used in the test with ones that only contain entries for genes in the result set or needed for testing specific functionality (e.g. cds_start_NF, cd_end_NF flags to test the allow incomplete transcripts option).
These files are now also saved in raw format, not gzipped, because unzipping them (or having the gtfparse library handling unzipping) is another bottleneck.
In order to ascertain test runtimes the previous execution via unittest has been replaced by pytest (which has unittest support and provides a flag for outputting test runtime information).
Runtime for unittests is now down to ~20 minutes from over 2 hours.
Side note: the slowness of gtf parsing seems to be specific to GitHub actions as these tests were already running at more reasonable speeds locally.