Skip to content

test: enable Hail tests via session fixture and CI Java setup#14

Open
ameynert wants to merge 3 commits intoam_12_integrationfrom
am_13_enable_hail_tests
Open

test: enable Hail tests via session fixture and CI Java setup#14
ameynert wants to merge 3 commits intoam_12_integrationfrom
am_13_enable_hail_tests

Conversation

@ameynert
Copy link
Copy Markdown
Collaborator

Summary

  • Adds divref/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 @pytest.mark.skip from test_get_haplo_sequence_edge_cases — the test already mocked hl.get_sequence correctly and only needed an active Hail context to call hl.eval()
  • Adds a setup-java step (Temurin JDK 11) to python_package.yml so hl.init() can find a JVM on the GitHub Actions runner

How it works

Tests that require Hail add hail_context: None as a parameter; pytest injects the session fixture, ensuring hl.init() has been called before any Hail expressions are evaluated. The fixture is not autouse, so non-Hail tests incur no startup overhead.

Test plan

  • pixi run check-all passes locally (Java provided by pixi hail feature)
  • Python toolkit checks CI passes with Java available (JDK 11 via setup-java)
  • test_get_haplo_sequence_edge_cases passes (not skipped)

🤖 Generated with Claude Code

ameynert and others added 2 commits April 13, 2026 08:46
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>
@ameynert ameynert temporarily deployed to github-actions-snakemake-linting April 13, 2026 15:46 — with GitHub Actions Inactive
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 982e47f8-68c4-49dd-991f-b0574b30d764

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch am_13_enable_hail_tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ameynert ameynert temporarily deployed to github-actions-snakemake-linting April 13, 2026 15:47 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant