Skip to content

Add Hydrus-1D example and test case - #107

Merged
gerlero merged 1 commit into
mainfrom
hydrus
Sep 9, 2026
Merged

Add Hydrus-1D example and test case#107
gerlero merged 1 commit into
mainfrom
hydrus

Conversation

@gerlero

@gerlero gerlero commented Sep 9, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new test imports frontx.examples.data.hydrus, which currently imports optional Matplotlib at module import time and will fail in a minimal test install where frontx[examples] is not installed.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds a Hydrus-1D reference dataset and uses it to validate frontx.solve/sol.flux against Hydrus-produced water content and velocity fields.

Changes:

  • Add a new regression test that compares frontx’s solution/flux to Hydrus-1D outputs at multiple times.
  • Add a new Hydrus example script for plotting frontx vs Hydrus-1D fields.
  • Add a packaged Hydrus-1D dataset loader (frontx.examples.data.hydrus) that parses Nod_Inf.out into r, t, theta, and velocity.
File summaries
File Description
tests/test_solve.py Adds a Hydrus-1D regression test for solution and flux vs reference data.
src/frontx/examples/hydrus.py Adds an example script to plot frontx vs Hydrus-1D water content and velocity fields.
src/frontx/examples/data/hydrus/init.py Adds a dataset loader that parses Hydrus-1D output into NumPy arrays.
Review details
  • Files reviewed: 3/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/frontx/examples/data/hydrus/__init__.py
@codecov-commenter

codecov-commenter commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.96552% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.26%. Comparing base (ce09687) to head (b81bb29).

Files with missing lines Patch % Lines
src/frontx/examples/data/hydrus/__init__.py 68.96% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
- Coverage   86.55%   85.26%   -1.29%     
==========================================
  Files          13       14       +1     
  Lines         580      638      +58     
==========================================
+ Hits          502      544      +42     
- Misses         78       94      +16     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gerlero
gerlero merged commit 39b8d55 into main Sep 9, 2026
8 of 9 checks passed
@gerlero
gerlero deleted the hydrus branch September 9, 2026 22:56
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.

3 participants