-
Notifications
You must be signed in to change notification settings - Fork 1
Rework tests to facilitate parametrization and finer scale testing of changes #161
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
Conversation
…ob ids with use with submit_wdls fixture thats now removed
Looking extremely reasonable so far. |
I'm trying this out by running the rewrite cassettes workflow with this branch
|
…ers if so, else auto for personal machine use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really like this approach of spelling out which WDL's failed during test-successes.py, test-failures.py, etc., think it'll help a ton when reading GHA check failures.
Also a huge fan of the individual cassette approach for each WDL, much more isolated changes when updating one of the unit tests. api-tests-changed.yml
looks good, just one small note about -n auto
, definitely want to give it a test run once it's merged.
My only other suggestion is to update the function docstrings accordingly, specifically the input argument descriptions. I'm pretty sure I understand what each of them do now, but just don't want to confuse ourselves in the future.
For the failing test check, i'm not sure if it's all due to #160 and the globbing issue or not. 🤷🏽 |
Thanks for looking @tefirman - Made changes. Yeah I think we'll benefit from seeing what actual WDLs are failing rather than having to manually go in and find which one is failing. |
I'm seeing a lot of "connection refused" errors for the validation tests ( |
Given the changes on dev, what do we need to do here to make sure the tests pass appropriately? |
@seankross I think we'd just need to do a rewrite of the cassettes locally then push up on this branch because the test thats failing is doing a cached run, i'll do that |
Ahhhh, that makes total sense. I was going to say, I ran things locally and things seemed to be working fine on my end. Glad to know it's just a re-run situation. |
@seankross @tefirman okay, rewrite locally done, and running now, hopefully we get green |
we're all set on the cached api tests now https://github.com/FredHutch/wdl-unit-tests/actions/runs/14521232867/job/40742413310?pr=161 but I see i need to fiddle with the api tests changed yml now just a sec |
@seankross @tefirman okay, we're all green on tests, good to merge? |
i thnk i need one more approval @tefirman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sckott !
#83
#139
submit_wdls
fixture - for those tests that used it, new utility fxnsubmit_wdl
to submit jobs within each test. These tests now can use@pytest.mark.parametrize
to parametrize over paths to WDL dirs.pytest-xdist
now to parallelize tests, especially important now with more distinct tests to run. We use it by having it in our pyproject.toml, and you can use it withpytest
like-n auto
submit_wdls
fixture with each test submitting their own jobs is that an entire test suite run takes longer now - the last full run i tried on gh actions took 45 min then failed, so may need to seek out ways to speed this up. However, the other change here should help. That is:api-tests-changed.yml
which will look for changed WDL dirs and run its tests only across all tests leveraging the-k
flag inpytest
which look for all tests that use that WDL dir, even accounting for parametrized tests-k
flag and not have to run the entire test suiteTODO: