test: enable Hail tests via session fixture and CI Java setup#14
Open
ameynert wants to merge 3 commits intoam_12_integrationfrom
Open
test: enable Hail tests via session fixture and CI Java setup#14ameynert wants to merge 3 commits intoam_12_integrationfrom
ameynert wants to merge 3 commits intoam_12_integrationfrom
Conversation
Adds tests/conftest.py with a session-scoped hail_context fixture that calls hl.init(quiet=True) once per test session and hl.stop() on exit. Removes the @pytest.mark.skip from test_get_haplo_sequence_edge_cases, which already mocks hl.get_sequence and only needed an active Hail context to run hl.eval(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds actions/setup-java (temurin JDK 11) before the uv test step so that hl.init() in the Hail session fixture can find a JVM. Without this, Hail tests would error on the GitHub Actions runner. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
divref/tests/conftest.pywith a session-scopedhail_contextfixture that callshl.init(quiet=True)once per test session andhl.stop()on exit@pytest.mark.skipfromtest_get_haplo_sequence_edge_cases— the test already mockedhl.get_sequencecorrectly and only needed an active Hail context to callhl.eval()setup-javastep (Temurin JDK 11) topython_package.ymlsohl.init()can find a JVM on the GitHub Actions runnerHow it works
Tests that require Hail add
hail_context: Noneas a parameter; pytest injects the session fixture, ensuringhl.init()has been called before any Hail expressions are evaluated. The fixture is notautouse, so non-Hail tests incur no startup overhead.Test plan
pixi run check-allpasses locally (Java provided by pixihailfeature)test_get_haplo_sequence_edge_casespasses (not skipped)🤖 Generated with Claude Code